review the hide/show toggle areas to use tooltips
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Tue, 19 Mar 2013 20:24:05 +0000 (21:24 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Tue, 19 Mar 2013 20:24:05 +0000 (21:24 +0100)
trash/templates/view-tab.html
unfold/js/init-all-plugins.js
unfold/templates/plugin.html

index 87a94e0..e497523 100644 (file)
@@ -3,6 +3,9 @@
 {% block content_main %}
 
 {% insert_str prelude "css/sample.css" %}
+{% insert prelude_js %}
+$(function(){console.log('hey!');$('#tooltipid').tooltip({'selector':'','placement':'bottom'});});
+{% endinsert %}
 
 <div id=sample-tabs>
 <ul class="nav nav-tabs" id='foo'>
@@ -22,7 +25,9 @@
 </div>
 
 
-<div class='well'> a sample of the 'well' class quis nostrud exerci tation </div>
+<div class='well'> a sample of the 'well' class quis nostrud exercitation </div>
+
+a first <a id='tooltipid' href="#" data-toggle="tooltip" data-original-title="what the tooltip displays"> attempt with tooltips </a>
 
 <div>
  {{ lorem }}   Lorem <span class='bold'>ipsum dolor</span> <code> counter += 1
index 53f0aaf..735abba 100644 (file)
@@ -7,11 +7,12 @@ $(document).ready(function() {
            var plugin='#'+$(this).attr('id').replace('hide-',''); 
            var show='#'+$(this).attr('id').replace('hide-','show-'); 
            $(plugin).slideUp(); $(show).show(); $(this).hide();});
-       })
+    });
     $('.plugin-show').each(function() {
        $(this).click(function () { 
            var plugin='#'+$(this).attr('id').replace('show-',''); 
            var hide='#'+$(this).attr('id').replace('show-','hide-'); 
            $(plugin).slideDown(); $(hide).show(); $(this).hide();});
-       })
-    })
+    });
+    $('.plugin-tooltip').each(function(){ $(this).tooltip({'selector':'','placement':'right'}); });
+})
index 171961e..7d36d10 100644 (file)
@@ -2,13 +2,10 @@
 {% if visible %}
 <div class='plugin-toggle{% if need_spin %} need-spin{% endif %}' id='toggle-{{ domid }}'>
 {% if togglable %}
-  {% if not toggled %}
-<p id='show-{{ domid }}' class='plugin-show'><i class="icon-hand-right"></i>{{ title }} ({{ classname }})</p>
-<p id='hide-{{ domid }}' class='plugin-hide' style='display:none;'><i class="icon-hand-down"></i>{{ title }} ({{ classname }})</p>
-  {% else %}
-<p id='show-{{ domid }}' class='plugin-show' style='display:none;'><i class="icon-hand-right"></i>{{ title }} ({{ classname }})</p>
-<p id='hide-{{ domid }}' class='plugin-hide'><i class="icon-hand-down"></i>{{ title }} ({{ classname }})</p>
-  {% endif %}{# toggled #}
+<p id='show-{{ domid }}' class='plugin-show'{% if toggled %} style='display:none;'{% endif %}><i class="icon-hand-right"></i>
+<a href='#' class='plugin-tooltip' data-toggle='tooltip' data-original-title='Show plugin "{{ title }}" ({{ classname }})'>{{ title }}</a></p>
+<p id='hide-{{ domid }}' class='plugin-hide'{% if not toggled %} style='display:none;'{% endif %}><i class="icon-hand-down"></i>
+<a href='#' class='plugin-tooltip' data-toggle='tooltip' data-original-title='Hide plugin "{{ title }}" ({{ classname }})'>{{ title }}</a></p>
 {% endif %}{# togglable #}
 {% endif %}{# visible #}