Show "Unfiled Items" in personal library by default

This commit is contained in:
Dan Stillman 2011-02-14 04:57:38 +00:00
parent 1e60f8947a
commit f7a0602b3b
2 changed files with 7 additions and 5 deletions

View File

@ -106,7 +106,9 @@ Zotero.CollectionTreeView.prototype.refresh = function()
var unfiledLibraries = Zotero.Prefs.get('unfiledLibraries').split(',');
}
catch (e) {
unfiledLibraries = [];
// Add to personal library by default
Zotero.Prefs.set('unfiledLibraries', '0');
unfiledLibraries = ['0'];
}
var self = this;

View File

@ -1604,14 +1604,14 @@ Zotero.Prefs = new function(){
Zotero.debug("Creating boolean pref '" + pref + "'");
return this.prefBranch.setBoolPref(pref, value);
}
if (parseInt(value) == value) {
Zotero.debug("Creating integer pref '" + pref + "'");
return this.prefBranch.setIntPref(pref, value);
}
if (typeof value == 'string') {
Zotero.debug("Creating string pref '" + pref + "'");
return this.prefBranch.setCharPref(pref, value);
}
if (parseInt(value) == value) {
Zotero.debug("Creating integer pref '" + pref + "'");
return this.prefBranch.setIntPref(pref, value);
}
throw ("Invalid preference value '" + value + "' for pref '" + pref + "'");
}
}