diff --git a/chrome/chromeFiles/content/scholar/bindings/relatedbox.xml b/chrome/chromeFiles/content/scholar/bindings/relatedbox.xml index 169fc31408..b98ea6bd87 100644 --- a/chrome/chromeFiles/content/scholar/bindings/relatedbox.xml +++ b/chrome/chromeFiles/content/scholar/bindings/relatedbox.xml @@ -58,15 +58,22 @@ var label = document.createElement("label"); label.setAttribute('value', seealso[i].getField('title')); label.setAttribute('crop','end'); - + label.setAttribute('flex','1'); + + var box = document.createElement('box'); + box.setAttribute('onclick',"this.parentNode.parentNode.parentNode.parentNode.parentNode.showItem('"+seealso[i].getID()+"')"); + box.setAttribute('class','clicky'); + box.setAttribute('flex','1'); + box.appendChild(icon); + box.appendChild(label); + var remove = document.createElement("label"); remove.setAttribute('value','-'); remove.setAttribute('onclick',"this.parentNode.parentNode.parentNode.parentNode.parentNode.remove('"+seealso[i].getID()+"');"); remove.setAttribute('class','clicky'); var row = document.createElement("row"); - row.appendChild(icon); - row.appendChild(label); + row.appendChild(box); row.appendChild(remove); row.setAttribute('id','seealso-'+seealso[i].getID()); rows.appendChild(row); @@ -111,6 +118,42 @@ ]]> + + + + + + @@ -143,9 +186,8 @@ - + - diff --git a/chrome/chromeFiles/content/scholar/itemTreeView.js b/chrome/chromeFiles/content/scholar/itemTreeView.js index 3face4f9ba..7f5f0b0305 100644 --- a/chrome/chromeFiles/content/scholar/itemTreeView.js +++ b/chrome/chromeFiles/content/scholar/itemTreeView.js @@ -141,7 +141,7 @@ Scholar.ItemTreeView.prototype.notify = function(action, type, ids) if(action == 'add') { - this.selectItem(this._itemRowMap[item.getID()]); + this.selectItem(item.getID()); } else { @@ -440,12 +440,12 @@ Scholar.ItemTreeView.prototype.sort = function() */ Scholar.ItemTreeView.prototype.selectItem = function(id) { - var item = Scholar.Items.get(id); - var row = this._itemRowMap[item.getID()]; + var row = this._itemRowMap[id]; if(row == null) { + var item = Scholar.Items.get(id); this.toggleOpenState(this._itemRowMap[item.getSource()]); //opens the parent of the item - row = this._itemRowMap[item.getID()]; + row = this._itemRowMap[id]; } this.selection.select(row); diff --git a/chrome/chromeFiles/content/scholar/overlay.xul b/chrome/chromeFiles/content/scholar/overlay.xul index f7592d0159..0f056d512c 100644 --- a/chrome/chromeFiles/content/scholar/overlay.xul +++ b/chrome/chromeFiles/content/scholar/overlay.xul @@ -93,7 +93,7 @@