diff --git a/chrome/content/zotero/selectItemsDialog.js b/chrome/content/zotero/selectItemsDialog.js index c9fe2f64a..febbdfdd8 100644 --- a/chrome/content/zotero/selectItemsDialog.js +++ b/chrome/content/zotero/selectItemsDialog.js @@ -44,6 +44,8 @@ function doLoad() if(io.singleSelection) document.getElementById("zotero-items-tree").setAttribute("seltype", "single"); collectionsView = new Zotero.CollectionTreeView(); + // Don't show Commons when citing + collectionsView.showCommons = false; document.getElementById('zotero-collections-tree').view = collectionsView; if(io.select) itemsView.selectItem(io.select); } diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js index 1ca88dda6..d4db7c8a5 100644 --- a/chrome/content/zotero/xpcom/collectionTreeView.js +++ b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -32,7 +32,7 @@ //////////////////////////////////////////////////////////////////////////////// /* - * Constructor the the CollectionTreeView object + * Constructor for the CollectionTreeView object */ Zotero.CollectionTreeView = function() { @@ -41,6 +41,7 @@ Zotero.CollectionTreeView = function() this._highlightedRows = {}; this._unregisterID = Zotero.Notifier.registerObserver(this, ['collection', 'search', 'share', 'group', 'bucket']); this.showDuplicates = false; + this.showCommons = true; } /* @@ -250,7 +251,7 @@ Zotero.CollectionTreeView.prototype.refresh = function() } } - if (Zotero.Commons.enabled) { + if (this.showCommons && Zotero.Commons.enabled) { this._showItem(new Zotero.ItemGroup('separator', false)); var header = { id: "commons-header", @@ -860,14 +861,13 @@ Zotero.CollectionTreeView.prototype._hideItem = function(row) } /* - * Returns a reference to the collection at row (see Zotero.Collection in data_access.js) + * Returns Zotero.ItemGroup at row */ Zotero.CollectionTreeView.prototype._getItemAtRow = function(row) { return this._dataItems[row][0]; } - /* * Saves the ids of the currently selected item for later */