renaming plugin attributes - now uses - visible - togglable - toggled
[myslice.git] / engine / templates / plugin.html
index 650551a..7d5195e 100644 (file)
@@ -1,32 +1,22 @@
 {#<!--begin {{ classname }}{{ name }}{{ uuid }}-->#}
 {% if visible %}
-<div class='plugin-manage' id='{{ name }}'>
-{% if hidable %}
-  {% if hidden %}
+<div class='plugin-toggle' id='{{ name }}'>
+{% if togglable %}
+  {% if not toggled %}
 <p id='show-{{ uuid }}' class='plugin-show'><a href='#'><span>&raquo; Show {{ classname }} "{{ title }}"</span></a></p>
 <p id='hide-{{ uuid }}' class='plugin-hide' style='display:none;'><a href='#'><span>&laquo; Hide {{ classname }} "{{ title }}"</span></a></p>
   {% else %}
 <p id='show-{{ uuid }}' class='plugin-show' style='display:none;'><a href='#'><span>&raquo; Show {{ classname }} "{{ title }}"</span></a></p>
 <p id='hide-{{ uuid }}' class='plugin-hide'><a href='#'><span>&laquo; Hide {{ classname }} "{{ title }}"</span></a></p>
-  {% endif %}
-{% endif %}
-{% endif %}
+  {% endif %}{# toggled #}
+{% endif %}{# togglable #}
+{% endif %}{# visible #}
 
-<div class='plugin {{ classname }}' id='plugin-{{ uuid }}'>
+<div class='plugin {{ classname }}' id='plugin-{{ uuid }}' {% if not toggled %}style='display:none'{% endif %}>
 {{ plugin_content|safe }}
-</div><!--plugin {{ classname }}-->
+</div><!--plugin {{ classname }}{{ name }}{{ uuid }}-->
 
 {% if visible %}
 </div>
-{% endif %}
+{% endif %}{# visible #}
 {#<!--end {{ classname }}{{ name }}{{ uuid }}-->#}
-
-{# Plugin initialization (if the plugin has the right structure) - from plugin.php #}
-{# note: that's the spirit but using {% insert %}  is not reliable enough #}
-{# so for now this doesn't make it back to the browser #}
-{% insert prelude_js %}
-if (typeof jQuery('#{{ uuid }}').$title != 'undefined') {
-  jQuery('#plugin-{{ uuid }}').$title({ {{ settings_json }} plugin_uuid: '{{ uuid }}' });
-  //jQuery('#plugin-{{ uuid }}').$title('show');
-  }; 
-{% endinsert %}