2 <div class='plugin-manage'>
5 <p id='show-{{ uuid }}' class='plugin-show'><a href='#'><span>» Show {{ title }}</span></a></p>
6 <p id='hide-{{ uuid }}' class='plugin-hide' style='display:none;'><a href='#'><span>« Hide {{ title }}</span></a></p>
8 <p id='show-{{ uuid }}' class='plugin-show' style='display:none;'><a href='#'><span>» Show {{ title }}</span></a></p>
9 <p id='hide-{{ uuid }}' class='plugin-hide'><a href='#'><span>« Hide {{ title }}</span></a></p>
14 <div class='plugin {{ title }}' id='plugin-{{ uuid }}'>
15 {{ plugin_content|safe }}
16 </div><!--plugin {{ title }}-->
22 {% insert prelude_js %}
23 {% if visible and hidable %}
24 {# xxx sounds like this could be optimized by a single call performed on document.ready #}
25 {# that would do that on all DOM elements that require it #}
27 /* Show / hide plugin */
28 jQuery('#show_{{ uuid }}').click(function() {
29 jQuery('#{{ uuid }}').show();
30 if (typeof jQuery('#{{ uuid }}').{{ title }} != 'undefined') {
31 jQuery('#{{ uuid }}').{{ title }}('show');
33 jQuery('#hide_{{ uuid }}').show();
34 jQuery('#show_{{ uuid }}').hide();
35 event.preventDefault();
37 jQuery('#hide_{{ uuid }}').click(function() {
38 jQuery('#{{ uuid }}').hide();
39 jQuery('#hide_{{ uuid }}').hide();
40 jQuery('#show_{{ uuid }}').show();
41 event.preventDefault();
44 jQuery('#{{ uuid }}').hide()
47 /* Plugin initialization (if the plugin has the right structure) - from plugin.php */
48 if (typeof jQuery('#{{ uuid }}').$title != 'undefined') {
49 jQuery('#{{ uuid }}').$title({ {{ settings }} plugin_uuid: '{{ uuid }}' });
50 //jQuery('#{{ uuid }}').$title('show');