mirror of
https://github.com/UndefinedOffset/SortableGridField.git
synced 2024-10-22 15:05:38 +00:00
Resolved issue #33 when sorting to page the to page sort was called first then the on page sort was called which caused the indexes to become confused
This commit is contained in:
parent
4827b8e909
commit
4de269e53f
@ -5,6 +5,7 @@
|
||||
var self=this;
|
||||
var refCheckbox=$(this);
|
||||
var gridField=this.getGridField();
|
||||
var pageSort=false;
|
||||
|
||||
if($(this).is(':checked')) {
|
||||
gridField.find('table').addClass('dragSorting');
|
||||
@ -24,6 +25,11 @@
|
||||
return ui;
|
||||
},
|
||||
update: function(event, ui) {
|
||||
if(pageSort) {
|
||||
pageSort=false;
|
||||
return;
|
||||
}
|
||||
|
||||
var dataRows=[];
|
||||
var gridItems=gridField.getItems();
|
||||
var button=refCheckbox.parent().find('.sortablerows-toggle');
|
||||
@ -54,8 +60,7 @@
|
||||
activeClass: 'sortablerows-droptarget',
|
||||
tolerance: 'pointer',
|
||||
drop: function(event, ui) {
|
||||
event.stopPropagation();
|
||||
event.stopImmediatePropagation();
|
||||
pageSort=true;
|
||||
|
||||
var button=refCheckbox.parent().find('.sortablerows-sorttopage');
|
||||
var itemID=$(ui.draggable).data('id');
|
||||
|
Loading…
x
Reference in New Issue
Block a user