mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
commit
4e5e88ef2d
@ -3,26 +3,25 @@
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
/**
|
||||
* Delete selected folders through "batch actions" tab.
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
$('#Form_BatchActionsForm').entwine('ss').register(
|
||||
// TODO Hardcoding of base URL
|
||||
'admin/assets/batchactions/delete',
|
||||
function(ids) {
|
||||
var confirmed = confirm(
|
||||
ss.i18n.sprintf(
|
||||
ss.i18n._t('AssetAdmin.BATCHACTIONSDELETECONFIRM'),
|
||||
ids.length
|
||||
)
|
||||
);
|
||||
return (confirmed) ? ids : false;
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$.entwine('ss', function($){
|
||||
/**
|
||||
* Delete selected folders through "batch actions" tab.
|
||||
*/
|
||||
$(document).ready(function() {
|
||||
$('#Form_BatchActionsForm').register(
|
||||
// TODO Hardcoding of base URL
|
||||
'admin/assets/batchactions/delete',
|
||||
function(ids) {
|
||||
var confirmed = confirm(
|
||||
ss.i18n.sprintf(
|
||||
ss.i18n._t('AssetAdmin.BATCHACTIONSDELETECONFIRM'),
|
||||
ids.length
|
||||
)
|
||||
);
|
||||
return (confirmed) ? ids : false;
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
/**
|
||||
* Load folder detail view via controller methods
|
||||
@ -120,4 +119,4 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
}(jQuery));
|
||||
}(jQuery));
|
||||
|
@ -46,6 +46,7 @@
|
||||
self.updateTypeList();
|
||||
});
|
||||
this.updateTypeList();
|
||||
this._super();
|
||||
},
|
||||
|
||||
/**
|
||||
@ -106,4 +107,4 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
}(jQuery));
|
||||
}(jQuery));
|
||||
|
@ -1,6 +1,6 @@
|
||||
(function($) {
|
||||
|
||||
$.entwine('ss', function($){
|
||||
$.entwine('ss.tree', function($){
|
||||
$('.cms-tree').entwine({
|
||||
getTreeConfig: function() {
|
||||
var self = this, config = this._super(), hints = this.getHints();
|
||||
@ -18,7 +18,7 @@
|
||||
'label': '<span class="jstree-pageicon"></span>' + val.ssname,
|
||||
'_class': 'class-' + val.pagetype,
|
||||
'action': function(obj) {
|
||||
$('.cms-container').loadPanel(ss.i18n.sprintf(
|
||||
$('.cms-container').entwine('.ss').loadPanel(ss.i18n.sprintf(
|
||||
self.data('urlAddpage'), id, val.pagetype
|
||||
));
|
||||
}
|
||||
@ -30,7 +30,7 @@
|
||||
'edit': {
|
||||
'label': ss.i18n._t('Tree.EditPage'),
|
||||
'action': function(obj) {
|
||||
$('.cms-container').loadPanel(ss.i18n.sprintf(
|
||||
$('.cms-container').entwine('.ss').loadPanel(ss.i18n.sprintf(
|
||||
self.data('urlEditpage'), obj.data('id')
|
||||
));
|
||||
}
|
||||
@ -41,7 +41,7 @@
|
||||
menuitems['addsubpage'] = {
|
||||
'label': ss.i18n._t('Tree.AddSubPage'),
|
||||
'action': function(obj) {
|
||||
$('.cms-container').loadPanel(ss.i18n.sprintf(
|
||||
$('.cms-container').entwine('.ss').loadPanel(ss.i18n.sprintf(
|
||||
self.data('urlAddpage'), id, 'Page'
|
||||
));
|
||||
},
|
||||
@ -56,4 +56,4 @@
|
||||
});
|
||||
});
|
||||
|
||||
}(jQuery));
|
||||
}(jQuery));
|
||||
|
@ -2,7 +2,7 @@
|
||||
* File: ReportAdmin.Tree.js
|
||||
*/
|
||||
(function($) {
|
||||
$.entwine('ss', function($){
|
||||
$.entwine('ss.tree', function($){
|
||||
/**
|
||||
* Class: .cms-tree
|
||||
*
|
||||
@ -14,8 +14,11 @@
|
||||
var id = $('.cms-edit-form :input[name=ID]').val();
|
||||
if (id) this[0].setCurrentByIdx(id);
|
||||
|
||||
this._super();
|
||||
},
|
||||
onunmatch: function() {
|
||||
this._super();
|
||||
}
|
||||
});
|
||||
});
|
||||
}(jQuery));
|
||||
}(jQuery));
|
||||
|
Loading…
Reference in New Issue
Block a user