1/**
2 * Right Context Menu local configuration -- RENAME THIS FILE TO contextmenu.local.js --
3 * How to change:
4 *  - Rename this file to contextmenu.local.js
5 *  - Make in this file your modifications
6 *  - and go to the Configuration Manager and save the config again (this clears the cached javascript)
7 *
8 * See for information about available variables, menu structure, override and adding menu entries in the scripts/contextmenu.js
9 */
10
11/**
12 * Right Context Menu configuration for all users:
13 */
14if (!indexmenu_contextmenu['all']['pg']) indexmenu_contextmenu['all']['pg'] = {'view': [] };
15if (!indexmenu_contextmenu['all']['ns']) indexmenu_contextmenu['all']['ns'] = {'view': [] };
16
17
18// Override title of page menu
19//indexmenu_contextmenu['all']['pg']['view'][0] = ['Custom Title'];
20
21// add option to page menu
22//indexmenu_contextmenu['all']['pg']['view'].splice(1, 0, ['Input new page', '"javascript: IndexmenuContextmenu.reqpage(\'"+index.config.urlbase+"\',\'"+index.config.sepchar+"\',\'"+node.dokuid+"\');"']);
23
24
25if (JSINFO && JSINFO.isadmin) {
26    if (!indexmenu_contextmenu['pg']) indexmenu_contextmenu['pg'] = {'view': []};
27    if (!indexmenu_contextmenu['ns']) indexmenu_contextmenu['ns'] = {'view': []};
28    /**
29     * Right Context Menu configuration for admin users:
30     */
31
32    //override or add here the menu entries for admin, see for examples above
33
34
35} else if (JSINFO && JSINFO.isauth) {
36    if (!indexmenu_contextmenu['pg']) indexmenu_contextmenu['pg'] = {'view': []};
37    if (!indexmenu_contextmenu['ns']) indexmenu_contextmenu['ns'] = {'view': []};
38    /**
39     * Right Context Menu configuration for authenticated users:
40     */
41
42    //override or add here the menu entries for authenticated users, see for examples above
43
44}
45
46/**
47 * Common available functions:
48 *
49 * Some common functions are added by [indexmenu plugin folder]/scripts/contextmenu.js
50 *  - IndexmenuContextmenu.srchpage(urlbase, sepchar, isdir, dokuid)
51 *  - IndexmenuContextmenu.getid(urlbase, dokuid)
52 *  - IndexmenuContextmenu.reqpage(urlbase, sepchar, dokuid, pagename)
53 *  - IndexmenuContextmenu.insertTags(dokuid, sepchar)
54 *
55 * Insert your custom functions (available for all users) at the bottom of this file.
56 */
57
58/**
59 * Random Example function do something
60 *
61 * @param {string}   id
62 * @param {Boolean}  isdir
63 * @return {*} ...
64 */
65/*
66function indexmenu_custom_dosomething(a, isdir) {
67   //do something
68   return false;
69}
70*/
71