[Python-modules-commits] [django-ajax-selects] 01/01: Convert from git-dpm to patches unapplied format
Brian May
bam at moszumanska.debian.org
Wed Jul 5 07:12:02 UTC 2017
This is an automated email from the git hooks/post-receive script.
bam pushed a commit to branch debian/master
in repository django-ajax-selects.
commit b74828331b59b3f31bfe009d4efed9ce0f0e8c24
Author: Brian May <bam at moszumanska.debian.org>
Date: Wed Jul 5 07:12:01 2017 +0000
Convert from git-dpm to patches unapplied format
---
ajax_select/fields.py | 10 +++++++++-
ajax_select/static/ajax_select/js/bootstrap.js | 7 +++++++
debian/.git-dpm | 11 -----------
debian/gbp.conf | 2 ++
4 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/ajax_select/fields.py b/ajax_select/fields.py
index fc89fd4..15edda3 100644
--- a/ajax_select/fields.py
+++ b/ajax_select/fields.py
@@ -22,7 +22,15 @@ as_default_help = 'Enter text to search.'
def _media(self):
- js = ('ajax_select/js/ajax_select.js', )
+ # 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
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
new file mode 100644
index 0000000..f2f02d8
--- /dev/null
+++ b/ajax_select/static/ajax_select/js/bootstrap.js
@@ -0,0 +1,7 @@
+// load jquery and jquery-ui if needed
+// into window.jQuery
+if (typeof window.jQuery === 'undefined') {
+ document.write('<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"><\/script><script type="text/javascript" src="//code.jquery.com/ui/1.10.3/jquery-ui.js"><\/script><link type="text/css" rel="stylesheet" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />');
+} else if(typeof window.jQuery.ui === 'undefined' || typeof window.jQuery.ui.autocomplete === 'undefined') {
+ document.write('<script type="text/javascript" src="//code.jquery.com/ui/1.10.3/jquery-ui.js"><\/script><link type="text/css" rel="stylesheet" href="//code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />');
+}
diff --git a/debian/.git-dpm b/debian/.git-dpm
deleted file mode 100644
index 09a5e83..0000000
--- a/debian/.git-dpm
+++ /dev/null
@@ -1,11 +0,0 @@
-# see git-dpm(1) from git-dpm package
-40732d7e8ec6d3e9c9326a96b24d77b4677f9b79
-40732d7e8ec6d3e9c9326a96b24d77b4677f9b79
-b0561185af8c5d9b2e6d82fd4e260db3e7a95383
-b0561185af8c5d9b2e6d82fd4e260db3e7a95383
-django-ajax-selects_1.4.3.orig.tar.gz
-861c478ebf7a91abba8d17295162a0eb7a3082d7
-36926
-debianTag="debian/%e%v"
-patchedTag="patched/%e%v"
-upstreamTag="upstream/%e%u"
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..3879982
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,2 @@
+[DEFAULT]
+debian-branch=debian/master
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-ajax-selects.git
More information about the Python-modules-commits
mailing list