Poprawione tooltipy i skróty klawiszowe.
[redakcja.git] / apps / toolbar / templates / toolbar / toolbar.html
index 2e61288..29528c1 100644 (file)
@@ -1,18 +1,31 @@
-<div id="toolbar">
-    <ol id="toolbar-tabs">
+{% load toolbar_tags %}
+<div class="toolbar" xmlns:ui="http://nowoczesnapolska.org.pl/platforma/ui">
+    
+    <div class="toolbar-tabs-container">
+    <p>
         {% for group in groups %}
-        <li p:button-list="{{ group.slug }}">{{ group.name }}</li>
+        <button ui:group="{{ group.slug }}" {% if forloop.first %}class="active"{% endif %}>
+            {{ group.name }}
+        </button>
         {% endfor %}
-    </ol>
-    <div style="clear: both; height: 0; width: 0">&nbsp;</div>
-    <div id="toolbar-buttons">
-        {% for group in groups %}
-        <ol id="{{ group.slug }}" style="display:none">
+    </p>
+    </div>
+
+    <div class="toolbar-button-groups-container">
+        {% for group in groups %}        
+        <p ui:group="{{group.slug}}" class="toolbar-buttons-container" {% if not forloop.first %}style="display:none;"{% endif %}>
+            {# buttons for this group #}            
             {% for button in group.button_set.all %}
-            <li p:tag="{{ button.slug }}" {% if button.key %}p:key="{{ button.key }}"{% endif %}>{{ button.label }}</li>
+            <button type="button" 
+                ui:action="{{ button.scriptlet.name }}"
+                ui:action-params="{{ button.params|escape }}"
+                {% if button.key %}ui:hotkey="{{ button.key|keycode }}"{% endif %} 
+                {% if button.tooltip %}ui:tooltip="{{ button.tooltip }}"{% endif %} >
+            {{ button.label }}
+            </button>
             {% endfor %}
-        </ol>
+        </p>
         {% endfor %}
-        <div style="clear: both; height: 0; width: 0">&nbsp;</div>
     </div>
-</div>
\ No newline at end of file
+
+</div>