summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authord42 <d42@users.noreply.github.com>2018-04-27 23:19:59 +0200
committerd42 <d42@users.noreply.github.com>2018-04-27 23:19:59 +0200
commitcbc3a791386a277a872b483baed7900ae43577e4 (patch)
tree12ec9eb960fb419430368ed6962c750c81c818c5
parentfe073182f1be5fa6fd995177ecfa560db1a29d9f (diff)
downloadspejstore-cbc3a791386a277a872b483baed7900ae43577e4.tar.gz
spejstore-cbc3a791386a277a872b483baed7900ae43577e4.tar.bz2
spejstore-cbc3a791386a277a872b483baed7900ae43577e4.zip
yolo
-rw-r--r--static/admin/js/django_hstore/hstore-widget.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/static/admin/js/django_hstore/hstore-widget.js b/static/admin/js/django_hstore/hstore-widget.js
index f5e991b..3723f27 100644
--- a/static/admin/js/django_hstore/hstore-widget.js
+++ b/static/admin/js/django_hstore/hstore-widget.js
@@ -1,5 +1,3 @@
-var xD = $;
-
var initDjangoHStoreWidget = function(hstore_field_name, inline_prefix) {
// ignore inline templates
// if hstore_field_name contains "__prefix__"
@@ -7,8 +5,6 @@ var initDjangoHStoreWidget = function(hstore_field_name, inline_prefix) {
return;
}
- var $ = django.jQuery;
-
// processing inlines
if(hstore_field_name.indexOf('inline') > -1){
var inlineClass = $('#id_'+hstore_field_name).parents('.inline-related, .grp-group').attr('class');
@@ -122,8 +118,8 @@ var initDjangoHStoreWidget = function(hstore_field_name, inline_prefix) {
$hstore.delegate('a.hs-add-row, .hs-add-row a', 'click', function(e) {
e.preventDefault();
$hstore.find('.hstore-rows').append(empty_row);
- xD('.django-select2').djangoSelect2()
- xD('select').on( 'select2:close', function () {
+ $('.django-select2').djangoSelect2()
+ $('select').on( 'select2:close', function () {
$(this).focus();
});
});
@@ -161,7 +157,7 @@ var initDjangoHStoreWidget = function(hstore_field_name, inline_prefix) {
hstore_rows.show();
add_row.show();
- xD('.django-select2').djangoSelect2()
+ $('.django-select2').djangoSelect2()
}
else{
raw_textarea.show();