From cfd28ae9a97571f2cb24c68d2e9d03e7d9ad94c5 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 21 Aug 2014 12:43:14 +0000 Subject: [PATCH] fix not working data arithmetic, after change from timestamps to strings in date widget --- calendar/js/app.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/calendar/js/app.js b/calendar/js/app.js index 02580ce9dd..f664f78df5 100644 --- a/calendar/js/app.js +++ b/calendar/js/app.js @@ -119,7 +119,7 @@ app.classes.calendar = AppJS.extend( break; } }, - + /** * Observer method receives update notifications from all applications * @@ -175,9 +175,9 @@ app.classes.calendar = AppJS.extend( } } break; - } + } }, - + /** * Link hander for jDots template to just reload our iframe, instead of reloading whole admin app * @@ -720,7 +720,7 @@ app.classes.calendar = AppJS.extend( { this.egw.open_link(this.egw.link("/index.php",vars),'_blank','700x700'); }, - + /** * control delete_series popup visibility * @@ -755,7 +755,7 @@ app.classes.calendar = AppJS.extend( id: 'dialog[cancel]', image: 'cancel' } - + ]; var self = this; et2_dialog.show_dialog @@ -988,7 +988,7 @@ app.classes.calendar = AppJS.extend( { // nm action - show popup nm_open_popup(_action,_senders); - } + } return; } @@ -1244,7 +1244,6 @@ app.classes.calendar = AppJS.extend( var alarm_date = this.et2.getWidgetById('new_alarm[date]'); var alarm_options = _widget || this.et2.getWidgetById('new_alarm[options]'); var start = this.et2.getWidgetById('start'); - var date = 0; if (alarm_date && alarm_options && start) @@ -1260,7 +1259,8 @@ app.classes.calendar = AppJS.extend( var startDate = start.get_value(); if (startDate) { - date = startDate - parseInt(alarm_options.get_value()); + var date = new Date(startDate); + date.setTime(date.getTime() - parseInt(alarm_options.get_value())); alarm_date.set_value(date); } }