Commit 87691966 authored by Benjamin Fischer's avatar Benjamin Fischer
Browse files

FileManager: contextmenu for folder backdrop has open actions for it

parent 007027cc
...@@ -23,17 +23,26 @@ define([ ...@@ -23,17 +23,26 @@ define([
makeMenu: function(info) { makeMenu: function(info) {
var menu = this._filterMenu(this.handlersBase, info); var menu = this._filterMenu(this.handlersBase, info);
// need the open with menu? // need the open with menu?
if (menu.open) { if (!info.data) { // nothing directly hit (just in a folder)
var openMenu = this._filterMenu(this.handlersOpen, info); var n, p = info.pathBase.split("/");
if (Object.keys(openMenu).length > 1) { while(!n && p)
menu.openWith = { n = p.pop();
label: "Open with ...", info.pathBase = p.join("/");
iconClass: "fa-file", info.data = {
position: 5, root: n,
items: openMenu, name: n,
}; ext: "",
} type: "d",
};
} }
var openMenu = this._filterMenu(this.handlersOpen, info);
if (Object.keys(openMenu).length > 1)
menu.openWith = {
label: "Open with ...",
iconClass: "fa-file",
position: 5,
items: openMenu,
};
// add divider // add divider
menu.divider1 = {divider: true, position: 10}; menu.divider1 = {divider: true, position: 10};
menu.divider2 = {divider: true, position: 100}; menu.divider2 = {divider: true, position: 100};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment