Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b251cc22

Von Sven Schöling vor mehr als 9 Jahren hinzugefügt

  • ID b251cc22f355941217493073e124ba3878d5530f
  • Vorgänger 15b1558e
  • Nachfolger cd306e61

Menüstruktur auf YAML geändert

Unterschiede anzeigen:

templates/webpages/menu/menunew.html
1 1
[%- USE T8 %]
2
[% USE HTML %][%- USE LxERP -%]
2
[%- USE L %]
3
[%- USE HTML %]
4
[%- USE LxERP -%]
3 5
 <div id="main_menu_div"></div>
4

  
5 6
 [%- SET main_id = '100' %]
6 7
 <ul id="main_menu_model"  style='display:none'>
7
 [%- FOREACH mainitem = menu_items %]
8
 [%- FOREACH node = menu.tree %]
9
  [% NEXT UNLESS node.visible %]
8 10
  [%- SET main_id = main_id + 1 %]
9
  <li id="[% main_id %]"[% IF mainitem.image %] itemIcon="[% mainitem.image %]"[% END %]>
10
   <a href="[% IF mainitem.href %][% mainitem.href %][% ELSE %]#[% END %]"[% IF mainitem.target && (mainitem.target != 'main_window') %] target="[% HTML.escape(mainitem.target) %]"[% END %]>
11
    [%- HTML.escape(mainitem.title) %]
12
   </a>
13
   [%- IF mainitem.subitems %]
14
    <ul[%- IF force_ul_width %] width="[% mainitem.max_width * 10 %]"[% END %]>
11
  <li id="[% main_id %]"[% IF icon_path(node.icon) %] itemIcon="[% icon_path(node.icon) %]"[% END %]>
12
   [% L.link(menu.href_for_node(node) || '#', menu.name_for_node(node), target=node.target) %]
13
   [%- IF node.children %]
14
    <ul width="[% max_width(node) %]">
15 15
     [%- SET sub1_id = main_id * 100 %]
16
     [%- FOREACH sub1item = mainitem.subitems %]
16
     [%- FOREACH sub1node = node.children %]
17
      [% NEXT UNLESS sub1node.visible %]
17 18
      [%- SET sub1_id = sub1_id + 1 %]
18
      <li id="[% sub1_id %]"[% IF sub1item.image %] itemIcon="[% sub1item.image %]"[% END %]>
19
       <a href="[% IF sub1item.href %][% sub1item.href %][% ELSE %]#[% END %]"[% IF sub1item.target && (sub1item.target != 'main_window') %] target="[% HTML.escape(sub1item.target) %]"[% END %]>
20
        [%- HTML.escape(sub1item.title) %]
21
       </a>
22
       [%- IF sub1item.subitems %]
23
        <ul[%- IF force_ul_width %] width="[% sub1item.max_width * 10 %]"[% END %]>
19
      <li id="[% sub1_id %]"[% IF icon_path(sub1node.icon) %] itemIcon="[% icon_path(sub1node.icon) %]"[% END %]>
20
       [% L.link(menu.href_for_node(sub1node) || '#', menu.name_for_node(sub1node), target=sub1node.target) %]
21
       [%- IF sub1item.children %]
22
        <ul width="[% max_width(sub1node) %]">
24 23
         [%- SET sub2_id = sub1_id * 100 %]
25
         [%- FOREACH sub2item = sub1item.subitems %]
24
         [%- FOREACH sub2node = sub1node.children %]
25
          [% NEXT UNLESS sub2node.visible %]
26 26
          [%- SET sub2_id = sub2_id + 1 %]
27
          <li id="[% sub2_id %]"[% IF sub2item.image %] itemIcon="[% sub2item.image %]"[% END %]>
28
           <a href="[% IF sub2item.href %][% sub2item.href %][% ELSE %]#[% END %]"[% IF sub2item.target && (sub2item.target != 'main_window') %] target="[% HTML.escape(sub2item.target) %]"[% END %]>
29
            [%- HTML.escape(sub2item.title) %]
30
           </a>
27
          <li id="[% sub2_id %]"[% IF icon_path(sub2item.icon) %] itemIcon="[% icon_path(sub2item.icon) %]"[% END %]>
28
            [% L.link(menu.href_for_node(sub2node) || '#', menu.name_for_node(sub2node), target=sub2node.target) %]
31 29
          </li>
32 30
         [%- END %]
33 31
        </ul>
......
39 37
  </li>
40 38
 [%- END %]
41 39
 </ul>
42

  
43
 <script type="text/javascript">
44
  <!--
45

  
46
$(function(){
47
  DHTMLSuite.createStandardObjects();
48

  
49
  DHTMLSuite.configObj.setImagePath('image/dhtmlsuite/');
50

  
51
  var menu_model = new DHTMLSuite.menuModel();
52
  menu_model.addItemsFromMarkup('main_menu_model');
53
  menu_model.init();
54

  
55
  var menu_bar = new DHTMLSuite.menuBar();
56
  menu_bar.addMenuItems(menu_model);
57
  menu_bar.setTarget('main_menu_div');
58
  menu_bar.init();
59
});
60

  
61

  
62

  
63
function open_url(url, target) {
64

  
65
}
66

  
67
    -->
68
 </script>

Auch abrufbar als: Unified diff