Skip to content

Commit

Permalink
Merge branch 'release/1.2.13'
Browse files Browse the repository at this point in the history
  • Loading branch information
asyncee committed Jun 22, 2015
2 parents 9472163 + 6315166 commit 2494751
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ in admin.


Project aims to support **Python 2.7**, **3.3** and **3.4**,
**Django 1.6** and **1.7**.
**Django 1.6**, **1.7** and **1.8**.


How it looks
Expand Down
4 changes: 4 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Changelog

Version 1.2
-----------
1.2.13
~~~~~~
- fixed issue #22, thanks to *zeta83*

1.2.12
~~~~~~
- fixed issue#2
Expand Down
12 changes: 12 additions & 0 deletions easy_select2/static/easy_select2/js/lookup_override.1.8.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
if (typeof(dismissAddRelatedObjectPopup) == "function") {
var originaldismissAddRelatedObjectPopup = dismissAddRelatedObjectPopup;

(function(){
// Extend dismissAddRelatedObjectPopup with ``select2changed`` event.
dismissAddRelatedObjectPopup = function(win, newId, newRepr) {
var name = windowname_to_id(win.name);
originaldismissAddRelatedObjectPopup(win, newId, newRepr);
$('#' + name).trigger('select2changed');
}
})()
}
8 changes: 7 additions & 1 deletion easy_select2/widgets.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json

import django
from django import forms
from django.templatetags.static import static
from django.conf import settings
Expand All @@ -14,10 +15,15 @@
'SELECT2_USE_BUNDLED_JQUERY',
True)

if django.VERSION[1] <= 7: # django 1.7 and lower
lookup_override_filename = 'lookup_override.1.7.js'
else: # django 1.8+
lookup_override_filename = 'lookup_override.1.8.js'

SELECT2_WIDGET_JS = [
static('easy_select2/js/init.js'),
static('easy_select2/js/easy_select2.js'),
static('easy_select2/js/lookup_override.js'),
static('easy_select2/js/{}'.format(lookup_override_filename)),
static(SELECT2_JS),
]

Expand Down
2 changes: 1 addition & 1 deletion sampleproject/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
django==1.7
django

#django-easy-select2
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def run_tests(self):

setup(
name="django-easy-select2",
version="1.2.12",
version="1.2.13",
packages=find_packages(),
author="asyncee",
description="Django select2 theme for select input widgets.",
Expand Down

0 comments on commit 2494751

Please sign in to comment.