mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-09 10:25:08 +00:00
merge of 'a450abc483f3b225cb25328ed5bf21f1cd7d177a'
and 'da1d45b607b5db68530b2ee303a1bcc9b6ef3057' Monotone-Parent: a450abc483f3b225cb25328ed5bf21f1cd7d177a Monotone-Parent: da1d45b607b5db68530b2ee303a1bcc9b6ef3057 Monotone-Revision: 0519d3c5cb1ddf5f3f384adbaabc7195b97f949b Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2011-10-14T19:14:46 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
2011-10-14 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/SOGoMailDataSource.js (load): associated a
|
||||
unique id to the source using the url and its parameters.
|
||||
|
||||
* UI/WebServerResources/SOGoDataTable.js (render): add the new
|
||||
source id to the current render id. This should solve incorrect
|
||||
messages appearing when fast-switching between folders or sort order.
|
||||
|
||||
* SoObjects/SOGo/NSString+Utilities.m (-_rangeOfURLInRange:):
|
||||
fixed handling of brackets (inequality signs <>).
|
||||
|
||||
2011-10-14 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoGCSFolder.m (setRoles:forUser:..)
|
||||
|
||||
@@ -142,6 +142,12 @@ static int cssEscapingCount;
|
||||
[self characterAtIndex: start]])
|
||||
start--;
|
||||
start++;
|
||||
|
||||
// In [UIxMailPartTextViewer flatContentAsString], we first escape HTML entities and then
|
||||
// add URLs. Therefore, the brackets (inequality signs <>) have been encoded at this point.
|
||||
if ([[self substringWithRange: NSMakeRange (start, 4)] compare: @"<"] == NSOrderedSame)
|
||||
start += 4;
|
||||
|
||||
length = [self length] - start;
|
||||
workRange = NSMakeRange (start, length);
|
||||
workRange = [self rangeOfCharacterFromSet: urlAfterEndingChars
|
||||
@@ -154,6 +160,11 @@ static int cssEscapingCount;
|
||||
[self characterAtIndex: (start + length - 1)]])
|
||||
length--;
|
||||
|
||||
// Remove trailing ">"
|
||||
if (([self length] >= start + length + 1)
|
||||
&& [[self substringWithRange: NSMakeRange (start, length + 1)] hasSuffix: @">"])
|
||||
length -= 3;
|
||||
|
||||
return NSMakeRange (start, length);
|
||||
}
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ function markMailInWindow(win, msguid, markread) {
|
||||
img.setAttribute("title", title);
|
||||
}
|
||||
else {
|
||||
log ("No IMG found for " + msguid);
|
||||
log ("No IMG found for message " + msguid);
|
||||
}
|
||||
unseenCount = 1;
|
||||
}
|
||||
@@ -169,6 +169,9 @@ function markMailInWindow(win, msguid, markread) {
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
log ("No row found for message " + msguid);
|
||||
}
|
||||
|
||||
return (unseenCount != 0);
|
||||
}
|
||||
@@ -1658,6 +1661,7 @@ function loadMessageCallback(http) {
|
||||
else if (http.status == 404) {
|
||||
showAlertDialog (_("The message you have selected doesn't exist anymore."));
|
||||
Mailer.dataTable.remove(http.callbackData.msguid);
|
||||
Mailer.currentMessages[Mailer.currentMailbox] = null;
|
||||
}
|
||||
else
|
||||
log("messageCallback: problem during ajax request: " + http.status);
|
||||
|
||||
@@ -157,7 +157,7 @@ var SOGoDataTableInterface = {
|
||||
index = start;
|
||||
count = end - start;
|
||||
|
||||
this.currentRenderID = index + "-" + count;
|
||||
this.currentRenderID = this.dataSource.id + "/" + index + "-" + count;
|
||||
|
||||
// Query the data source only if at least one row is not loaded
|
||||
if (refresh === true ||
|
||||
|
||||
@@ -5,6 +5,7 @@ SOGoMailDataSource = Class.create({
|
||||
initialize: function(dataTable, url) {
|
||||
// Instance variables
|
||||
this.dataTable = dataTable;
|
||||
this.id = url;
|
||||
this.url = url;
|
||||
|
||||
this.uids = new Array();
|
||||
@@ -79,6 +80,7 @@ SOGoMailDataSource = Class.create({
|
||||
}
|
||||
else
|
||||
params = "";
|
||||
this.id = this.url + "?" + params;
|
||||
|
||||
// log ("MailDataSource.load() " + params);
|
||||
triggerAjaxRequest(this.url + "/uids",
|
||||
|
||||
Reference in New Issue
Block a user