Fixed compatibility issues with SS3 Beta 3

This commit is contained in:
UndefinedOffset 2012-05-28 11:26:33 -03:00
parent ed00b22574
commit 4c77fff713

View File

@ -1,10 +1,11 @@
(function($) {
$.entwine('ss', function($) {
$('.ss-gridfield .gridfield-sortablerows input').entwine({
onmatch: function() {
var self=this;
var refCheckbox=$(this);
var gridField=$(this).getGridField();
var gridField=this.getGridField();
if($(this).is(':checked')) {
gridField.find('table').addClass('dragSorting');
@ -92,7 +93,7 @@
},
onchange: function(e) {
var gridField=$(this).getGridField();
var gridField=this.getGridField();
gridField.find('tbody').sortable('option', 'disabled', ($(this).is(':checked')==false));
gridField.setState('GridFieldSortableRows', {sortableToggle: $(this).is(':checked')});
@ -102,7 +103,7 @@
},
_makeRequest: function(ajaxOpts, callback) {
var gridField=$(this).getGridField();
var gridField=this.getGridField();
var form = gridField.closest('form'),
focusedElName = gridField.find(':input:focus').attr('name'); // Save focused element for restoring after refresh
@ -126,4 +127,5 @@
}, ajaxOpts));
}
});
});
})(jQuery);