diff --git a/ChangeLog b/ChangeLog index e0c25c37e..6b8a6eb35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2011-10-14 Francis Lachapelle + * 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 <>). diff --git a/UI/WebServerResources/MailerUI.js b/UI/WebServerResources/MailerUI.js index 4ddec2c6e..772bfd6d3 100644 --- a/UI/WebServerResources/MailerUI.js +++ b/UI/WebServerResources/MailerUI.js @@ -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); diff --git a/UI/WebServerResources/SOGoDataTable.js b/UI/WebServerResources/SOGoDataTable.js index 9eebfc016..fd9189dd0 100644 --- a/UI/WebServerResources/SOGoDataTable.js +++ b/UI/WebServerResources/SOGoDataTable.js @@ -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 || diff --git a/UI/WebServerResources/SOGoMailDataSource.js b/UI/WebServerResources/SOGoMailDataSource.js index 0bcfae667..5bc53820e 100644 --- a/UI/WebServerResources/SOGoMailDataSource.js +++ b/UI/WebServerResources/SOGoMailDataSource.js @@ -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",