2012-03-12 11:40:43 +01:00
|
|
|
(function($) {
|
|
|
|
|
|
|
|
$.entwine('ss', function($){
|
|
|
|
|
|
|
|
$('.cms-tree').entwine({
|
|
|
|
getTreeConfig: function() {
|
|
|
|
var config = this._super();
|
|
|
|
config.plugins.push('contextmenu');
|
|
|
|
config.contextmenu = {
|
|
|
|
'items': {
|
|
|
|
'create': null,
|
|
|
|
"rename": null,
|
|
|
|
"remove": null,
|
|
|
|
"ccp": null,
|
2012-03-12 11:48:44 +01:00
|
|
|
'edit': {
|
|
|
|
'label': ss.i18n._t('Tree.EditPage'),
|
|
|
|
'action': function(obj) {
|
|
|
|
// TODO Fix hardcoding of link
|
|
|
|
$('.cms-container').loadPanel('admin/page/edit/show/' + obj.data('id'));
|
|
|
|
}
|
|
|
|
},
|
2012-03-12 11:40:43 +01:00
|
|
|
'addsubpage': {
|
|
|
|
'label': ss.i18n._t('Tree.AddSubPage'),
|
|
|
|
'action': function(obj) {
|
|
|
|
// TODO Fix hardcoding of link
|
|
|
|
$('.cms-container').loadPanel('admin/page/add/?ParentID=' + obj.data('id'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
return config;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}(jQuery));
|