This is just some static backup of the original site, don't expect every link to work!

Changeset 11bcb73


Ignore:
Timestamp:
Dec 5, 2011, 12:58:03 PM (11 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
37c23b
Parents:
07ec84
Message:

repaired sorting and filter view

File:
1 edited

Legend:

Unmodified
Added
Removed
  • content/vI_rdfDataTree.js

    r07ec84 r11bcb73  
    6969        //to prevent the user from losing the row they edited
    7070        var topVisibleRow = null;
    71         if (this.idTable) { topVisibleRow = this.treeElem.treeBoxObject.getFirstVisibleRow(); }
     71        if (this.idTable)
     72          topVisibleRow = this.treeElem.treeBoxObject.getFirstVisibleRow();
    7273        if (this.idData == null) {
    7374            this.idData = [];
     
    9293            this.idTable = curTable;
    9394        }   
     95       
    9496        this.sort();
    9597       
    9698        //restore scroll position
    97         if (topVisibleRow) {
     99        if (topVisibleRow && topVisibleRow <= this.idTable.length) {
    98100            this.treeElem.treeBoxObject.scrollToRow(topVisibleRow);
    99101        }
     
    125127//      Log.debug("sort: " + columnName);
    126128        var order = this.treeElem.getAttribute("sortDirection") == "ascending" ? 1 : -1;
    127         //if the column is passed and it's already sorted by that column, reverse sort
     129        // if the column is passed and it's already sorted by that column, reverse sort
    128130        if (columnName && (this.treeElem.getAttribute("sortResource") == columnName)) {
    129131                order *= -1;
     
    137139            return 0;
    138140        }
    139         if (columnName) this.idTable.sort(columnSort);
     141        if (!columnName)
     142          columnName = this.treeElem.getAttribute("sortResource")
     143       
     144        this.idTable.sort(columnSort);
    140145       
    141146        //setting these will make the sort option persist
     
    346351        for each (var treeType in rdfDataTreeCollection.treeTypes) {
    347352            rdfDataTreeCollection.trees[treeType].idData = null;
    348             rdfDataTreeCollection.trees[treeType].idTable = null;
    349353            rdfDataTreeCollection.trees[treeType].loadTable()
    350354        }
Note: See TracChangeset for help on using the changeset viewer.