flyson
flyso****@users*****
2005年 12月 23日 (金) 13:54:13 JST
Index: bbs2chreader/content/bbs2chreader/board-page.js diff -u bbs2chreader/content/bbs2chreader/board-page.js:1.25 bbs2chreader/content/bbs2chreader/board-page.js:1.26 --- bbs2chreader/content/bbs2chreader/board-page.js:1.25 Mon Dec 12 02:19:11 2005 +++ bbs2chreader/content/bbs2chreader/board-page.js Fri Dec 23 13:54:13 2005 @@ -557,12 +557,10 @@ selection: null, - getCellText : function(aRow, aColID){ - if(aColID.id) aColID = aColID.id; // Gecko 1.7/1.8 互換 - - if(document.getElementById(aColID).getAttribute("notext") == "true") return ""; - var property = document.getElementById(aColID).getAttribute("property"); - var isDate = document.getElementById(aColID).getAttribute("isdate") == "true"; + getCellText : function(aRow, aCol){ + if(aCol.element.getAttribute("notext") == "true") return ""; + var property = aCol.element.getAttribute("property"); + var isDate = aCol.element.getAttribute("isdate") == "true"; if(isDate) return this.getFormatedDate(new Date(this._items[aRow][property])); return this._items[aRow][property]; @@ -572,13 +570,13 @@ this._treeBox = aTree; }, - cycleHeader: function(aColID, aElement){ - if(!aElement) aElement = aColID.element; // XXX Gecko 1.7/1.8 互換 + cycleHeader: function(aCol){ + var colElement = aCol.element; - var sortActive = aElement.getAttribute("sortActive"); - var sortDirection = aElement.getAttribute("sortDirection"); - var property = aElement.getAttribute("property"); - var treeNode = aElement.parentNode.parentNode; + var sortActive = colElement.getAttribute("sortActive"); + var sortDirection = colElement.getAttribute("sortDirection"); + var property = colElement.getAttribute("property"); + var treeNode = colElement.parentNode.parentNode; switch(sortDirection){ case "ascending": @@ -595,12 +593,12 @@ break; } - aElement.setAttribute("sortDirection", sortDirection); - aElement.setAttribute("sortActive", sortActive); + colElement.setAttribute("sortDirection", sortDirection); + colElement.setAttribute("sortActive", sortActive); - var colNodes = aElement.parentNode.getElementsByTagName("treecol"); + var colNodes = colElement.parentNode.getElementsByTagName("treecol"); for(var i=0; i<colNodes.length; i++){ - if(colNodes[i] == aElement) continue; + if(colNodes[i] == colElement) continue; colNodes[i].setAttribute("sortDirection", "natural"); colNodes[i].setAttribute("sortActive", "false"); } @@ -626,15 +624,15 @@ var status = "s" + this._items[aIndex].status; aProperties.AppendElement(this._atomService.getAtom(status)); }, - getCellProperties: function(aRow, aColID, aProperties){ - if(typeof(aColID) != "string") aColID = aColID.id; // XXX Gecko 1.7/1.8 互換 + + getCellProperties: function(aRow, aCol, aProperties){ var status = "s" + this._items[aRow].status; aProperties.AppendElement(this._atomService.getAtom(status)); - if(aColID =="colStatus"){ + if(aCol.id =="colStatus"){ aProperties.AppendElement(this._atomService.getAtom("icon")); } }, - getColumnProperties: function(aColID, aColElement, aProperties){}, + getColumnProperties: function(aCol, aProperties){}, isContainer: function(aRow){}, isContainerOpen: function(aRow){}, isContainerEmpty: function(aRow){}, @@ -646,15 +644,15 @@ getParentIndex: function getParentIndex(aIndex){}, hasNextSibling: function(aIndex, aAfterIndex){}, getLevel: function(aIndex){}, - getImageSrc: function(aRow, aColID){}, - getProgressMode: function(aRow, aColID){}, - getCellValue: function(aRow, aColID){}, + getImageSrc: function(aRow, aCol){}, + getProgressMode: function(aRow, aCol){}, + getCellValue: function(aRow, aCol){}, selectionChanged: function(){}, - cycleCell: function(aRow, aColID){}, - isEditable: function(aRow, aColID){}, - setCellText: function(aRow, aColID, aValue){}, + cycleCell: function(aRow, aCol){}, + isEditable: function(aRow, aCol){}, + setCellText: function(aRow, aCol, aValue){}, toggleOpenState: function(aIndex){}, performAction: function(aAction){}, performActionOnRow: function(aAction, aRow){}, - performActionOnCell: function(aAction, aRow, aColID){} + performActionOnCell: function(aAction, aRow, aCol){} }