Fix bug 410755 - [Trunk] It is not possible to resize and reorder the columns of the task list (regression). r=philipp,p=prasad

This commit is contained in:
mozilla%kewis.ch 2008-04-11 14:54:55 +00:00
Родитель d495fdf243
Коммит d75c555c07
1 изменённых файлов: 21 добавлений и 20 удалений

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

@ -73,7 +73,7 @@
label="&calendar.unifinder.tree.done.label;">
<xul:image anonid="checkboximg" />
</xul:treecol>
<xul:splitter class="tree-splitter"/>
<xul:splitter class="tree-splitter" ordinal="2"/>
<xul:treecol anonid="calendar-task-tree-col-priority"
class="calendar-task-tree-col-priority"
minwidth="17"
@ -81,33 +81,33 @@
label="&calendar.unifinder.tree.priority.label;">
<xul:image anonid="priorityimg"/>
</xul:treecol>
<xul:splitter class="tree-splitter"/>
<xul:splitter class="tree-splitter" ordinal="4"/>
<xul:treecol anonid="calendar-task-tree-col-title"
flex="1"
label="&calendar.unifinder.tree.title.label;"/>
<xul:splitter class="tree-splitter"/>
<xul:splitter class="tree-splitter" ordinal="6"/>
<xul:treecol anonid="calendar-task-tree-col-startdate"
flex="1" label="&calendar.unifinder.tree.startdate.label;"/>
<xul:splitter class="tree-splitter"/>
<xul:splitter class="tree-splitter" ordinal="8"/>
<xul:treecol anonid="calendar-task-tree-col-duedate"
flex="1" label="&calendar.unifinder.tree.duedate.label;"/>
<xul:splitter class="tree-splitter"/>
<xul:splitter class="tree-splitter" ordinal="10"/>
<xul:treecol anonid="calendar-task-tree-col-completeddate"
flex="1" label="&calendar.unifinder.tree.completeddate.label;"/>
<xul:splitter class="tree-splitter"/>
<xul:splitter class="tree-splitter" ordinal="12"/>
<xul:treecol anonid="calendar-task-tree-col-percentcomplete"
flex="1" label="&calendar.unifinder.tree.percentcomplete.label;"/>
<xul:splitter class="tree-splitter"/>
<xul:splitter class="tree-splitter" ordinal="14"/>
<xul:treecol anonid="calendar-task-tree-col-categories"
flex="1" label="&calendar.unifinder.tree.categories.label;"/>
<xul:splitter class="tree-splitter"/>
<xul:splitter class="tree-splitter" ordinal="16"/>
<xul:treecol anonid="calendar-task-tree-col-location"
label="&calendar.unifinder.tree.location.label;"/>
<xul:splitter class="tree-splitter"/>
<xul:splitter class="tree-splitter" ordinal="18"/>
<xul:treecol anonid="calendar-task-tree-col-status"
flex="1"
label="&calendar.unifinder.tree.status.label;"/>
<xul:splitter class="tree-splitter"/>
<xul:splitter class="tree-splitter" ordinal="20"/>
<xul:treecol anonid="calendar-task-tree-col-calendarname"
flex="1"
label="&calendar.unifinder.tree.calendarname.label;"/>
@ -397,8 +397,8 @@
var treeCols;
if (sortActive != "true") {
var treecols = document.getAnonymousNodes(
this.binding)[0].getElementsByTagName("treecol");
var tree = document.getAnonymousNodes(this.binding)[0];
var treecols = tree.getElementsByTagNameNS(tree.namespaceURI, "treecol");
for (var i = 0; i < treecols.length; i++) {
treecols[i].removeAttribute("sortActive");
treecols[i].removeAttribute("sortDirection");
@ -573,9 +573,9 @@
// Set the context menu on mousedown to change it before it is opened
onMouseDown: function tTV_onMouseDown(event) {
var tree = document.getAnonymousElementByAttribute(
this.binding, "anonid", "calendar-task-tree");
var treechildren = tree.getElementsByTagName("treechildren")[0];
var tree = document.getAnonymousElementByAttribute(this.binding,
"anonid",
"calendar-task-tree");
if (!this._getItemFromEvent(event)) {
tree.view.selection.clearSelection();
@ -746,8 +746,8 @@
var widths = this.getAttribute("widths").split(' ');
var sortActive = this.getAttribute("sort-active");
var sortDirection = this.getAttribute("sort-direction") || "ascending";
var treecols = document.getAnonymousNodes(
this)[0].getElementsByTagName("treecol");
var tree = document.getAnonymousNodes(this)[0];
var treecols = tree.getElementsByTagNameNS(tree.namespaceURI, "treecol");
for (var i = 0; i < treecols.length; i++) {
var anonid = treecols[i].getAttribute("anonid");
if (names.some(
@ -803,8 +803,8 @@
var visible = "";
var sortActive = null;
var sortDirection = null;
var treecols = document.getAnonymousNodes(
this)[0].getElementsByTagName("treecol");
var tree = document.getAnonymousNodes(this)[0];
var treecols = tree.getElementsByTagNameNS(tree.namespaceURI, "treecol");
for (var i = 0; i < treecols.length; i++) {
if (treecols[i].getAttribute("hidden") != "true") {
var anonid = treecols[i].getAttribute("anonid");
@ -973,7 +973,8 @@
this.popRefreshQueue();
this.mTreeView.rowCount = this.mTaskArray.length;
var treecols = document.getAnonymousNodes(this)[0].getElementsByTagName("treecol");
var tree = document.getAnonymousNodes(this)[0];
var treecols = tree.getElementsByTagNameNS(tree.namespaceURI, "treecol");
for (var i = 0; i < treecols.length; i++) {
if (treecols[i].getAttribute("sortActive") == "true") {
this.mTreeView.selectedColumn = treecols[i].getAttribute("anonid");