diff --git a/chrome/chromeFiles/content/scholar/sidebar.js b/chrome/chromeFiles/content/scholar/sidebar.js index 1f309f740b..6679dcc8d4 100644 --- a/chrome/chromeFiles/content/scholar/sidebar.js +++ b/chrome/chromeFiles/content/scholar/sidebar.js @@ -24,7 +24,7 @@ Scholar.TreeView.prototype.setTree = function(treebox) Scholar.TreeView.prototype.getCellText = function(row, column) { - var obj = this._getObjectAtRow(row); + var obj = this._getItemAtRow(row); if(obj.isFolder()) { @@ -44,9 +44,9 @@ Scholar.TreeView.prototype.getCellText = function(row, column) } } -Scholar.TreeView.prototype.isContainer = function(row) { return this._getObjectAtRow(row).isFolder(); } +Scholar.TreeView.prototype.isContainer = function(row) { return this._getItemAtRow(row).isFolder(); } Scholar.TreeView.prototype.isContainerOpen = function(row) { return this._dataObjects[row][1]; } -Scholar.TreeView.prototype.isContainerEmpty = function(row) { return (this.isContainer(row) && this._getObjectAtRow(row).isEmpty()); } +Scholar.TreeView.prototype.isContainerEmpty = function(row) { return (this.isContainer(row) && this._getItemAtRow(row).isEmpty()); } Scholar.TreeView.prototype.getLevel = function(row) { return this._dataObjects[row][2]; } Scholar.TreeView.prototype.getParentIndex = function(row) @@ -85,7 +85,7 @@ Scholar.TreeView.prototype.toggleOpenState = function(row) } else { - var newRows = Scholar.Items.getTreeRows(this._getObjectAtRow(row).getID()); //Get children + var newRows = Scholar.Items.getTreeRows(this._getItemAtRow(row).getID()); //Get children for(var i = 0; i < newRows.length; i++) { @@ -104,12 +104,14 @@ Scholar.TreeView.prototype.selectionChanged = function() { if(this.selection.count == 1 && !this.isContainer(this.selection.currentIndex)) { - populateObjectPane(this._getObjectAtRow(this.selection.currentIndex)); - document.getElementById('scholar-sidebar-object-pane').hidden = false; + populateObjectPane(this._getItemAtRow(this.selection.currentIndex)); + document.getElementById('object-pane').hidden = false; + document.getElementById('tb-edit').hidden = false; } else { - document.getElementById('scholar-sidebar-object-pane').hidden = true; + document.getElementById('object-pane').hidden = true; + document.getElementById('tb-edit').hidden = true; } } @@ -119,7 +121,7 @@ Scholar.TreeView.prototype._insertItem = function(item, level, beforeRow) { thi Scholar.TreeView.prototype._deleteItem = function(row) { this._dataObjects.splice(row,1);; } -Scholar.TreeView.prototype._getObjectAtRow = function(row) { return this._dataObjects[row][0]; } +Scholar.TreeView.prototype._getItemAtRow = function(row) { return this._dataObjects[row][0]; } Scholar.TreeView.prototype.isSorted = function() { return false; } Scholar.TreeView.prototype.isSeparator = function(row) { return false; } Scholar.TreeView.prototype.isEditable = function(row, idx) { return false; } @@ -137,21 +139,21 @@ Scholar.TreeView.prototype.canDrop = function(row, orient) { return !orient; Scholar.TreeView.prototype.drop = function(row, orient) { } */ -function populateObjectPane(thisRow) +function populateObjectPane(thisItem) { removeDynamicRows(); - var fieldNames = getFullFieldList(thisRow); + var fieldNames = getFullFieldList(thisItem); for(var i = 0; i