MDL-59425 themes: Expose navigation node properties in boost flat nav
authorAlexander Bias <alexander.bias@uni-ulm.de>
Mon, 17 Jul 2017 08:45:39 +0000 (10:45 +0200)
committerAlexander Bias <alexander.bias@uni-ulm.de>
Mon, 17 Jul 2017 08:46:45 +0000 (10:46 +0200)
theme/boost/templates/flat_navigation.mustache
theme/upgrade.txt

index e1aab02..88d1338 100644 (file)
@@ -62,7 +62,7 @@
 <nav class="list-group m-t-1">
     {{/showdivider}}
     {{#action}}
-    <a class="list-group-item list-group-item-action {{#isactive}}font-weight-bold{{/isactive}}" href="{{{action}}}" data-key="{{key}}">
+    <a class="list-group-item list-group-item-action {{#isactive}}font-weight-bold{{/isactive}}" href="{{{action}}}" data-key="{{key}}" data-isexpandable="{{isexpandable}}" data-indent="{{get_indent}}" data-showdivider="{{showdivider}}" data-type="{{type}}" data-nodetype="{{nodetype}}" data-collapse="{{collapse}}" data-forceopen="{{forceopen}}" data-isactive="{{isactive}}" data-hidden="{{hidden}}" data-preceedwithhr="{{preceedwithhr}}" {{#parent.key}}data-parent-key="{{.}}"{{/parent.key}}>
         <div class="m-l-{{get_indent}}">
             {{#is_section}}
                 <div class="media">
@@ -79,7 +79,7 @@
     </a>
     {{/action}}
     {{^action}}
-    <div class="list-group-item" data-key="{{key}}">
+    <div class="list-group-item" data-key="{{key}}" data-isexpandable="{{isexpandable}}" data-indent="{{get_indent}}" data-showdivider="{{showdivider}}" data-type="{{type}}" data-nodetype="{{nodetype}}" data-collapse="{{collapse}}" data-forceopen="{{forceopen}}" data-isactive="{{isactive}}" data-hidden="{{hidden}}" data-preceedwithhr="{{preceedwithhr}}" {{#parent.key}}data-parent-key="{{.}}"{{/parent.key}}>
         <div class="m-l-{{get_indent}}">
             {{#is_section}}
                 {{#pix}}i/folder{{/pix}}
index af4ff66..c610f39 100644 (file)
@@ -1,6 +1,11 @@
 This files describes API changes in /theme/* themes,
 information provided here is intended especially for theme designer.
 
+=== 3.4 ===
+
+* The Boost flat navigation nodes now have several data-attributes which let plugin developers
+  access properties from the underlying navigation nodes in the browser - see MDL-59425.
+
 === 3.3 ===
 
 * As boost-based themes no longer use the moodle-core-popuphelp help popups, the javascript