Display cms loading indicator when sorting rows on the same page fixes #34

This commit is contained in:
Ed 2013-05-25 20:40:14 -03:00
parent fc2d17ace5
commit 60c8939f45

View File

@ -5,6 +5,7 @@
var self=this;
var refCheckbox=$(this);
var gridField=this.getGridField();
var form=gridField.closest('form');
var pageSort=false;
if($(this).is(':checked')) {
@ -49,7 +50,9 @@
name: 'ItemIDs',
value: dataRows
}
]});
]},function() {
form.removeClass('loading');
});
}
}).disableSelection();
@ -109,6 +112,8 @@
var form = gridField.closest('form'),
focusedElName = gridField.find(':input:focus').attr('name'); // Save focused element for restoring after refresh
form.addClass('loading');
ajaxOpts.data = ajaxOpts.data.concat(form.find(':input').serializeArray());
// Include any GET parameters from the current URL, as the view state might depend on it.