fx-compat: Fix context pane:

- Stacked view.
- Item pane tabs.
- Note list search box.
This commit is contained in:
Martynas Bagdonas 2022-05-19 14:08:11 +03:00
parent e99a0d4515
commit 7b4c4e528c
2 changed files with 5 additions and 6 deletions

View file

@ -366,7 +366,7 @@ var ZoteroContextPane = new function () {
var height = 0;
if (Zotero.Prefs.get('layout') == 'stacked'
&& _contextPane.getAttribute('collapsed') != 'true') {
height = _contextPaneInner.boxObject.height;
height = _contextPaneInner.getBoundingClientRect().height;
}
Zotero.Reader.setBottomPlaceholderHeight(height);
}
@ -475,9 +475,8 @@ var ZoteroContextPane = new function () {
var vbox = document.createXULElement('vbox');
vbox.style.flex = '1';
var input = document.createXULElement('textbox');
input.style.width = 'calc(100% - 42px)';
input.style.marginLeft = '12px';
var input = document.createXULElement('search-textbox');
input.style.margin = '4px 7px';
input.setAttribute('type', 'search');
input.setAttribute('timeout', '250');
input.addEventListener('command', () => {
@ -831,8 +830,6 @@ var ZoteroContextPane = new function () {
_updateAddToNote();
});
tabbox.append(tabs, tabpanels);
// Info tab
var tabInfo = document.createXULElement('tab');
tabInfo.setAttribute('label', Zotero.Intl.strings['zotero.tabs.info.label']);
@ -844,6 +841,7 @@ var ZoteroContextPane = new function () {
tabRelated.setAttribute('label', Zotero.Intl.strings['zotero.tabs.related.label']);
tabs.append(tabInfo, tabTags, tabRelated);
tabbox.append(tabs, tabpanels);
// Info panel
var panelInfo = document.createXULElement('tabpanel');

View file

@ -3,6 +3,7 @@
}
#zotero-context-pane {
display: flex;
min-width: 360px;
}