* and configure their behaviour
*/
$(document).ready(function() {
+ window.console.log("Setting plugin toggle behaviour");
$('.plugin-hide').each(function() {
+ window.console.log("Setting plugin toggle behaviour on hide "+$(this).attr('id'));
$(this).click(function () {
+ window.console.log("click on a HIDE button");
var plugin='#'+$(this).attr('id').replace('hide-','');
var show='#'+$(this).attr('id').replace('hide-','show-');
jQuery(plugin).hide(); jQuery(show).show(); $(this).hide();});
})
$('.plugin-show').each(function() {
+ window.console.log("Setting plugin toggle behaviour on show "+$(this).attr('id'));
$(this).click(function () {
+ window.console.log("click on a SHOW button");
var plugin='#'+$(this).attr('id').replace('show-','');
var hide='#'+$(this).attr('id').replace('show-','hide-');
jQuery(plugin).show(); jQuery(hide).show(); $(this).hide();});
<div class='plugin-toggle' id='toggle-{{ domid }}'>
{% if togglable %}
{% if not toggled %}
-<p id='show-{{ domid }}' class='plugin-show'><a href='#'><span>» Show {{ classname }} "{{ title }}"</span></a></p>
-<p id='hide-{{ domid }}' class='plugin-hide' style='display:none;'><a href='#'><span>« Hide {{ classname }} "{{ title }}"</span></a></p>
+<p id='show-{{ domid }}' class='plugin-show'><i class="icon-hand-right"></i> Show {{ title }} ({{ classname }})</p>
+<p id='hide-{{ domid }}' class='plugin-hide' style='display:none;'><i class="icon-hand-down"></i> Hide {{ title }} ({{ classname }})</p>
{% else %}
-<p id='show-{{ domid }}' class='plugin-show' style='display:none;'><a href='#'><span>» Show {{ classname }} "{{ title }}"</span></a></p>
-<p id='hide-{{ domid }}' class='plugin-hide'><a href='#'><span>« Hide {{ classname }} "{{ title }}"</span></a></p>
+<p id='show-{{ domid }}' class='plugin-show' style='display:none;'><i class="icon-hand-right"></i> Show {{ title }} ({{ classname }})</p>
+<p id='hide-{{ domid }}' class='plugin-hide'><i class="icon-hand-down"></i> Hide {{ title }} ({{ classname }})</p>
{% endif %}{# toggled #}
{% endif %}{# togglable #}
{% endif %}{# visible #}
-<div class='plugin {{ classname }}' id='{{ domid }}' {% if not toggled %}style='display:none;'{% endif %}>
+<div class='plugin {{ classname }}' id='{{ domid }}'{% if not toggled %} style='display:none;'{% endif %}>
{{ plugin_content|safe }}
</div><!--plugin {{ classname }}{{ domid }}-->
<div id='div-{{ domid }}'>
{% for son in sons %}
-<h3>{{ son.title }}</h3>
+{#<h3>{{ son.title }}</h3>#}
<div id='tab-{{ son.domid }}'>
{{ son.rendered }}
</div>