commit 78618ff88ba177ed2dd7ceedd818816c7a111697 parent b1f80a361556d1a0d5ac9863260990065addbf5c Author: Dan Stillman <dstillman@zotero.org> Date: Tue, 19 Mar 2013 06:16:11 -0400 Fix collections-containing-an-item highlighting in Fx22+ Diffstat:
| M | chrome/content/zotero/xpcom/collectionTreeView.js | | | 19 | +++++++++++++++---- |
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -1817,12 +1817,23 @@ Zotero.CollectionTreeView.prototype.isSorted = function() { return false; Zotero.CollectionTreeView.prototype.isEditable = function(row, idx) { return false; } /* Set 'highlighted' property on rows set by setHighlightedRows */ -Zotero.CollectionTreeView.prototype.getRowProperties = function(row, props) { +Zotero.CollectionTreeView.prototype.getRowProperties = function(row, prop) { + var props = []; + if (this._highlightedRows[row]) { - var aServ = Components.classes["@mozilla.org/atom-service;1"]. - getService(Components.interfaces.nsIAtomService); - props.AppendElement(aServ.getAtom("highlighted")); + // <=Fx21 + if (prop) { + var aServ = Components.classes["@mozilla.org/atom-service;1"]. + getService(Components.interfaces.nsIAtomService); + prop.AppendElement(aServ.getAtom("highlighted")); + } + // Fx22+ + else { + props.push("highlighted"); + } } + + return props.join(" "); } Zotero.CollectionTreeView.prototype.getColumnProperties = function(col, prop) { }