Fix for certain situations where Zotero pane display settings could be reset
This commit is contained in:
parent
7e5b48838a
commit
c45198c90b
1 changed files with 3 additions and 0 deletions
|
@ -29,6 +29,7 @@ const ZOTERO_TAB_URL = "chrome://zotero/content/tab.xul";
|
|||
*/
|
||||
var ZoteroPane = new function()
|
||||
{
|
||||
var _unserialized = false;
|
||||
this.collectionsView = false;
|
||||
this.itemsView = false;
|
||||
this.__defineGetter__('loaded', function () _loaded);
|
||||
|
@ -3726,6 +3727,7 @@ var ZoteroPane = new function()
|
|||
* Unserializes zotero-persist elements from preferences
|
||||
*/
|
||||
this.unserializePersist = function() {
|
||||
_unserialized = true;
|
||||
var serializedValues = Zotero.Prefs.get("pane.persist");
|
||||
if(!serializedValues) return;
|
||||
serializedValues = JSON.parse(serializedValues);
|
||||
|
@ -3750,6 +3752,7 @@ var ZoteroPane = new function()
|
|||
* Serializes zotero-persist elements to preferences
|
||||
*/
|
||||
this.serializePersist = function() {
|
||||
if(!_unserialized) return;
|
||||
var serializedValues = {};
|
||||
for each(var el in document.getElementsByAttribute("zotero-persist", "*")) {
|
||||
if(!el.getAttribute) continue;
|
||||
|
|
Loading…
Reference in a new issue