Package: django-ajax-selects / 1.7.0-1

0001-Remove-upstream-s-bootstrap.js.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
From: Brian May <bam@debian.org>
Date: Tue, 15 Dec 2015 16:18:04 +1100
Subject: Remove upstream's bootstrap.js

Contains privacy invading URLs, and I can't think of a better solution.

I raised issues I was having with lintian on debian-devel:
https://lists.debian.org/debian-devel/2015/11/msg00249.html

Discussions are continuing this month:
https://lists.debian.org/debian-devel/2015/12/msg00011.html

And on debian-python:
https://lists.debian.org/debian-python/2015/12/msg00009.html
---
 ajax_select/fields.py                          | 10 +--------
 ajax_select/static/ajax_select/js/bootstrap.js | 30 --------------------------
 2 files changed, 1 insertion(+), 39 deletions(-)
 delete mode 100644 ajax_select/static/ajax_select/js/bootstrap.js

diff --git a/ajax_select/fields.py b/ajax_select/fields.py
index 2692c45..5ef6909 100644
--- a/ajax_select/fields.py
+++ b/ajax_select/fields.py
@@ -23,15 +23,7 @@ as_default_help = 'Enter text to search.'
 
 
 def _media(self):
-    # unless AJAX_SELECT_BOOTSTRAP == False
-    # then load jquery and jquery ui + default css
-    # where needed
-    js = ('ajax_select/js/bootstrap.js', 'ajax_select/js/ajax_select.js')
-    try:
-        if not settings.AJAX_SELECT_BOOTSTRAP:
-            js = ('ajax_select/js/ajax_select.js',)
-    except AttributeError:
-        pass
+    js = ('ajax_select/js/ajax_select.js', )
     return forms.Media(css={'all': ('ajax_select/css/ajax_select.css',)}, js=js)
 
 
diff --git a/ajax_select/static/ajax_select/js/bootstrap.js b/ajax_select/static/ajax_select/js/bootstrap.js
deleted file mode 100644
index cb742ea..0000000
--- a/ajax_select/static/ajax_select/js/bootstrap.js
+++ /dev/null
@@ -1,30 +0,0 @@
-(function(w) {
-  /**
-   * load jquery and jquery-ui if needed
-   */
-
-  function not(thing) {
-    return typeof thing === 'undefined';
-  }
-
-  function loadJS(src) {
-    document.write('<script type="text/javascript"  src="' + src + '"><\/script>');
-  }
-
-  function loadCSS(href) {
-    var script = document.createElement('link');
-    script.href = href;
-    script.type = 'text/css';
-    script.rel = 'stylesheet';
-    document.head.appendChild(script);
-  }
-
-  if (not(w.jQuery)) {
-    loadJS('//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js');
-  }
-
-  if (not(w.jQuery) || not(w.jQuery.ui) || not(w.jQuery.ui.autocomplete)) {
-    loadJS('//code.jquery.com/ui/1.10.3/jquery-ui.js');
-    loadCSS('//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css');
-  }
-})(window);