mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Custom confirm message for deleting folders in AssetAdmin
This commit is contained in:
parent
c582f08ea3
commit
7574c3177d
@ -24,8 +24,15 @@
|
||||
|
||||
$.entwine('ss', function($){
|
||||
|
||||
/**
|
||||
* Load folder detail view via controller methods
|
||||
* rather than built-in GridField view (which is only geared towards showing files).
|
||||
*/
|
||||
$('#Form_EditForm_File .ss-gridfield-item').entwine({
|
||||
onclick: function(e) {
|
||||
// Let actions do their own thing
|
||||
if($(e.target).is('.action')) return;
|
||||
|
||||
var grid = this.closest('.ss-gridfield');
|
||||
if(this.data('class') == 'Folder') {
|
||||
var url = grid.data('urlFolderTemplate').replace('%s', this.data('id'));
|
||||
@ -34,7 +41,14 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('.cms-edit-form :submit[name=action_delete]').entwine({
|
||||
onclick: function(e) {
|
||||
if(!confirm(ss.i18n._t('AssetAdmin.ConfirmDelete'))) return false;
|
||||
else this._super(e);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Class: #Form_SyncForm
|
||||
*/
|
||||
|
@ -34,6 +34,7 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
|
||||
'AssetTableField.MOVING': 'Moving %s file(s)',
|
||||
'SecurityAdmin.BATCHACTIONSDELETECONFIRM': "Do you really want to delete %s groups?",
|
||||
'CMSMAIN.AddSearchCriteria': 'Add Criteria',
|
||||
'WidgetAreaEditor.TOOMANY': 'Sorry, you have reached the maximum number of widgets in this area'
|
||||
'WidgetAreaEditor.TOOMANY': 'Sorry, you have reached the maximum number of widgets in this area',
|
||||
'AssetAdmin.ConfirmDelete': 'Do you really want to delete this folder and all contained files?'
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user