www

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

commit a0813158766d565421c356bf990a849ca8ff3a02
parent ab398bcd8457d5c2f99fca1293f15f98ebb87d43
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 31 Aug 2010 06:45:45 +0000

Fix UI update on Commons enable/disable


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

diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -315,7 +315,7 @@ Zotero.CollectionTreeView.prototype.reload = function() */ Zotero.CollectionTreeView.prototype.notify = function(action, type, ids) { - if (!ids || ids.length == 0) { + if ((!ids || ids.length == 0) && action != 'refresh') { return; } diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js @@ -1389,14 +1389,14 @@ Zotero.Prefs = new function(){ Zotero.Commons.enabled = true; Zotero.Commons.accessKey = xml.setting.(@id == 'commons-accessKey').toString(); Zotero.Commons.secretKey = xml.setting.(@id == 'commons-secretKey').toString(); - ZoteroPane.collectionsView.refresh(); } else if (commonsEnable == 'false') { Zotero.Commons.enabled = false; Zotero.Commons.accessKey = ''; Zotero.Commons.secretKey = ''; - ZoteroPane.collectionsView.refresh(); } + // This is kind of a hack + Zotero.Notifier.trigger('refresh', 'collection', []); }