Skip to content

Commit 37a5782

Browse files
committed
Use a monkey patch instead of hacking code
Refs johnny/jquery-sortable#122
1 parent 15c2308 commit 37a5782

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

modules/system/assets/ui/js/drag.sort.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,15 @@
144144
this.dispose()
145145
}
146146

147+
// External solution for group persistence
148+
// See https://github.com/johnny/jquery-sortable/pull/122
149+
Sortable.prototype.destroyGroup = function() {
150+
var jqSortable = this.$el.data('jqSortable')
151+
if (jqSortable.group) {
152+
jqSortable.group._destroy()
153+
}
154+
}
155+
147156
Sortable.DEFAULTS = {
148157
useAnimation: false,
149158
usePlaceholderClone: false,

modules/system/assets/ui/vendor/sortable/jquery-sortable.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -631,10 +631,6 @@
631631
return val != that
632632
})
633633

634-
// See https://github.com/johnny/jquery-sortable/pull/122
635-
if(this.group)
636-
this.group._destroy()
637-
638634
$.each(this.items || [], function(){
639635
$.removeData(this, subContainerKey)
640636
})

0 commit comments

Comments
 (0)