From ca2ce1fc9d692ded3ddf201327bad119611b7f5c Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 18 Feb 2007 04:45:03 +0000 Subject: [PATCH] Addresses #493, Checkbox to display contents of subcollections when viewing collection I don't know that this merits an option in the prefs, but here's a hidden pref for displaying collection items recursively --- chrome/content/zotero/xpcom/collectionTreeView.js | 6 ++++++ defaults/preferences/zotero.js | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js index 049d91690..52bd04575 100644 --- a/chrome/content/zotero/xpcom/collectionTreeView.js +++ b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -729,6 +729,9 @@ Zotero.ItemGroup.prototype.getSearchObject = function() { if (this.isCollection()) { s.addCondition('collectionID', 'is', this.ref.getID()); + if (Zotero.Prefs.get('recursiveCollections')) { + s.addCondition('recursive', 'true'); + } } else if (this.isSearch()) { @@ -744,6 +747,9 @@ Zotero.ItemGroup.prototype.getSearchObject = function() { else if (this.isCollection()){ s.addCondition('noChildren', 'true'); s.addCondition('collectionID', 'is', this.ref.getID()); + if (Zotero.Prefs.get('recursiveCollections')) { + s.addCondition('recursive', 'true'); + } } else if (this.isSearch()){ s.load(this.ref['id']); diff --git a/defaults/preferences/zotero.js b/defaults/preferences/zotero.js index 545d42537..f4b2fb18c 100644 --- a/defaults/preferences/zotero.js +++ b/defaults/preferences/zotero.js @@ -1,6 +1,5 @@ // These are DEFAULT prefs for the INSTALL. You will have to reinstall the extension to see differences! -// Display internal shortcut pref("extensions.zotero.debug.log",false); pref("extensions.zotero.debug.level",5); pref("extensions.zotero.automaticScraperUpdates",true); @@ -15,6 +14,8 @@ pref("extensions.zotero.downloadAssociatedFiles",false); pref("extensions.zotero.reportTranslationFailure",true); pref("extensions.zotero.automaticTags",true); pref("extensions.zotero.fontSize", "1.0"); +pref("extensions.zotero.recursiveCollections", false); + pref("extensions.zotero.lastCreatorFieldMode",0); pref("extensions.zotero.lastAbstractExpand",0);