You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

71 lines
2.4 KiB

  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. * Right Context Menu configuration for all users:
  12. */
  13. if (!indexmenu_contextmenu['all']['pg']) indexmenu_contextmenu['all']['pg'] = {'view': [] };
  14. if (!indexmenu_contextmenu['all']['ns']) indexmenu_contextmenu['all']['ns'] = {'view': [] };
  15. // Override title of page menu
  16. //indexmenu_contextmenu['all']['pg']['view'][0] = ['Custom Title'];
  17. // add option to page menu
  18. //indexmenu_contextmenu['all']['pg']['view'].splice(1, 0, ['Input new page', '"javascript: IndexmenuContextmenu.reqpage(\'"+index.config.urlbase+"\',\'"+index.config.sepchar+"\',\'"+node.dokuid+"\');"']);
  19. if (JSINFO && JSINFO.isadmin) {
  20. if (!indexmenu_contextmenu['pg']) indexmenu_contextmenu['pg'] = {'view': []};
  21. if (!indexmenu_contextmenu['ns']) indexmenu_contextmenu['ns'] = {'view': []};
  22. /**
  23. * Right Context Menu configuration for admin users:
  24. */
  25. //override or add here the menu entries for admin, see for examples above
  26. } else if (JSINFO && JSINFO.isauth) {
  27. if (!indexmenu_contextmenu['pg']) indexmenu_contextmenu['pg'] = {'view': []};
  28. if (!indexmenu_contextmenu['ns']) indexmenu_contextmenu['ns'] = {'view': []};
  29. /**
  30. * Right Context Menu configuration for authenticated users:
  31. */
  32. //override or add here the menu entries for authenticated users, see for examples above
  33. }
  34. /**
  35. * Common available functions:
  36. *
  37. * Some common functions are added by [indexmenu plugin folder]/scripts/contextmenu.js
  38. * - IndexmenuContextmenu.srchpage(urlbase, sepchar, isdir, dokuid)
  39. * - IndexmenuContextmenu.getid(urlbase, dokuid)
  40. * - IndexmenuContextmenu.reqpage(urlbase, sepchar, dokuid, pagename)
  41. * - IndexmenuContextmenu.insertTags(dokuid, sepchar)
  42. *
  43. * Insert your custom functions (available for all users) at the bottom of this file.
  44. */
  45. /**
  46. * Random Example function do something
  47. *
  48. * @param {string} id
  49. * @param {Boolean} isdir
  50. * @return {*} ...
  51. */
  52. /*
  53. function indexmenu_custom_dosomething(a, isdir) {
  54. //do something
  55. return false;
  56. }
  57. */