Correct field/getter names in collapsible-section CE
This commit is contained in:
parent
0f0fec0c64
commit
f30d8f07d5
1 changed files with 5 additions and 5 deletions
|
@ -168,7 +168,7 @@
|
||||||
this.render();
|
this.render();
|
||||||
});
|
});
|
||||||
|
|
||||||
this._notifierID = Zotero.Prefs.registerObserver(`panes.${this.dataset.pane}.open`, this._restoreOpenState.bind(this));
|
this._prefsObserverID = Zotero.Prefs.registerObserver(`panes.${this.dataset.pane}.open`, this._restoreOpenState.bind(this));
|
||||||
|
|
||||||
if (this.hasAttribute('data-l10n-id') && !this.hasAttribute('data-l10n-args')) {
|
if (this.hasAttribute('data-l10n-id') && !this.hasAttribute('data-l10n-args')) {
|
||||||
this.setAttribute('data-l10n-args', JSON.stringify({ count: 0 }));
|
this.setAttribute('data-l10n-args', JSON.stringify({ count: 0 }));
|
||||||
|
@ -278,16 +278,16 @@
|
||||||
this._head.removeEventListener('keydown', this._handleKeyDown);
|
this._head.removeEventListener('keydown', this._handleKeyDown);
|
||||||
this._head.removeEventListener('contextmenu', this._handleContextMenu);
|
this._head.removeEventListener('contextmenu', this._handleContextMenu);
|
||||||
|
|
||||||
Zotero.Prefs.unregisterObserver(this._notifierID);
|
Zotero.Prefs.unregisterObserver(this._prefsObserverID);
|
||||||
}
|
}
|
||||||
|
|
||||||
_saveOpenState() {
|
_saveOpenState() {
|
||||||
if (this._disableCachingOpenState) return;
|
if (this._disableSavingOpenState) return;
|
||||||
Zotero.Prefs.set(`panes.${this.dataset.pane}.open`, this.open);
|
Zotero.Prefs.set(`panes.${this.dataset.pane}.open`, this.open);
|
||||||
}
|
}
|
||||||
|
|
||||||
_restoreOpenState() {
|
_restoreOpenState() {
|
||||||
if (this._disableCachingOpenState) {
|
if (this._disableSavingOpenState) {
|
||||||
this.open = true;
|
this.open = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -312,7 +312,7 @@
|
||||||
return !!this.closest('panel, menupopup, merge-pane');
|
return !!this.closest('panel, menupopup, merge-pane');
|
||||||
}
|
}
|
||||||
|
|
||||||
get _disableCachingOpenState() {
|
get _disableSavingOpenState() {
|
||||||
return !!this.closest('merge-pane');
|
return !!this.closest('merge-pane');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue