Skip to content

Commit 162364f

Browse files
committed
Tabs: Removed rotate method. Fixes #5939 - Tabs: Remove rotation.
1 parent f54747b commit 162364f

File tree

2 files changed

+1
-59
lines changed

2 files changed

+1
-59
lines changed

tests/unit/tabs/tabs_methods.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,4 @@ test('length', function() {
176176
equals(el.tabs('length'), $('ul a', el).length, ' should return length');
177177
});
178178

179-
test('rotate', function() {
180-
ok(false, "missing test - untested code is broken code.");
181-
});
182-
183179
})(jQuery);

ui/jquery.ui.tabs.js

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ $.widget( "ui.tabs", {
411411
// Prevent IE from keeping other link focussed when using the back button
412412
// and remove dotted border from clicked link. This is controlled via CSS
413413
// in modern browsers; blur() removes focus from address bar in Firefox
414-
// which can become a usability and annoying problem with tabs('rotate').
414+
// which can become a usability
415415
if ( $.browser.msie ) {
416416
this.blur();
417417
}
@@ -701,58 +701,4 @@ $.extend( $.ui.tabs, {
701701
version: "@VERSION"
702702
});
703703

704-
/*
705-
* Tabs Extensions
706-
*/
707-
708-
/*
709-
* Rotate
710-
*/
711-
$.extend( $.ui.tabs.prototype, {
712-
rotation: null,
713-
rotate: function( ms, continuing ) {
714-
var self = this,
715-
o = this.options;
716-
717-
var rotate = self._rotate || ( self._rotate = function( e ) {
718-
clearTimeout( self.rotation );
719-
self.rotation = setTimeout(function() {
720-
var t = o.selected;
721-
self.select( ++t < self.anchors.length ? t : 0 );
722-
}, ms );
723-
724-
if ( e ) {
725-
e.stopPropagation();
726-
}
727-
});
728-
729-
var stop = self._unrotate || ( self._unrotate = !continuing
730-
? function(e) {
731-
if (e.clientX) { // in case of a true click
732-
self.rotate(null);
733-
}
734-
}
735-
: function( e ) {
736-
t = o.selected;
737-
rotate();
738-
});
739-
740-
// start rotation
741-
if ( ms ) {
742-
this.element.bind( "tabsshow", rotate );
743-
this.anchors.bind( o.event + ".tabs", stop );
744-
rotate();
745-
// stop rotation
746-
} else {
747-
clearTimeout( self.rotation );
748-
this.element.unbind( "tabsshow", rotate );
749-
this.anchors.unbind( o.event + ".tabs", stop );
750-
delete this._rotate;
751-
delete this._unrotate;
752-
}
753-
754-
return this;
755-
}
756-
});
757-
758704
})( jQuery );

0 commit comments

Comments
 (0)