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([
makeMenu: function(info) {
var menu = this._filterMenu(this.handlersBase, info);
// need the open with menu?
if (menu.open) {
if (!info.data) { // nothing directly hit (just in a folder)
var n, p = info.pathBase.split("/");
while(!n && p)
n = p.pop();
info.pathBase = p.join("/");
info.data = {
root: n,
name: n,
ext: "",
type: "d",
};
}
var openMenu = this._filterMenu(this.handlersOpen, info);
if (Object.keys(openMenu).length > 1) {
if (Object.keys(openMenu).length > 1)
menu.openWith = {
label: "Open with ...",
iconClass: "fa-file",
position: 5,
items: openMenu,
};
}
}
// add divider
menu.divider1 = {divider: true, position: 10};
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