From 866acfc19df26c14b391be9dd4016370122f75ac Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 14 Jul 2009 16:52:39 +0000 Subject: [PATCH] Add alert when changing the status of a read-only task Monotone-Parent: 5e3e865225772f121d4060fe62b0894cec61ddbe Monotone-Revision: bcd763fe0f225407b241d84235b02cc8de0eb7e5 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-07-14T16:52:39 Monotone-Branch: ca.inverse.sogo --- UI/WebServerResources/SchedulerUI.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index a218455f3..f096f0bb8 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -663,7 +663,7 @@ function tasksListCallback(http) { var calendar = escape(data[i][1]); var cname = escape(data[i][0]); listItem.setAttribute("id", calendar + "-" + cname); - listItem.addClassName(data[i][5]); + //listItem.addClassName(data[i][5]); // Classification listItem.addClassName(data[i][6]); listItem.calendar = calendar; listItem.addClassName("calendarFolder" + calendar); @@ -1521,15 +1521,19 @@ function updateTaskStatus(event) { http.send(""); } catch (e) { - /* IE7 tends to generate "tranaction aborted" errors for synchronous + /* IE7 tends to generate "transaction aborted" errors for synchronous transactions returning HTTP code 204. */ log("exception during http.send (expected on IE7)"); } if (isHttpStatus204(http.status)) refreshTasks(); - } else - log ("no http client?"); - + else if (parseInt(http.status) == 403) { + window.alert(clabels["You don't have the required privileges to perform the operation."]); + this.checked = !this.checked; + } + else + log ("updateTaskStatus: error (http code " + http.status + ")"); + } return false; }