www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit b3aa705bfd3795aefce819c51c8a8225ebccfed7
parent 23dae264084d285a2719de83f88084b9d344e87a
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 24 Aug 2010 20:23:52 +0000

Fixes #1713, Don't show Zotero Commons in Word Processor Plugins


Diffstat:
Mchrome/content/zotero/selectItemsDialog.js | 2++
Mchrome/content/zotero/xpcom/collectionTreeView.js | 8++++----
2 files changed, 6 insertions(+), 4 deletions(-)

diff --git 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 @@ -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 */