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:
1 parent
629bfb058d
commit
818a231a1a
5 files changed
+48
-7
No files matched your search
@@ -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