Adj grids only when slideAccess visible
This commit is contained in:
parent
fab4a4428a
commit
f7eafa9849
1 changed files with 11 additions and 8 deletions
19
jquery-ui-timepicker-addon.js
vendored
19
jquery-ui-timepicker-addon.js
vendored
|
@ -643,18 +643,21 @@ $.extend(Timepicker.prototype, {
|
||||||
|
|
||||||
// fix any grids since sliders are shorter
|
// fix any grids since sliders are shorter
|
||||||
var sliderAccessWidth = $tp.find('.ui-slider-access:eq(0)').outerWidth(true);
|
var sliderAccessWidth = $tp.find('.ui-slider-access:eq(0)').outerWidth(true);
|
||||||
$tp.find('table:visible').each(function(){
|
if(sliderAccessWidth){
|
||||||
var $g = $(this),
|
$tp.find('table:visible').each(function(){
|
||||||
oldWidth = $g.outerWidth(),
|
var $g = $(this),
|
||||||
oldMarginLeft = $g.css('marginLeft').toString().replace('%',''),
|
oldWidth = $g.outerWidth(),
|
||||||
newWidth = oldWidth - sliderAccessWidth,
|
oldMarginLeft = $g.css('marginLeft').toString().replace('%',''),
|
||||||
newMarginLeft = ((oldMarginLeft * newWidth)/oldWidth) + '%';
|
newWidth = oldWidth - sliderAccessWidth,
|
||||||
|
newMarginLeft = ((oldMarginLeft * newWidth)/oldWidth) + '%';
|
||||||
|
|
||||||
$g.css({ width: newWidth, marginLeft: newMarginLeft });
|
$g.css({ width: newWidth, marginLeft: newMarginLeft });
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},0);
|
},0);
|
||||||
}
|
}
|
||||||
// end slideAccess integration
|
// end slideAccess integration
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue