mirror of
https://github.com/zotero/zotero.git
synced 2026-09-27 01:21:27 +00:00
Fix note type picker appearing for Google Docs
Report https://forums.zotero.org/discussion/126026/endnotes-option-showing-in-google-docs
This commit is contained in:
parent
4d803fe2cd
commit
b1dbe35102
1 changed files with 12 additions and 3 deletions
|
|
@ -276,15 +276,24 @@
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
handleStyleChanged(style) {
|
||||
this.querySelector('#locale-selector').style = style;
|
||||
|
||||
toggleNoteTypePicker(style) {
|
||||
const styleData = style ? Zotero.Styles.get(style) : null;
|
||||
const isNoteStyle = (styleData || {}).class === 'note';
|
||||
const noMultipleNotes = this.hasAttribute('no-multi-notes');
|
||||
this.querySelector('.display-as-wrapper').style.display
|
||||
= (isNoteStyle && !noMultipleNotes) ? '' : 'none';
|
||||
}
|
||||
|
||||
toggleAttribute(name, force) {
|
||||
super.toggleAttribute(name, force);
|
||||
this.toggleNoteTypePicker(this.querySelector('#locale-selector').style);
|
||||
}
|
||||
|
||||
handleStyleChanged(style) {
|
||||
this.querySelector('#locale-selector').style = style;
|
||||
this.toggleNoteTypePicker(style);
|
||||
}
|
||||
}
|
||||
|
||||
customElements.define('locale-selector', LocaleSelector);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue