Reordering with unsaved inlines is faulty and counter intuitive.
In this commit I added a javascript alert that prompts the user to save their changes before reordering if unsaved inlines are detected. Please review and let me know if this in compliance with your guidelines.
This commit is contained in:
@@ -16,6 +16,12 @@
|
||||
items : '.inline-related',
|
||||
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('.inline-related').each(function(i)
|
||||
{
|
||||
|
||||
@@ -16,6 +16,12 @@
|
||||
items : 'tr:not(.add-row)',
|
||||
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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user