Fixed jQuery namespace on inline model JavaScript includes.
Version bump to 1.6.5. Updated readme.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
VERSION = (1, 6, 4) # following PEP 386
|
||||
VERSION = (1, 6, 5) # following PEP 386
|
||||
DEV_N = None
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var sortable_inline_rows = $('.inline-group .inline-related');
|
||||
sortable_inline_rows.addClass('sortable');
|
||||
|
||||
jQuery('.inline-group').sortable({
|
||||
$('.inline-group').sortable({
|
||||
axis : 'y',
|
||||
containment : 'parent',
|
||||
create: function(event, ui) {
|
||||
@@ -21,13 +21,12 @@
|
||||
alert($('#localized_save_before_reorder_message').val());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
var indexes = [];
|
||||
ui.item.parent().children('.inline-related').each(function(i)
|
||||
{
|
||||
var index_value = $(this).find(':hidden[name$="-id"]').val();
|
||||
if (index_value !== "" && index_value !== undefined)
|
||||
{
|
||||
if (index_value !== "" && index_value !== undefined) {
|
||||
indexes.push(index_value);
|
||||
}
|
||||
});
|
||||
@@ -36,8 +35,7 @@
|
||||
url: ui.item.parent().find(':hidden[name="admin_sorting_url"]').val(),
|
||||
type: 'POST',
|
||||
data: { indexes : indexes.join(',') },
|
||||
success: function()
|
||||
{
|
||||
success: function() {
|
||||
ui.item.find('.form-row').effect('highlight', {}, 1000);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -5,29 +5,26 @@
|
||||
{
|
||||
var tabular_inline_rows = $('.tabular table tbody tr');
|
||||
tabular_inline_rows.addClass('sortable');
|
||||
jQuery('.tabular.inline-related').sortable({
|
||||
$('.tabular.inline-related').sortable({
|
||||
axis : 'y',
|
||||
containment : 'parent',
|
||||
create: function(event, ui)
|
||||
{
|
||||
create: function(event, ui) {
|
||||
$('td.delete :checkbox').unbind();
|
||||
},
|
||||
tolerance : 'pointer',
|
||||
items : 'tr:not(.add-row)',
|
||||
stop : function(event, ui)
|
||||
{
|
||||
stop : function(event, ui) {
|
||||
if ($('.inline-deletelink').length > 0) {
|
||||
$(ui.sender).sortable('cancel');
|
||||
alert($('#localized_save_before_reorder_message').val());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
var indexes = [];
|
||||
ui.item.parent().children('tr').each(function(i)
|
||||
{
|
||||
var index_value = $(this).find('.original :hidden:first').val();
|
||||
if (index_value !== '' && index_value !== undefined)
|
||||
{
|
||||
if (index_value !== '' && index_value !== undefined) {
|
||||
indexes.push(index_value);
|
||||
}
|
||||
});
|
||||
@@ -36,8 +33,7 @@
|
||||
url: ui.item.parent().find(':hidden[name="admin_sorting_url"]').val(),
|
||||
type: 'POST',
|
||||
data: { indexes : indexes.join(',') },
|
||||
success: function()
|
||||
{
|
||||
success: function() {
|
||||
//highlight sorted row, then re-stripe table
|
||||
ui.item.effect('highlight', {}, 1000);
|
||||
tabular_inline_rows.removeClass('row1 row2');
|
||||
|
||||
Reference in New Issue
Block a user