check duration is under 24 hours, colorpicker updates on drag, picker for duration without am/pm.
This commit is contained in:
naomiaro 2011-01-30 21:42:53 -05:00
parent 092b36c346
commit 48c1ce77b9
6 changed files with 55 additions and 7 deletions

View file

@ -77,13 +77,20 @@ function setAddShowEvents() {
createDateInput(end, endDpSelect);
$("#add_show_start_time").timepicker();
$("#add_show_duration").timepicker({
amPmText: ['', '']
});
$("#add_show_hosts_autocomplete").autocomplete({
source: findHosts,
select: autoSelect
select: autoSelect,
delay: 200
});
$("#schedule-show-style input").ColorPicker({
onChange: function (hsb, hex, rgb, el) {
$(el).val(hex);
},
onSubmit: function(hsb, hex, rgb, el) {
$(el).val(hex);
$(el).ColorPickerHide();

View file

@ -93,7 +93,7 @@
setSelector(col, cal.get(0));
setHue(col, cal.get(0));
setNewColor(col, cal.get(0));
cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el]);
},
blur = function (ev) {
var cal = $(this).parent().parent();
@ -454,6 +454,7 @@
} else if (col.r != undefined && col.g != undefined && col.b != undefined) {
col = RGBToHSB(col);
} else if (col.h != undefined && col.s != undefined && col.b != undefined) {
col = fixHSB(col);
} else {
return this;
@ -481,4 +482,4 @@
ColorPickerShow: ColorPicker.showPicker,
ColorPickerSetColor: ColorPicker.setColor
});
})(jQuery)
})(jQuery)