mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX: Fixed add page context menu, replacing references to .pagetype with .ssclass. (#7398)
This commit is contained in:
parent
808819ec3b
commit
b6ca328494
@ -7,6 +7,7 @@
|
|||||||
config.plugins.push('contextmenu');
|
config.plugins.push('contextmenu');
|
||||||
config.contextmenu = {
|
config.contextmenu = {
|
||||||
'items': function(node) {
|
'items': function(node) {
|
||||||
|
|
||||||
// Build a list for allowed children as submenu entries
|
// Build a list for allowed children as submenu entries
|
||||||
var pagetype = node.data('pagetype');
|
var pagetype = node.data('pagetype');
|
||||||
var id = node.data('id');
|
var id = node.data('id');
|
||||||
@ -16,10 +17,10 @@
|
|||||||
function(key, val){
|
function(key, val){
|
||||||
allowedChildren["allowedchildren-" + key ] = {
|
allowedChildren["allowedchildren-" + key ] = {
|
||||||
'label': '<span class="jstree-pageicon"></span>' + val.ssname,
|
'label': '<span class="jstree-pageicon"></span>' + val.ssname,
|
||||||
'_class': 'class-' + val.pagetype,
|
'_class': 'class-' + val.ssclass,
|
||||||
'action': function(obj) {
|
'action': function(obj) {
|
||||||
$('.cms-container').entwine('.ss').loadPanel(ss.i18n.sprintf(
|
$('.cms-container').entwine('.ss').loadPanel(ss.i18n.sprintf(
|
||||||
self.data('urlAddpage'), id, val.pagetype
|
self.data('urlAddpage'), id, val.ssclass
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user