Changeset 11bcb73
- Timestamp:
- Dec 5, 2011, 12:58:03 PM (11 years ago)
- Branches:
- ng_0.9
- Children:
- 37c23b
- Parents:
- 07ec84
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
content/vI_rdfDataTree.js
r07ec84 r11bcb73 69 69 //to prevent the user from losing the row they edited 70 70 var topVisibleRow = null; 71 if (this.idTable) { topVisibleRow = this.treeElem.treeBoxObject.getFirstVisibleRow(); } 71 if (this.idTable) 72 topVisibleRow = this.treeElem.treeBoxObject.getFirstVisibleRow(); 72 73 if (this.idData == null) { 73 74 this.idData = []; … … 92 93 this.idTable = curTable; 93 94 } 95 94 96 this.sort(); 95 97 96 98 //restore scroll position 97 if (topVisibleRow ) {99 if (topVisibleRow && topVisibleRow <= this.idTable.length) { 98 100 this.treeElem.treeBoxObject.scrollToRow(topVisibleRow); 99 101 } … … 125 127 // Log.debug("sort: " + columnName); 126 128 var order = this.treeElem.getAttribute("sortDirection") == "ascending" ? 1 : -1; 127 // if the column is passed and it's already sorted by that column, reverse sort129 // if the column is passed and it's already sorted by that column, reverse sort 128 130 if (columnName && (this.treeElem.getAttribute("sortResource") == columnName)) { 129 131 order *= -1; … … 137 139 return 0; 138 140 } 139 if (columnName) this.idTable.sort(columnSort); 141 if (!columnName) 142 columnName = this.treeElem.getAttribute("sortResource") 143 144 this.idTable.sort(columnSort); 140 145 141 146 //setting these will make the sort option persist … … 346 351 for each (var treeType in rdfDataTreeCollection.treeTypes) { 347 352 rdfDataTreeCollection.trees[treeType].idData = null; 348 rdfDataTreeCollection.trees[treeType].idTable = null;349 353 rdfDataTreeCollection.trees[treeType].loadTable() 350 354 }
Note: See TracChangeset
for help on using the changeset viewer.