Fix UI update on Commons enable/disable

This commit is contained in:
Dan Stillman 2010-08-31 06:45:45 +00:00
parent ab398bcd84
commit a081315876
2 changed files with 3 additions and 3 deletions

View file

@ -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;
}

View file

@ -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', []);
}