Skip to content

Commit

Permalink
Use a monkey patch instead of hacking code
Browse files Browse the repository at this point in the history
  • Loading branch information
daftspunk committed Jul 18, 2015
1 parent 530763c commit b07de78
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 9 additions & 0 deletions assets/ui/js/drag.sort.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,15 @@
this.dispose()
}

// External solution for group persistence
// See https://github.com/johnny/jquery-sortable/pull/122
Sortable.prototype.destroyGroup = function() {
var jqSortable = this.$el.data('jqSortable')
if (jqSortable.group) {
jqSortable.group._destroy()
}
}

Sortable.DEFAULTS = {
useAnimation: false,
usePlaceholderClone: false,
Expand Down
4 changes: 0 additions & 4 deletions assets/ui/vendor/sortable/jquery-sortable.js
Original file line number Diff line number Diff line change
Expand Up @@ -631,10 +631,6 @@
return val != that
})

// See https://github.com/johnny/jquery-sortable/pull/122
if(this.group)
this.group._destroy()

$.each(this.items || [], function(){
$.removeData(this, subContainerKey)
})
Expand Down

0 comments on commit b07de78

Please sign in to comment.