Skip to content

Commit

Permalink
Add dir/file name in context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruslan-Aleev committed Aug 7, 2023
1 parent 69a7d6d commit 4f83dca
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions manager/assets/modext/widgets/system/modx.tree.directory.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,19 @@ Ext.extend(MODx.tree.Directory,MODx.tree.Tree,{
,_showContextMenu: function(node,e) {
this.cm.activeNode = node;
this.cm.removeAll();
var m;
var m = [];

m.push({
text: '<b>'+node.attributes.text+'</b>'
,handler: function() {return false;}
,header: true
});
m.push('-');

if (node.isRoot) {
m = this.getRootMenu(node);
m = m.concat(this.getRootMenu(node));
} else if (node.attributes.menu && node.attributes.menu.items) {
m = node.attributes.menu.items;
m = m.concat(node.attributes.menu.items);
}

if (m && m.length > 0) {
Expand Down

0 comments on commit 4f83dca

Please sign in to comment.