Monotone-Parent: cfefc003ab42b0c862e3b48be27b49e68ef65e44

Monotone-Revision: ddaad67e61bab9ca43620739a9c6719d15165d4e

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-01-06T22:16:24
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2010-01-06 22:16:24 +00:00
parent f535b1e0d6
commit 7f686a011a
4 changed files with 29 additions and 16 deletions
+6
View File
@@ -1,5 +1,11 @@
2010-01-06 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/WebServerResources/SchedulerUI.js (onViewEventCallback):
simplified lookup of "P" elements by groupings them in an array.
This also fixes a bug where all the returned information would not
be displayed. Also, we make use of the "calendar" field, which was
not used before.
* UI/Scheduler/UIxAppointmentEditor.m (-newAction): new events
have an ".ics" extension instead of ".vcf".
+2 -2
View File
@@ -491,8 +491,8 @@
[event tag], @"component",
[dateFormatter formattedDate: eventDate], @"startDate",
[dateFormatter formattedTime: eventDate], @"startTime",
([event hasRecurrenceRules]? @"1": @"0"), @"isReccurent",
([event isAllDay]? @"1": @"0"), @"isAllDay",
([event hasRecurrenceRules] ? @"1": @"0"), @"isRecurring",
([event isAllDay] ? @"1": @"0"), @"isAllDay",
[event summary], @"summary",
[event location], @"location",
[event comment], @"description",
+1 -1
View File
@@ -95,7 +95,7 @@
<p><span class="label"><var:string label:value="Calendar:" /></span> <span><!-- space --></span></p>
<p><span class="label"><var:string label:value="Start:" /></span> <span><!-- space --></span></p>
<p><span class="label"><var:string label:value="Location:" /></span> <span><!-- space --></span></p>
<p id="description"><!-- space --></p>
<p><!-- space --></p>
</div>
</div>
+20 -13
View File
@@ -339,8 +339,7 @@ function onViewEvent(event) {
}
function onViewEventCallback(http) {
if (http.readyState == 4
&& http.status == 200) {
if (http.readyState == 4 && http.status == 200) {
if (http.responseText.length > 0) {
var data = http.responseText.evalJSON(true);
// $H(data).keys().each(function(key) {
@@ -386,25 +385,33 @@ function onViewEventCallback(http) {
// Put the event's data in the DIV
div.down("h1").update(data["summary"].replace(/\r?\n/g, "<BR/>"));
var paras = div.getElementsByTagName("p");
if (data["calendar"].length) {
paras[0].down("SPAN", 1).update(data["calendar"]);
paras[0].show();
} else
paras[0].hide();
if (parseInt(data["isAllDay"]) == 0) {
div.down("P", 0).down("SPAN", 1).update(data["startTime"]);
div.down("P", 0).show();
paras[1].down("SPAN", 1).update(data["startTime"]);
paras[1].show();
} else
div.down("P", 0).hide();
paras[1].hide();
if (data["location"].length) {
div.down("P", 1).down("SPAN", 1).update(data["location"]);
div.down("P", 1).show();
paras[2].down("SPAN", 1).update(data["location"]);
paras[2].show();
} else
div.down("P", 1).hide();
paras[2].hide();
if (data["description"].length) {
div.down("P", 2).update(data["description"].replace(/\r?\n/g, "<BR/>"));
div.down("P", 2).show();
paras[3].update(data["description"].replace(/\r?\n/g, "<BR/>"));
paras[3].show();
} else
div.down("P", 2).hide();
paras[3].hide();
div.setStyle({ left: left + "px",
top: top + "px" });
div.setStyle({ left: left + "px", top: top + "px" });
div.show();
}
}