Skip to content

Commit 0614b91

Browse files
authored
Merge pull request #276 from crucialfelix/feature/fix-example-app-and-popup
Fix example app and popup not closing
2 parents 13fe546 + 73de2fe commit 0614b91

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

ajax_select/static/ajax_select/js/ajax_select.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@
189189
window.dismissAddRelatedObjectPopup = function(win, newId, newRepr) {
190190
// Iff this is an ajax-select input then close the window and
191191
// trigger didAddPopup
192-
var name = window.windowname_to_id(win.name);
193-
var input = $('#' + name);
192+
var input = $('#' + win.name);
194193
if (input.data('ajax-select')) {
195194
win.close();
196195
// newRepr is django's repr of object
@@ -201,8 +200,6 @@
201200
djangoDismissAddRelatedObjectPopup(win, newId, newRepr);
202201
}
203202
}
204-
// Django renamed this function in 1.8
205-
window.dismissAddAnotherPopup = window.dismissAddRelatedObjectPopup;
206203

207204
// activate any on page
208205
$(window).bind('init-autocomplete', function() {

example/install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
set -e
55

66
# creates a virtualenv
7-
virtualenv --no-site-packages AJAXSELECTS
7+
python3 -m venv AJAXSELECTS
88
source AJAXSELECTS/bin/activate
99

1010
DJANGO=$1
1111
if [ "$DJANGO" != "" ]; then
1212
echo "Installing Django $DJANGO:"
13-
pip install Django==$DJANGO
13+
AJAXSELECTS/bin/pip install Django==$DJANGO
1414
else
1515
echo "Installing latest django:"
16-
pip install django
16+
AJAXSELECTS/bin/pip install django
1717
fi
1818

1919
if [ ! -d ./ajax_select ]; then

0 commit comments

Comments
 (0)