Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Wrap id's of selectors in quotes
Browse files Browse the repository at this point in the history
Merges disqus#73. This fixes the cases with newer jQuery where selector contains dot characters.
  • Loading branch information
Teemu Husso authored and Adam Chainz committed Feb 12, 2016
1 parent 342e006 commit 827e8a5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ Pending Release
* Fixed the splitting of ``Range`` conditions, a merge of disqus/gargoyle#55,
thanks @matclayton.
* Fixed the parsing of ``Range`` conditions for the Nexus admin interface.
* Fixed the Nexus interface to work with Switches that contain dots in their
names, a merge of disqus/gargoyle#73, thanks @Raekkeri.

1.1.1 (2016-01-15)
------------------
Expand Down
8 changes: 4 additions & 4 deletions gargoyle/media/js/gargoyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ $(document).ready(function () {

$(this).
parents("tr:first").
find("div[data-path=" + field[0] + "." + field[1] + "]").show();
find("div[data-path='" + field[0] + "." + field[1] + "']").show();
});

$("div.conditionsForm form").live("submit", function (ev) {
Expand All @@ -154,7 +154,7 @@ $(document).ready(function () {

api(GARGOYLE.addCondition, data, function (swtch) {
var result = $("#switchData").tmpl(swtch);
$("table.switches tr[data-switch-key="+ data.key + "]").replaceWith(result);
$("table.switches tr[data-switch-key='"+ data.key + "']").replaceWith(result);
});
});

Expand All @@ -172,7 +172,7 @@ $(document).ready(function () {

api(GARGOYLE.delCondition, data, function (swtch) {
var result = $("#switchData").tmpl(swtch);
$("table.switches tr[data-switch-key="+ data.key + "]").replaceWith(result);
$("table.switches tr[data-switch-key='"+ data.key + "']").replaceWith(result);
});

});
Expand Down Expand Up @@ -208,7 +208,7 @@ $(document).ready(function () {

$.facebox.close();
} else {
$("table.switches tr[data-switch-key=" + curkey + "]").replaceWith(result);
$("table.switches tr[data-switch-key='" + curkey + "']").replaceWith(result);
$.facebox.close();
}
result.click();
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def get_version(package):
zip_safe=False,
install_requires=[
'django-modeldict-yplan>=1.5.0',
'nexus-yplan>=1.1.0',
'nexus-yplan>=1.2.0',
'django-jsonfield>=0.9.2,!=0.9.13',
],
license='Apache License 2.0',
Expand Down

0 comments on commit 827e8a5

Please sign in to comment.