From: Thierry Parmentelat Date: Mon, 11 Mar 2013 14:03:57 +0000 (+0100) Subject: use class 'need-spin' rather than plugin-toggle to host spins X-Git-Tag: myslice-django-0.1-1~39 X-Git-Url: http://git.onelab.eu/?p=unfold.git;a=commitdiff_plain;h=ed83c34a12ada274e6ac7c17c95a252b57a685a3 use class 'need-spin' rather than plugin-toggle to host spins --- diff --git a/engine/static/js/manifold-async.js b/engine/static/js/manifold-async.js index 75287b27..fe04d893 100644 --- a/engine/static/js/manifold-async.js +++ b/engine/static/js/manifold-async.js @@ -9,7 +9,7 @@ var api_url = '/manifold/api/json/' function manifold_async_exec(queries) { if (manifold_async_debug) console.log('manifold_async_exec length='+ queries.length); // start spinners - jQuery('.plugin-toggle').spin(); + jQuery('.need-spin').spin(); // We use js function closure to be able to pass the query (array) to the // callback function used when data is received @@ -25,12 +25,12 @@ function manifold_async_exec(queries) { }) } -/* +/* not used function manifold_async_error(str) { var out = '

Error

Notice
  • ' + jQuery('
    ').text(str).html() + '
'; jQuery('#manifold_message').html(out); //onObjectAvailable('Spinners', function(){ Spinners.get('.loading').remove(); }, this, true); - jQuery('.plugin-toggle').spin(false); + jQuery('.need-spin').spin(false); } */ diff --git a/engine/templates/plugin.html b/engine/templates/plugin.html index d4b5cf1d..19e0b8b0 100644 --- a/engine/templates/plugin.html +++ b/engine/templates/plugin.html @@ -1,6 +1,6 @@ {##} {% if visible %} -
+
{% if togglable %} {% if not toggled %}

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

diff --git a/plugins/static/js/simplelist.js b/plugins/static/js/simplelist.js index f89aa2bf..7cce7dcc 100644 --- a/plugins/static/js/simplelist.js +++ b/plugins/static/js/simplelist.js @@ -68,7 +68,7 @@ simplelist_debug=false; e.data.html(html_code); var $elt = e.data; if (simplelist_debug) console.log("about to unspin with elt #" + $elt.attr('id') + " class " + $elt.attr('class')); - $elt.closest('.plugin-toggle').spin(false); + $elt.closest('.need-spin').spin(false); } function myslice_html_ul(data, key, value, is_cached) {