add manager for popup entry points
This commit is contained in:
parent
a549cbe76a
commit
ca15164def
4 changed files with 90 additions and 6 deletions
27
scripts/external/entries/menu.js
vendored
Normal file
27
scripts/external/entries/menu.js
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
import Menu from '/scripts/GUI/context_menus.js';
|
||||
import texts from "/scripts/strings/read.js";
|
||||
import ManagedSidebar from "./sidebar.js";
|
||||
|
||||
export default class MenuEntry {
|
||||
/* Create all entries. */
|
||||
constructor() {
|
||||
// Add the context menu.
|
||||
this.menu = new Menu({title: (new texts(`entry_contextMenu`)).localized, contexts: [`all`], event: {"onClicked": MenuEntry.onclick}, hidden: true});
|
||||
};
|
||||
|
||||
/*
|
||||
Enable the sidebar.
|
||||
*/
|
||||
enable () {
|
||||
this.menu.show();
|
||||
}
|
||||
|
||||
/* Disable. */
|
||||
disable () {
|
||||
this.menu.remove();
|
||||
}
|
||||
|
||||
static onclick() {
|
||||
new ManagedSidebar();
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue