Fixes #1713, Don't show Zotero Commons in Word Processor Plugins
This commit is contained in:
parent
23dae26408
commit
b3aa705bfd
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user