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
This commit is contained in:
scott%scott-macgregor.org
2007-03-01 07:29:40 +00:00
parent 7396aa92c8
commit f64bee771b
3 changed files with 7 additions and 8 deletions

View File

@@ -139,7 +139,7 @@
context="threadPaneContext"
onkeypress="ThreadPaneKeyPress(event);"
onselect="ThreadPaneSelectionChanged();">
<treecols pickertooltiptext="&columnChooser.tooltip;">
<treecols id="threadCols" pickertooltiptext="&columnChooser.tooltip;">
<treecol id="threadCol" persist="hidden ordinal" fixed="true" cycler="true"
class="treecol-image threadColumnHeader" currentView="unthreaded"
display="&threadColumn.label;" tooltiptext="&threadColumn.tooltip;"/>

View File

@@ -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");

View File

@@ -53,7 +53,7 @@
class="plain focusring" disableKeyNavigation="true" lastfoldersent="false" noattachcol="true"
onkeypress="ThreadPaneKeyPress(event);"
onselect="ThreadPaneSelectionChanged();">
<treecols pickertooltiptext="&columnChooser.tooltip;">
<treecols id="threadCols" pickertooltiptext="&columnChooser.tooltip;">
<treecol id="threadCol" persist="hidden ordinal" fixed="true" cycler="true" class="treecol-image threadColumnHeader" currentView="unthreaded"
display="&threadColumn.label;" tooltiptext="&threadColumn.tooltip;"/>
<splitter class="tree-splitter"/>