Search and Top Navigation
Ticket #4451: jquery.ui.tabs.js-4451.patch
File jquery.ui.tabs.js-4451.patch, 1.0 KB (added by andrew.sharpe.7.9, December 07, 2009 08:52AM UTC)
Index: ui/jquery.ui.tabs.js
===================================================================
--- ui/jquery.ui.tabs.js (revision 3488)
+++ ui/jquery.ui.tabs.js (working copy)
@@ -583,12 +583,27 @@
o.ajaxOptions.success(r, s);
}
catch (e) {}
+ },
+ error: function(xhr, s, e) {
+ // take care of tab labels
+ self._cleanup();
- // last, so that load event is fired before show...
- self.element.dequeue("tabs");
+ // callbacks
+ self._trigger('load', null, self._ui(self.anchors[index], self.panels[index]));
+ try {
+ // Passing index avoid a race condition when this method is
+ // called after the user has selected another tab.
+ // Pass the anchor that initiated this request allows
+ // loadError to manipulate the tab content panel via $(a.hash)
+ o.loadError(xhr, s, e, index, a);
+ }
+ catch (e) {}
}
}));
+ // last, so that load event is fired before show...
+ self.element.dequeue("tabs");
+
return this;
},
Download in other formats:
Original Format
File jquery.ui.tabs.js-4451.patch, 1.0 KB (added by andrew.sharpe.7.9, December 07, 2009 08:52AM UTC)
Index: ui/jquery.ui.tabs.js
===================================================================
--- ui/jquery.ui.tabs.js (revision 3488)
+++ ui/jquery.ui.tabs.js (working copy)
@@ -583,12 +583,27 @@
o.ajaxOptions.success(r, s);
}
catch (e) {}
+ },
+ error: function(xhr, s, e) {
+ // take care of tab labels
+ self._cleanup();
- // last, so that load event is fired before show...
- self.element.dequeue("tabs");
+ // callbacks
+ self._trigger('load', null, self._ui(self.anchors[index], self.panels[index]));
+ try {
+ // Passing index avoid a race condition when this method is
+ // called after the user has selected another tab.
+ // Pass the anchor that initiated this request allows
+ // loadError to manipulate the tab content panel via $(a.hash)
+ o.loadError(xhr, s, e, index, a);
+ }
+ catch (e) {}
}
}));
+ // last, so that load event is fired before show...
+ self.element.dequeue("tabs");
+
return this;
},