]> source.dussan.org Git - jquery-ui.git/commitdiff
Tabs: Removed rotate method. Fixes #5939 - Tabs: Remove rotation.
authorScott González <scott.gonzalez@gmail.com>
Fri, 10 Dec 2010 20:06:22 +0000 (15:06 -0500)
committerScott González <scott.gonzalez@gmail.com>
Fri, 10 Dec 2010 20:06:22 +0000 (15:06 -0500)
tests/unit/tabs/tabs_methods.js
ui/jquery.ui.tabs.js

index 67a4d9b47928f0cae60cf9280d7cd879bd566d54..bfd9d7713d4eee304b9cbcdeee6eec87c862d853 100644 (file)
@@ -176,8 +176,4 @@ test('length', function() {
        equals(el.tabs('length'), $('ul a', el).length, ' should return length');
 });
 
-test('rotate', function() {
-       ok(false, "missing test - untested code is broken code.");
-});
-
 })(jQuery);
index 7c615c8727be216cf498aadeed5dd1c38282d296..7d73bf10b30981cf02ce3f9e53c0fa0283e32c9e 100644 (file)
@@ -411,7 +411,7 @@ $.widget( "ui.tabs", {
                        // Prevent IE from keeping other link focussed when using the back button
                        // and remove dotted border from clicked link. This is controlled via CSS
                        // in modern browsers; blur() removes focus from address bar in Firefox
-                       // which can become a usability and annoying problem with tabs('rotate').
+                       // which can become a usability
                        if ( $.browser.msie ) {
                                this.blur();
                        }
@@ -701,58 +701,4 @@ $.extend( $.ui.tabs, {
        version: "@VERSION"
 });
 
-/*
- * Tabs Extensions
- */
-
-/*
- * Rotate
- */
-$.extend( $.ui.tabs.prototype, {
-       rotation: null,
-       rotate: function( ms, continuing ) {
-               var self = this,
-                       o = this.options;
-
-               var rotate = self._rotate || ( self._rotate = function( e ) {
-                       clearTimeout( self.rotation );
-                       self.rotation = setTimeout(function() {
-                               var t = o.selected;
-                               self.select( ++t < self.anchors.length ? t : 0 );
-                       }, ms );
-                       
-                       if ( e ) {
-                               e.stopPropagation();
-                       }
-               });
-
-               var stop = self._unrotate || ( self._unrotate = !continuing
-                       ? function(e) {
-                               if (e.clientX) { // in case of a true click
-                                       self.rotate(null);
-                               }
-                       }
-                       : function( e ) {
-                               t = o.selected;
-                               rotate();
-                       });
-
-               // start rotation
-               if ( ms ) {
-                       this.element.bind( "tabsshow", rotate );
-                       this.anchors.bind( o.event + ".tabs", stop );
-                       rotate();
-               // stop rotation
-               } else {
-                       clearTimeout( self.rotation );
-                       this.element.unbind( "tabsshow", rotate );
-                       this.anchors.unbind( o.event + ".tabs", stop );
-                       delete this._rotate;
-                       delete this._unrotate;
-               }
-
-               return this;
-       }
-});
-
 })( jQuery );