From 909cf19980600796cc04e1eaa46aea8dc2f89d4b Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 19 Mar 2013 21:24:05 +0100 Subject: [PATCH] review the hide/show toggle areas to use tooltips --- trash/templates/view-tab.html | 7 ++++++- unfold/js/init-all-plugins.js | 7 ++++--- unfold/templates/plugin.html | 11 ++++------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/trash/templates/view-tab.html b/trash/templates/view-tab.html index 87a94e0c..e497523b 100644 --- a/trash/templates/view-tab.html +++ b/trash/templates/view-tab.html @@ -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 %}
-
a sample of the 'well' class quis nostrud exerci tation
+
a sample of the 'well' class quis nostrud exercitation
+ +a first attempt with tooltips
{{ lorem }} Lorem ipsum dolor counter += 1 diff --git a/unfold/js/init-all-plugins.js b/unfold/js/init-all-plugins.js index 53f0aaf4..735abba9 100644 --- a/unfold/js/init-all-plugins.js +++ b/unfold/js/init-all-plugins.js @@ -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'}); }); +}) diff --git a/unfold/templates/plugin.html b/unfold/templates/plugin.html index 171961ec..7d36d10c 100644 --- a/unfold/templates/plugin.html +++ b/unfold/templates/plugin.html @@ -2,13 +2,10 @@ {% if visible %}
{% if togglable %} - {% if not toggled %} -

{{ title }} ({{ classname }})

- - {% else %} - -

{{ title }} ({{ classname }})

- {% endif %}{# toggled #} + + {% endif %}{# togglable #} {% endif %}{# visible #} -- 2.43.0