Sidebar-Sitemap.js 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. (function()
  2. {
  3. // Adds Sitemap shapes
  4. Sidebar.prototype.addSitemapPalette = function()
  5. {
  6. var s = 'html=1;whiteSpace=wrap;strokeColor=none;fillColor=#0079D6;labelPosition=center;verticalLabelPosition=middle;verticalAlign=top;align=center;fontSize=12;outlineConnect=0;spacingTop=-6;fontColor=#FFFFFF;sketch=0;shape=mxgraph.sitemap.';
  7. // Space savers
  8. var sb = this;
  9. var gn = 'mxgraph.sitemap';
  10. var dt = '';
  11. var scale = 0.2;
  12. var w = 600 * scale;
  13. var h = 350 * scale;
  14. this.setCurrentSearchEntryLibrary('sitemap');
  15. var fns =
  16. [
  17. this.createVertexTemplateEntry(s + 'page;',
  18. w, h, 'Page', 'Page', null, null, this.getTagsForStencil(gn, 'page', dt).join(' ')),
  19. this.createVertexTemplateEntry(s + 'about_us;',
  20. w, h, 'About us', 'About us', null, null, this.getTagsForStencil(gn, 'about', dt).join(' ')),
  21. this.createVertexTemplateEntry(s + 'audio;',
  22. w, h, 'Audio', 'Audio', null, null, this.getTagsForStencil(gn, 'audio', dt).join(' ')),
  23. this.createVertexTemplateEntry(s + 'biography;',
  24. w, h, 'Biography', 'Biography', null, null, this.getTagsForStencil(gn, 'biography', dt).join(' ')),
  25. this.createVertexTemplateEntry(s + 'blog;',
  26. w, h, 'Blog', 'Blog', null, null, this.getTagsForStencil(gn, 'blog', dt).join(' ')),
  27. this.createVertexTemplateEntry(s + 'calendar;',
  28. w, h, 'Calendar', 'Calendar', null, null, this.getTagsForStencil(gn, 'calendar', dt).join(' ')),
  29. this.createVertexTemplateEntry(s + 'chart;',
  30. w, h, 'Chart', 'Chart', null, null, this.getTagsForStencil(gn, 'chart', dt).join(' ')),
  31. this.createVertexTemplateEntry(s + 'chat;',
  32. w, h, 'Chat', 'Chat', null, null, this.getTagsForStencil(gn, 'chat', dt).join(' ')),
  33. this.createVertexTemplateEntry(s + 'cloud;',
  34. w, h, 'Cloud', 'Cloud', null, null, this.getTagsForStencil(gn, 'cloud', dt).join(' ')),
  35. this.createVertexTemplateEntry(s + 'contact;',
  36. w, h, 'Contact', 'Contact', null, null, this.getTagsForStencil(gn, 'contact', dt).join(' ')),
  37. this.createVertexTemplateEntry(s + 'contact_us;',
  38. w, h, 'Contact us', 'Contact us', null, null, this.getTagsForStencil(gn, 'contact', dt).join(' ')),
  39. this.createVertexTemplateEntry(s + 'document;',
  40. w, h, 'Document', 'Document', null, null, this.getTagsForStencil(gn, 'document', dt).join(' ')),
  41. this.createVertexTemplateEntry(s + 'download;',
  42. w, h, 'Download', 'Download', null, null, this.getTagsForStencil(gn, 'download', dt).join(' ')),
  43. this.createVertexTemplateEntry(s + 'error;',
  44. w, h, 'Error', 'Error', null, null, this.getTagsForStencil(gn, 'error', dt).join(' ')),
  45. this.createVertexTemplateEntry(s + 'faq;',
  46. w, h, 'FAQ', 'FAQ', null, null, this.getTagsForStencil(gn, 'faq frequently asked questions', dt).join(' ')),
  47. this.createVertexTemplateEntry(s + 'form;',
  48. w, h, 'Form', 'Form', null, null, this.getTagsForStencil(gn, 'form', dt).join(' ')),
  49. this.createVertexTemplateEntry(s + 'gallery;',
  50. w, h, 'Gallery', 'Gallery', null, null, this.getTagsForStencil(gn, 'gallery', dt).join(' ')),
  51. this.createVertexTemplateEntry(s + 'game;',
  52. w, h, 'Game', 'Game', null, null, this.getTagsForStencil(gn, 'game', dt).join(' ')),
  53. this.createVertexTemplateEntry(s + 'home;',
  54. w, h, 'Home', 'Home', null, null, this.getTagsForStencil(gn, 'home', dt).join(' ')),
  55. this.createVertexTemplateEntry(s + 'info;',
  56. w, h, 'Info', 'Info', null, null, this.getTagsForStencil(gn, 'info', dt).join(' ')),
  57. this.createVertexTemplateEntry(s + 'jobs;',
  58. w, h, 'Jobs', 'Jobs', null, null, this.getTagsForStencil(gn, 'jobs', dt).join(' ')),
  59. this.createVertexTemplateEntry(s + 'log;',
  60. w, h, 'Log', 'Log', null, null, this.getTagsForStencil(gn, 'log', dt).join(' ')),
  61. this.createVertexTemplateEntry(s + 'login;',
  62. w, h, 'Login', 'Login', null, null, this.getTagsForStencil(gn, 'login', dt).join(' ')),
  63. this.createVertexTemplateEntry(s + 'mail;',
  64. w, h, 'Mail', 'Mail', null, null, this.getTagsForStencil(gn, 'mail', dt).join(' ')),
  65. this.createVertexTemplateEntry(s + 'map;',
  66. w, h, 'Map', 'Map', null, null, this.getTagsForStencil(gn, 'map', dt).join(' ')),
  67. this.createVertexTemplateEntry(s + 'news;',
  68. w, h, 'News', 'News', null, null, this.getTagsForStencil(gn, 'news', dt).join(' ')),
  69. this.createVertexTemplateEntry(s + 'payment;',
  70. w, h, 'Payment', 'Payment', null, null, this.getTagsForStencil(gn, 'payment', dt).join(' ')),
  71. this.createVertexTemplateEntry(s + 'photo;',
  72. w, h, 'Photo', 'Photo', null, null, this.getTagsForStencil(gn, 'photo', dt).join(' ')),
  73. this.createVertexTemplateEntry(s + 'portfolio;',
  74. w, h, 'Portfolio', 'Portfolio', null, null, this.getTagsForStencil(gn, 'portfolio', dt).join(' ')),
  75. this.createVertexTemplateEntry(s + 'post;',
  76. w, h, 'Post', 'Post', null, null, this.getTagsForStencil(gn, 'post', dt).join(' ')),
  77. this.createVertexTemplateEntry(s + 'pricing;',
  78. w, h, 'Pricing', 'Pricing', null, null, this.getTagsForStencil(gn, 'pricing', dt).join(' ')),
  79. this.createVertexTemplateEntry(s + 'print;',
  80. w, h, 'Print', 'Print', null, null, this.getTagsForStencil(gn, 'print', dt).join(' ')),
  81. this.createVertexTemplateEntry(s + 'products;',
  82. w, h, 'Products', 'Products', null, null, this.getTagsForStencil(gn, 'products', dt).join(' ')),
  83. this.createVertexTemplateEntry(s + 'profile;',
  84. w, h, 'Profile', 'Profile', null, null, this.getTagsForStencil(gn, 'profile', dt).join(' ')),
  85. this.createVertexTemplateEntry(s + 'references;',
  86. w, h, 'References', 'References', null, null, this.getTagsForStencil(gn, 'references', dt).join(' ')),
  87. this.createVertexTemplateEntry(s + 'script;',
  88. w, h, 'Script', 'Script', null, null, this.getTagsForStencil(gn, 'script', dt).join(' ')),
  89. this.createVertexTemplateEntry(s + 'search;',
  90. w, h, 'Search', 'Search', null, null, this.getTagsForStencil(gn, 'search', dt).join(' ')),
  91. this.createVertexTemplateEntry(s + 'security;',
  92. w, h, 'Security', 'Security', null, null, this.getTagsForStencil(gn, 'security', dt).join(' ')),
  93. this.createVertexTemplateEntry(s + 'services;',
  94. w, h, 'Services', 'Services', null, null, this.getTagsForStencil(gn, 'services', dt).join(' ')),
  95. this.createVertexTemplateEntry(s + 'settings;',
  96. w, h, 'Settings', 'Settings', null, null, this.getTagsForStencil(gn, 'settings', dt).join(' ')),
  97. this.createVertexTemplateEntry(s + 'shopping;',
  98. w, h, 'Shopping', 'Shopping', null, null, this.getTagsForStencil(gn, 'shopping', dt).join(' ')),
  99. this.createVertexTemplateEntry(s + 'sitemap;',
  100. w, h, 'Sitemap', 'Sitemap', null, null, this.getTagsForStencil(gn, 'sitemap', dt).join(' ')),
  101. this.createVertexTemplateEntry(s + 'slideshow;',
  102. w, h, 'Slideshow', 'Slideshow', null, null, this.getTagsForStencil(gn, 'slideshow', dt).join(' ')),
  103. this.createVertexTemplateEntry(s + 'sports;',
  104. w, h, 'Sports', 'Sports', null, null, this.getTagsForStencil(gn, 'sports', dt).join(' ')),
  105. this.createVertexTemplateEntry(s + 'success;',
  106. w, h, 'Success', 'Success', null, null, this.getTagsForStencil(gn, 'success', dt).join(' ')),
  107. this.createVertexTemplateEntry(s + 'text;',
  108. w, h, 'Text', 'Text', null, null, this.getTagsForStencil(gn, 'text', dt).join(' ')),
  109. this.createVertexTemplateEntry(s + 'upload;',
  110. w, h, 'Upload', 'Upload', null, null, this.getTagsForStencil(gn, 'upload', dt).join(' ')),
  111. this.createVertexTemplateEntry(s + 'user;',
  112. w, h, 'User', 'User', null, null, this.getTagsForStencil(gn, 'user', dt).join(' ')),
  113. this.createVertexTemplateEntry(s + 'video;',
  114. w, h, 'Video', 'Video', null, null, this.getTagsForStencil(gn, 'video', dt).join(' ')),
  115. this.createVertexTemplateEntry(s + 'warning;',
  116. w, h, 'Warning', 'Warning', null, null, this.getTagsForStencil(gn, 'warning', dt).join(' '))
  117. ];
  118. this.addPalette('sitemap', 'Sitemap', false, mxUtils.bind(this, function(content)
  119. {
  120. for (var i = 0; i < fns.length; i++)
  121. {
  122. content.appendChild(fns[i](content));
  123. }
  124. }));
  125. this.setCurrentSearchEntryLibrary();
  126. };
  127. })();