X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=manifoldapi%2Fstatic%2Fjs%2Fplugin.js;h=495bdc7db81ec5ca02f42c5e63e82b93f6a2a35d;hb=b754744bb47b51851da85efa2f039951a96f8031;hp=76e1cb5268f455ce22c952ec34368ede9299308d;hpb=1d7b0fb8b69c6eca9880a3966acf0352341882bb;p=unfold.git diff --git a/manifoldapi/static/js/plugin.js b/manifoldapi/static/js/plugin.js index 76e1cb52..495bdc7d 100644 --- a/manifoldapi/static/js/plugin.js +++ b/manifoldapi/static/js/plugin.js @@ -316,15 +316,18 @@ var Plugin = Class.extend({ // use spin() to get our default spin settings (called presets) // use spin(true) to get spin's builtin defaults // you can also call spin_presets() yourself and tweak what you need to, like topmenuvalidation does - spin: function (presets) { - var presets = ( presets === undefined ) ? spin_presets() : presets; - try { this.$element.spin(presets); } - catch (err) { messages.debug("Cannot turn on spin " + err); } + spin: function (message) { + if (!message) { + message = 'Please be patient, this can take a minute or two.'; + } + $('div.loading').fadeIn('fast'); + $('div.loading').find('.message').text(message); + }, unspin: function() { - try { this.$element.spin(false); } - catch (err) { messages.debug("Cannot turn off spin " + err); } + $('div.loading').fadeOut('fast'); + }, /* TEMPLATE */