Bug #371629 --> when changing the sort column, we weren't always remove the sortdirection attribute on the other tree columns. r=neil

This commit is contained in:
scott%scott-macgregor.org 2007-03-01 07:29:29 +00:00
Родитель 4b272baf50
Коммит cc846bcd4f
3 изменённых файлов: 7 добавлений и 8 удалений

Просмотреть файл

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

Просмотреть файл

@ -415,6 +415,11 @@ function groupedBySortUsingDummyRow()
function UpdateSortIndicators(sortType, sortOrder) 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 // show the twisties if the view is threaded
var threadCol = document.getElementById("threadCol"); var threadCol = document.getElementById("threadCol");
var sortedColumn; var sortedColumn;
@ -456,12 +461,6 @@ function UpdateSortIndicators(sortType, sortOrder)
currCol.removeAttribute("primary"); currCol.removeAttribute("primary");
} }
// remove the sort indicator from all the columns
while (currCol) {
currCol.removeAttribute("sortDirection");
currCol = currCol.nextSibling;
}
if (sortedColumn) { if (sortedColumn) {
if (sortOrder == nsMsgViewSortOrder.ascending) { if (sortOrder == nsMsgViewSortOrder.ascending) {
sortedColumn.setAttribute("sortDirection","ascending"); sortedColumn.setAttribute("sortDirection","ascending");

Просмотреть файл

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