FIX: Added confirmation dialog

This commit is contained in:
Mellisa Hankins 2013-07-11 20:15:30 +10:00
parent 5c1764ad23
commit 3d456d826e
2 changed files with 7 additions and 1 deletions

View File

@ -126,6 +126,11 @@
});
data.records = ids;
if(!confirm(ss.i18n.sprintf(ss.i18n._t('GridFieldBulkTools.ACTION_CONFIRM', 'Are you sure you want to %s %s items?'), action, ids.length))) {
e.preventDefault();
return false;
}
if ( url.indexOf('?') !== -1 ) cacheBuster = '&cacheBuster=' + cacheBuster;
else cacheBuster = '?cacheBuster=' + cacheBuster;

View File

@ -4,6 +4,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
ss.i18n.addDictionary('en_US', {
'GridFieldBulkTools.FINISH_CONFIRM': "You have unsaved changes. Continuing will loose all unsaved data.\n\nDo your really want to continue?",
'GridFieldBulkTools.EDIT_CHANGED': 'Modified',
'GridFieldBulkTools.EDIT_UPDATED': 'Saved'
'GridFieldBulkTools.EDIT_UPDATED': 'Saved',
'GridFieldBulkTools.ACTION_CONFIRM': 'Are you sure you want to %s %s items?'
});
}