Patch #3453408 - Fixed text overflow in the toggle switch of the Event Scheduler

This commit is contained in:
Yuichiro 2011-12-07 12:59:03 +00:00 committed by Rouslan Placella
parent 9bb001b556
commit 03436f6511

View File

@ -3137,8 +3137,9 @@ var toggleButton = function ($obj) {
var on = $('.toggleOn', $obj).width();
var off = $('.toggleOff', $obj).width();
// Make the "ON" and "OFF" parts of the switch the same size
$('.toggleOn > div', $obj).width(Math.max(on, off));
$('.toggleOff > div', $obj).width(Math.max(on, off));
// + 2 pixels to avoid overflowed
$('.toggleOn > div', $obj).width(Math.max(on, off) + 2);
$('.toggleOff > div', $obj).width(Math.max(on, off) + 2);
/**
* var w Width of the central part of the switch
*/