File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -435,7 +435,7 @@ $.extend(Timepicker.prototype, {
435435
436436 for ( var l = o . millisecMin ; l <= millisecMax ; l += parseInt ( o . millisecGrid , 10 ) ) {
437437 millisecGridSize ++ ;
438- html += '<td>' + ( ( l < 10 ) ? '0' : '' ) + s + '</td>' ;
438+ html += '<td>' + ( ( l < 10 ) ? '0' : '' ) + l + '</td>' ;
439439 }
440440
441441 html += '</tr></table></div>' ;
@@ -640,8 +640,21 @@ $.extend(Timepicker.prototype, {
640640 var sliderAccessArgs = this . _defaults . sliderAccessArgs ;
641641 setTimeout ( function ( ) { // fix for inline mode
642642 $tp . find ( '.ui-slider:visible' ) . sliderAccess ( sliderAccessArgs ) ;
643+
644+ // fix any grids since sliders are shorter
645+ 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 ) + '%' ;
652+
653+ $g . css ( { width : newWidth , marginLeft : newMarginLeft } ) ;
654+ } ) ;
643655 } , 0 ) ;
644656 }
657+ // end slideAccess integration
645658 }
646659 } ,
647660
You can’t perform that action at this time.
0 commit comments