From 52476251b82ed0c172bc143a0642ae223d306b6e Mon Sep 17 00:00:00 2001 From: Alexandre Cloutier Date: Thu, 14 Aug 2014 14:49:44 -0400 Subject: [PATCH] applied comments, fix bug and add sortable results --- UI/MailerUI/UIxMailListActions.m | 8 ++- UI/Templates/MailerUI/UIxMailSearch.wox | 5 +- UI/WebServerResources/UIxMailSearch.css | 2 +- UI/WebServerResources/UIxMailSearch.js | 91 +++++++++++++++++++++++-- 4 files changed, 96 insertions(+), 10 deletions(-) diff --git a/UI/MailerUI/UIxMailListActions.m b/UI/MailerUI/UIxMailListActions.m index ac7e59171..163ead021 100644 --- a/UI/MailerUI/UIxMailListActions.m +++ b/UI/MailerUI/UIxMailListActions.m @@ -459,7 +459,8 @@ } /** - * Returns a flatten representation of the messages threads as triples of + * Returns a + of the messages threads as triples of * metadata, including the message UID, thread level and root position. * @param _sortedUIDs the interleaved arrays representation of the messages UIDs * @return an flatten array representation of the messages UIDs @@ -632,11 +633,14 @@ // Retrieve messages UIDs using form parameters "sort" and "asc" uids = [self getSortedUIDsInFolder: folder]; + + // Get rid of the extra parenthesis + // uids = [[[[uids stringValue] stringByReplacingOccurrencesOfString:@"(" withString:@""] stringByReplacingOccurrencesOfString:@")" withString:@""] componentsSeparatedByString:@","]; if (includeHeaders) { // Also retrieve the first headers, up to 'headersPrefetchMaxSize' - count = [uids count]; + count = [[uids flattenedArray] count]; if (count > headersPrefetchMaxSize) count = headersPrefetchMaxSize; r = NSMakeRange(0, count); headers = [self getHeadersForUIDs: [[uids flattenedArray] subarrayWithRange: r] diff --git a/UI/Templates/MailerUI/UIxMailSearch.wox b/UI/Templates/MailerUI/UIxMailSearch.wox index 388648a13..1f8c3cb2d 100644 --- a/UI/Templates/MailerUI/UIxMailSearch.wox +++ b/UI/Templates/MailerUI/UIxMailSearch.wox @@ -4,7 +4,8 @@ xmlns:const="http://www.skyrix.com/od/constant" xmlns:uix="OGo:uix" xmlns:rsrc="OGo:url" - xmlns:label="OGo:label"> + xmlns:label="OGo:label" + const:jsFiles="tablekit.js, tablekit-sogo.js, tablekit-trueresize.js">