From 7a2eff59ea77eda5d681ffb547574ce5edb5b721 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 4 Nov 2008 19:55:50 +0000 Subject: [PATCH] Fix for bug #2969 Monotone-Parent: 34dbce3026b164b07c558711781fcfb5cde0fcff Monotone-Revision: 1d653d4f984b0eeefbcd5014a68753ef3d761b3c Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2008-11-04T19:55:50 Monotone-Branch: ca.inverse.sogo --- UI/SOGoUI/UIxComponent.m | 14 ++++++++++++-- UI/Templates/SchedulerUI/UIxCalMonthView.wox | 12 ++++++------ UI/WebServerResources/SchedulerUI.js | 11 ++++++++++- 3 files changed, 28 insertions(+), 9 deletions(-) diff --git a/UI/SOGoUI/UIxComponent.m b/UI/SOGoUI/UIxComponent.m index 105209673..29643f56c 100644 --- a/UI/SOGoUI/UIxComponent.m +++ b/UI/SOGoUI/UIxComponent.m @@ -25,6 +25,7 @@ #import #import #import +#import #import #import @@ -240,10 +241,19 @@ static BOOL uixDebugEnabled = NO; - (void) setSelectedDateQueryParameter: (NSCalendarDate *) _newDate inDictionary: (NSMutableDictionary *) _qp { + NSString *day; + if (_newDate) - [_qp setObject: [self dateStringForDate: _newDate] forKey: @"day"]; + { + day = [self dateStringForDate: _newDate]; + [_qp setObject: day forKey: @"day"]; + [_qp setObject: [day substringToIndex: 6] forKey: @"month"]; + } else - [_qp removeObjectForKey:@"day"]; + { + [_qp removeObjectForKey:@"day"]; + [_qp removeObjectForKey:@"month"]; + } } - (NSString *) completeHrefForMethod: (NSString *) _method diff --git a/UI/Templates/SchedulerUI/UIxCalMonthView.wox b/UI/Templates/SchedulerUI/UIxCalMonthView.wox index 5bed9e2a6..614842bb2 100644 --- a/UI/Templates/SchedulerUI/UIxCalMonthView.wox +++ b/UI/Templates/SchedulerUI/UIxCalMonthView.wox @@ -9,35 +9,35 @@ diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 17e35b46a..ba6e85eb1 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -395,6 +395,9 @@ function onViewEventCallback(http) { div.show(); } } + else { + log("onViewEventCallback ajax error:" + http.url); + } } function editDoubleClickedEvent(event) { @@ -707,8 +710,11 @@ function restoreCurrentDaySelection(div) { function changeDateSelectorDisplay(day, keepCurrentDay) { var url = ApplicationBaseURL + "dateselector"; - if (day) + if (day) { + if (day.length < 8) + day += "01"; url += "?day=" + day; + } if (day != currentDay) { if (!keepCurrentDay) @@ -781,6 +787,9 @@ function changeCalendarDisplay(data, newView) { return false; } + else if (day.length == 6) { + day += "01"; + } } url += "?day=" + day; }