MINOR Correct confirmation message when deleting files (#6975)

This commit is contained in:
Ingo Schommer 2012-03-09 21:12:22 +01:00
parent 463ee0c5f7
commit 059137290f

View File

@ -47,7 +47,13 @@
$('.AssetAdmin.cms-edit-form .action.gridfield-button-delete').entwine({
onclick: function(e) {
if(!confirm(ss.i18n._t('AssetAdmin.ConfirmDelete'))) return false;
var msg;
if(this.closest('.ss-gridfield-item').data('class') == 'Folder') {
msg = ss.i18n._t('AssetAdmin.ConfirmDelete');
} else {
msg = ss.i18n._t('TABLEFIELD.DELETECONFIRMMESSAGE');
}
if(!confirm(msg)) return false;
this.getGridField().reload({data: [{name: this.attr('name'), value: this.val()}]});
e.preventDefault();
@ -57,7 +63,7 @@
$('.AssetAdmin.cms-edit-form :submit[name=action_delete]').entwine({
onclick: function(e) {
if(!confirm(ss.i18n._t('AssetAdmin.ConfirmDelete'))) return false;
if(!confirm(ss.i18n._t('AssetAdmin.ConfirmDelete'))) return false;
else this._super(e);
}
});