Merge pull request #67 from AdenFraser/master

Resets the classes of .odd, .even, .first and .last for gridfields when a update (drop) event occurs.
This commit is contained in:
Ed Chipman 2015-02-11 09:29:12 -04:00
commit 3e9b1b6e2e

View File

@ -31,6 +31,12 @@
return; return;
} }
$('.ss-gridfield-item').removeClass('first last odd even');
$('.ss-gridfield-item').first().addClass('first');
$('.ss-gridfield-item:odd').last().addClass('last');
$('.ss-gridfield-item:even').addClass('even');
$('.ss-gridfield-item:odd').addClass('odd');
var dataRows=[]; var dataRows=[];
var gridItems=gridField.getItems(); var gridItems=gridField.getItems();
var button=refCheckbox.parent().find('.sortablerows-savesort'); var button=refCheckbox.parent().find('.sortablerows-savesort');