Skip to content

Commit

Permalink
Fix JS error with dragStop handler
Browse files Browse the repository at this point in the history
  • Loading branch information
smarineau-cyr committed May 17, 2017
1 parent 2b001f7 commit c4240be
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
8 changes: 8 additions & 0 deletions changelog.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
[
{
"version": "1.1.3",
"downloadUrl": "https://github.com/surrealpistach/Craft-FocusPoint/archive/1.1.3.zip",
"date": "2017-05-17 9:00:00",
"notes": [
"Fix JS error with dragStop handler"
]
},
{
"version": "1.1.2",
"downloadUrl": "https://github.com/surrealpistach/Craft-FocusPoint/archive/1.1.2.zip",
Expand Down
2 changes: 1 addition & 1 deletion focuspoint/FocusPointPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function getName()

public function getVersion()
{
return '1.1.2';
return '1.1.3';
}

public function getSchemaVersion()
Expand Down
10 changes: 6 additions & 4 deletions focuspoint/resources/jquery.focuspoint.helpertool.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,13 @@
this.$elements.find('.element').each(function(i, e) {
$(e).addClass("focuselement");

$(e).data("drag").on("dragStop", function(e) {
that.$elements.find('.element').each(function(i2, e2) {
that.$data.find('>div[data-id="' + $(e2).data("id") + '"]').appendTo(that.$data);
if ($(e).data("drag") !== undefined) {
$(e).data("drag").on("dragStop", function (e) {
that.$elements.find('.element').each(function (i2, e2) {
that.$data.find('>div[data-id="' + $(e2).data("id") + '"]').appendTo(that.$data);
});
});
});
}

$(that.focusIconTpl)
.prependTo($(e))
Expand Down

0 comments on commit c4240be

Please sign in to comment.