Fix UI update on Commons enable/disable
This commit is contained in:
parent
ab398bcd84
commit
a081315876
2 changed files with 3 additions and 3 deletions
|
@ -315,7 +315,7 @@ Zotero.CollectionTreeView.prototype.reload = function()
|
||||||
*/
|
*/
|
||||||
Zotero.CollectionTreeView.prototype.notify = function(action, type, ids)
|
Zotero.CollectionTreeView.prototype.notify = function(action, type, ids)
|
||||||
{
|
{
|
||||||
if (!ids || ids.length == 0) {
|
if ((!ids || ids.length == 0) && action != 'refresh') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1389,14 +1389,14 @@ Zotero.Prefs = new function(){
|
||||||
Zotero.Commons.enabled = true;
|
Zotero.Commons.enabled = true;
|
||||||
Zotero.Commons.accessKey = xml.setting.(@id == 'commons-accessKey').toString();
|
Zotero.Commons.accessKey = xml.setting.(@id == 'commons-accessKey').toString();
|
||||||
Zotero.Commons.secretKey = xml.setting.(@id == 'commons-secretKey').toString();
|
Zotero.Commons.secretKey = xml.setting.(@id == 'commons-secretKey').toString();
|
||||||
ZoteroPane.collectionsView.refresh();
|
|
||||||
}
|
}
|
||||||
else if (commonsEnable == 'false') {
|
else if (commonsEnable == 'false') {
|
||||||
Zotero.Commons.enabled = false;
|
Zotero.Commons.enabled = false;
|
||||||
Zotero.Commons.accessKey = '';
|
Zotero.Commons.accessKey = '';
|
||||||
Zotero.Commons.secretKey = '';
|
Zotero.Commons.secretKey = '';
|
||||||
ZoteroPane.collectionsView.refresh();
|
|
||||||
}
|
}
|
||||||
|
// This is kind of a hack
|
||||||
|
Zotero.Notifier.trigger('refresh', 'collection', []);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue