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 dad57d0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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

0 comments on commit dad57d0

Please sign in to comment.