Updated jQuery to 1.9.1 and jQueryUI to 1.10.2.
Added create function handler to unbind events from sortable that were being applied to checkboxes within a sortable item. This was preventing the delete checkbox for inline models from being checked. Updated JavaScript inlcudes to not include unnecessary files.
This commit is contained in:
@@ -14,7 +14,11 @@ jQuery(function($){
|
||||
$.ajax({
|
||||
url: ui.item.find('a.admin_sorting_url').attr('href'),
|
||||
type: 'POST',
|
||||
data: { indexes: indexes.join(',') }
|
||||
data: { indexes: indexes.join(',') },
|
||||
success: function()
|
||||
{
|
||||
ui.item.effect('highlight', {}, 1000);
|
||||
}
|
||||
});
|
||||
}
|
||||
}).click(function(e){
|
||||
|
||||
@@ -3,9 +3,13 @@ jQuery(function($){
|
||||
{
|
||||
var sortable_inline_rows = $('.inline-group .inline-related');
|
||||
sortable_inline_rows.addClass('sortable');
|
||||
|
||||
$('.inline-group').sortable({
|
||||
axis : 'y',
|
||||
containment : 'parent',
|
||||
create: function(event, ui) {
|
||||
$('.inline-related :checkbox').unbind();
|
||||
},
|
||||
tolerance : 'pointer',
|
||||
items : '.inline-related',
|
||||
stop : function(event, ui)
|
||||
|
||||
@@ -6,6 +6,10 @@ jQuery(function($){
|
||||
$('.tabular.inline-related').sortable({
|
||||
axis : 'y',
|
||||
containment : 'parent',
|
||||
create: function(event, ui)
|
||||
{
|
||||
$('td.delete :checkbox').unbind();
|
||||
},
|
||||
tolerance : 'pointer',
|
||||
items : 'tr:not(.add-row)',
|
||||
stop : function(event, ui)
|
||||
|
||||
Reference in New Issue
Block a user