moksha/public/javascript/ui/moksha.ui.tabs.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-)
New commits: commit d5b70609a4a1a1c47aca17fdcb9bc32c26aca2cb Author: John (J5) Palmieri johnp@redhat.com Date: Mon Mar 29 14:59:25 2010 -0400
more fixes for the spinner
diff --git a/moksha/public/javascript/ui/moksha.ui.tabs.js b/moksha/public/javascript/ui/moksha.ui.tabs.js index 3b9663b..400a635 100644 --- a/moksha/public/javascript/ui/moksha.ui.tabs.js +++ b/moksha/public/javascript/ui/moksha.ui.tabs.js @@ -599,19 +599,10 @@ $.widget("ui.mokshatabs", $.ui.tabs, { var $parent = $(parent), $inner = $parent.find('*:last'); return $inner.length && $inner.is(':not(img)') && $inner || $parent; }; - var cleanup = function() { - self.anchors.filter('.ui-tabs-loading').removeClass('ui-tabs-loading') - .each(function() { - if (o.spinner) - inner(this).parent().html(inner(this).data('label.tabs')); - }); - self.xhr = null; - };
if (o.spinner) { - var label = inner(a).html(); - inner(a).wrapInner('<em></em>') - .find('em').data('label.tabs', label).html(o.spinner); + var span = $('span', a); + span.data('label.tabs', span.html()).html(o.spinner); }
var success_cb = function(r, s) { @@ -620,7 +611,7 @@ $.widget("ui.mokshatabs", $.ui.tabs, { var $stripped = moksha.filter_resources(r);
$panel.html($stripped); - cleanup(); + slef._cleanup();
if (o.cache) $.data(a, 'cache.tabs', true); // if loaded once do not load them again @@ -637,7 +628,7 @@ $.widget("ui.mokshatabs", $.ui.tabs, { if (this.xhr) { // terminate pending requests from other tabs and restore tab label this.xhr.abort(); - cleanup(); + self._cleanup(); }
setTimeout(function() { // timeout is again required in IE, "wait" for id being restored
moksha-commits@lists.fedorahosted.org