diff --git a/UI/MailerUI/UIxMailListView.m b/UI/MailerUI/UIxMailListView.m index de669d916..86844b861 100644 --- a/UI/MailerUI/UIxMailListView.m +++ b/UI/MailerUI/UIxMailListView.m @@ -128,7 +128,7 @@ static int attachmentFlagSize = 8096; return [[[self message] valueForKey:@"uid"] stringValue]; } -- (NSString *) messageCellStyleClass +- (NSString *) messageRowStyleClass { return [self isMessageDeleted] ? @"mailer_listcell_deleted" @@ -137,11 +137,9 @@ static int attachmentFlagSize = 8096; - (NSString *) messageSubjectCellStyleClass { - return [NSString stringWithFormat: @"%@ %@", - [self messageCellStyleClass], - ([self isMessageRead] - ? @"mailer_readmailsubject" - : @"mailer_unreadmailsubject")]; + return ([self isMessageRead] + ? @"mailer_readmailsubject" + : @"mailer_unreadmailsubject"); } - (BOOL) hasMessageAttachment diff --git a/UI/Templates/MailerUI/UIxMailListView.wox b/UI/Templates/MailerUI/UIxMailListView.wox index 55c320c85..55d2d69ab 100644 --- a/UI/Templates/MailerUI/UIxMailListView.wox +++ b/UI/Templates/MailerUI/UIxMailListView.wox @@ -5,7 +5,7 @@ xmlns:const="http://www.skyrix.com/od/constant" xmlns:rsrc="OGo:url" xmlns:label="OGo:label"> - + - - | - | - - - - - - + + | + | + + + + + + | - + >| + + + 1) { - if ($(rows[start].cells[0]).hasClassName("tbtv_headercell")) - start++; - if ($(rows[start].cells[0]).hasClassName("tbtv_navcell")) { - var anchors = $(rows[start].cells[0]).childNodesWithTag("a"); - for (var i = 0; i < anchors.length; i++) - Event.observe(anchors[i], "click", openMailboxAtIndex.bindAsEventListener(anchors[i])); - start++; - } - for (var i = start; i < rows.length; i++) { - Event.observe(rows[i], "mousedown", onRowClick); - Event.observe(rows[i], "contextmenu", onMessageContextMenu.bindAsEventListener(rows[i])); - - rows[i].dndTypes = function() { return new Array("mailRow"); }; - rows[i].dndGhost = messageListGhost; - rows[i].dndDataForType = messageListData; - document.DNDManager.registerSource(rows[i]); - - for (var j = 0; j < rows[i].cells.length; j++) { - var cell = rows[i].cells[j]; - Event.observe(cell, "mousedown", listRowMouseDownHandler); - if (j == 2 || j == 3 || j == 5) - Event.observe(cell, "dblclick", onMessageDoubleClick.bindAsEventListener(cell)); - else if (j == 4) { - var img = cell.childNodesWithTag("img")[0]; - Event.observe(img, "click", mailListMarkMessage); - } + Event.observe(messageList, "mousedown", + onMessageSelectionChange.bindAsEventListener(messageList)); + var cell = messageList.tHead.rows[1].cells[0]; + if ($(cell).hasClassName("tbtv_navcell")) { + var anchors = $(cell).childNodesWithTag("a"); + for (var i = 0; i < anchors.length; i++) + Event.observe(anchors[i], "click", openMailboxAtIndex.bindAsEventListener(anchors[i])); + } + + rows = messageList.tBodies[0].rows; + for (var i = 0; i < rows.length; i++) { + Event.observe(rows[i], "mousedown", onRowClick); + Event.observe(rows[i], "contextmenu", onMessageContextMenu.bindAsEventListener(rows[i])); + + rows[i].dndTypes = function() { return new Array("mailRow"); }; + rows[i].dndGhost = messageListGhost; + rows[i].dndDataForType = messageListData; + document.DNDManager.registerSource(rows[i]); + + for (var j = 0; j < rows[i].cells.length; j++) { + var cell = rows[i].cells[j]; + Event.observe(cell, "mousedown", listRowMouseDownHandler); + if (j == 2 || j == 3 || j == 5) + Event.observe(cell, "dblclick", onMessageDoubleClick.bindAsEventListener(cell)); + else if (j == 4) { + var img = cell.childNodesWithTag("img")[0]; + Event.observe(img, "click", mailListMarkMessage); } } }