From d2b76a871fd599fe6a4aaa5661688520631819a3 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Mon, 26 Apr 2010 16:01:01 +0000 Subject: [PATCH] Fix for bug #588. Monotone-Parent: fdc69a8bf5b6b5a68b37d7ddf77d671fc0bcbe15 Monotone-Revision: cd845bf5330077e8801634336d85db1dd1834d50 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2010-04-26T16:01:01 Monotone-Branch: ca.inverse.sogo --- UI/WebServerResources/SchedulerUI.js | 36 +++++++++++++--------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 4768e18f6..ead861bf4 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -936,26 +936,24 @@ function changeDateSelectorDisplay(day, keepCurrentDay) { url += "?day=" + day; } - if (day != currentDay) { - if (!keepCurrentDay) - currentDay = day; - - var month = day.substr(0, 6); - if (cachedDateSelectors[month]) { - // log ("restoring cached selector for month: " + month); - setDateSelectorContent(cachedDateSelectors[month]); - } - else { - // log ("loading selector for month: " + month); - if (document.dateSelectorAjaxRequest) { - document.dateSelectorAjaxRequest.aborted = true; - document.dateSelectorAjaxRequest.abort(); - } - document.dateSelectorAjaxRequest - = triggerAjaxRequest(url, - dateSelectorCallback, - month); + if (!keepCurrentDay) + currentDay = day; + + var month = day.substr(0, 6); + if (cachedDateSelectors[month]) { + // log ("restoring cached selector for month: " + month); + setDateSelectorContent(cachedDateSelectors[month]); + } + else { + // log ("loading selector for month: " + month); + if (document.dateSelectorAjaxRequest) { + document.dateSelectorAjaxRequest.aborted = true; + document.dateSelectorAjaxRequest.abort(); } + document.dateSelectorAjaxRequest + = triggerAjaxRequest(url, + dateSelectorCallback, + month); } }