fixed whole-day checkbox comparison (this should probably be fixed on widget level too), fixes together with r48580 false "startdate changed" message while trying to save a recuring event

This commit is contained in:
Ralf Becker 2014-09-10 10:25:20 +00:00
parent f691946560
commit 9210a652cc

View File

@ -1004,14 +1004,15 @@ app.classes.calendar = AppJS.extend(
{ {
var content = this.et2.getArrayMgr('content').data; var content = this.et2.getArrayMgr('content').data;
var start_date = this.et2.getWidgetById('start').get_value(); var start_date = this.et2.getWidgetById('start').get_value();
var whole_day = this.et2.getWidgetById('whole_day').get_value(); var whole_day = this.et2.getWidgetById('whole_day');
var is_whole_day = whole_day && whole_day.get_value() == whole_day.options.selected_value;
var button = _button; var button = _button;
var that = this; var that = this;
if (typeof content != 'undefined' && content.id != null && if (typeof content != 'undefined' && content.id != null &&
typeof content.recur_type != 'undefined' && content.recur_type != null && content.recur_type != 0 typeof content.recur_type != 'undefined' && content.recur_type != null && content.recur_type != 0
) )
{ {
if (content.start != start_date || content.whole_day.toString() != whole_day) if (content.start != start_date || content.whole_day != is_whole_day)
{ {
et2_dialog.show_dialog(function(_button_id) et2_dialog.show_dialog(function(_button_id)
{ {