File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -643,18 +643,21 @@ $.extend(Timepicker.prototype, {
643643
644644 // fix any grids since sliders are shorter
645645 var sliderAccessWidth = $tp . find ( '.ui-slider-access:eq(0)' ) . outerWidth ( true ) ;
646- $tp . find ( 'table:visible' ) . each ( function ( ) {
647- var $g = $ ( this ) ,
648- oldWidth = $g . outerWidth ( ) ,
649- oldMarginLeft = $g . css ( 'marginLeft' ) . toString ( ) . replace ( '%' , '' ) ,
650- newWidth = oldWidth - sliderAccessWidth ,
651- newMarginLeft = ( ( oldMarginLeft * newWidth ) / oldWidth ) + '%' ;
646+ if ( sliderAccessWidth ) {
647+ $tp . find ( 'table:visible' ) . each ( function ( ) {
648+ var $g = $ ( this ) ,
649+ oldWidth = $g . outerWidth ( ) ,
650+ oldMarginLeft = $g . css ( 'marginLeft' ) . toString ( ) . replace ( '%' , '' ) ,
651+ newWidth = oldWidth - sliderAccessWidth ,
652+ newMarginLeft = ( ( oldMarginLeft * newWidth ) / oldWidth ) + '%' ;
652653
653- $g . css ( { width : newWidth , marginLeft : newMarginLeft } ) ;
654- } ) ;
654+ $g . css ( { width : newWidth , marginLeft : newMarginLeft } ) ;
655+ } ) ;
656+ }
655657 } , 0 ) ;
656658 }
657659 // end slideAccess integration
660+
658661 }
659662 } ,
660663
You can’t perform that action at this time.
0 commit comments