mirror of
https://github.com/UndefinedOffset/SortableGridField.git
synced 2024-10-22 17:05:38 +02:00
Fixed compatibility issues with SS3 Beta 3
This commit is contained in:
parent
ed00b22574
commit
4c77fff713
@ -1,10 +1,11 @@
|
|||||||
(function($) {
|
(function($) {
|
||||||
|
$.entwine('ss', function($) {
|
||||||
$('.ss-gridfield .gridfield-sortablerows input').entwine({
|
$('.ss-gridfield .gridfield-sortablerows input').entwine({
|
||||||
onmatch: function() {
|
onmatch: function() {
|
||||||
var self=this;
|
var self=this;
|
||||||
var refCheckbox=$(this);
|
var refCheckbox=$(this);
|
||||||
|
|
||||||
var gridField=$(this).getGridField();
|
var gridField=this.getGridField();
|
||||||
|
|
||||||
if($(this).is(':checked')) {
|
if($(this).is(':checked')) {
|
||||||
gridField.find('table').addClass('dragSorting');
|
gridField.find('table').addClass('dragSorting');
|
||||||
@ -92,7 +93,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
onchange: function(e) {
|
onchange: function(e) {
|
||||||
var gridField=$(this).getGridField();
|
var gridField=this.getGridField();
|
||||||
gridField.find('tbody').sortable('option', 'disabled', ($(this).is(':checked')==false));
|
gridField.find('tbody').sortable('option', 'disabled', ($(this).is(':checked')==false));
|
||||||
gridField.setState('GridFieldSortableRows', {sortableToggle: $(this).is(':checked')});
|
gridField.setState('GridFieldSortableRows', {sortableToggle: $(this).is(':checked')});
|
||||||
|
|
||||||
@ -102,7 +103,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
_makeRequest: function(ajaxOpts, callback) {
|
_makeRequest: function(ajaxOpts, callback) {
|
||||||
var gridField=$(this).getGridField();
|
var gridField=this.getGridField();
|
||||||
var form = gridField.closest('form'),
|
var form = gridField.closest('form'),
|
||||||
focusedElName = gridField.find(':input:focus').attr('name'); // Save focused element for restoring after refresh
|
focusedElName = gridField.find(':input:focus').attr('name'); // Save focused element for restoring after refresh
|
||||||
|
|
||||||
@ -126,4 +127,5 @@
|
|||||||
}, ajaxOpts));
|
}, ajaxOpts));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
})(jQuery);
|
})(jQuery);
|
Loading…
Reference in New Issue
Block a user