From f64bee771b2bb1042c4515c21b25011f4fe9b8a2 Mon Sep 17 00:00:00 2001 From: "scott%scott-macgregor.org" Date: Thu, 1 Mar 2007 07:29:40 +0000 Subject: [PATCH] Bug #371629 --> when changing the sort column, we weren't always remove the sortdirection attribute on the other tree columns. r=neil git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@221141 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mail/base/content/SearchDialog.xul | 2 +- mozilla/mailnews/base/resources/content/threadPane.js | 11 +++++------ .../mailnews/base/resources/content/threadPane.xul | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/mozilla/mail/base/content/SearchDialog.xul b/mozilla/mail/base/content/SearchDialog.xul index 21f792bf9cd..19d05bf79d3 100644 --- a/mozilla/mail/base/content/SearchDialog.xul +++ b/mozilla/mail/base/content/SearchDialog.xul @@ -139,7 +139,7 @@ context="threadPaneContext" onkeypress="ThreadPaneKeyPress(event);" onselect="ThreadPaneSelectionChanged();"> - + diff --git a/mozilla/mailnews/base/resources/content/threadPane.js b/mozilla/mailnews/base/resources/content/threadPane.js index 8c348e75459..6b42c80a73c 100644 --- a/mozilla/mailnews/base/resources/content/threadPane.js +++ b/mozilla/mailnews/base/resources/content/threadPane.js @@ -415,6 +415,11 @@ function groupedBySortUsingDummyRow() function UpdateSortIndicators(sortType, sortOrder) { + // Remove the sort indicator from all the columns + var treeColumns = document.getElementById('threadCols').childNodes; + for (var i = 0; i < treeColumns.length; i++) + treeColumns(i).removeAttribute('sortDirection'); + // show the twisties if the view is threaded var threadCol = document.getElementById("threadCol"); var sortedColumn; @@ -456,12 +461,6 @@ function UpdateSortIndicators(sortType, sortOrder) currCol.removeAttribute("primary"); } - // remove the sort indicator from all the columns - while (currCol) { - currCol.removeAttribute("sortDirection"); - currCol = currCol.nextSibling; - } - if (sortedColumn) { if (sortOrder == nsMsgViewSortOrder.ascending) { sortedColumn.setAttribute("sortDirection","ascending"); diff --git a/mozilla/mailnews/base/resources/content/threadPane.xul b/mozilla/mailnews/base/resources/content/threadPane.xul index 0ad531699f1..9003c8256d0 100644 --- a/mozilla/mailnews/base/resources/content/threadPane.xul +++ b/mozilla/mailnews/base/resources/content/threadPane.xul @@ -53,7 +53,7 @@ class="plain focusring" disableKeyNavigation="true" lastfoldersent="false" noattachcol="true" onkeypress="ThreadPaneKeyPress(event);" onselect="ThreadPaneSelectionChanged();"> - +