Ensure the doc prefs window is smaller than screen height

Dynamically resizes the style picker up to the window height of 700px
This commit is contained in:
Adomas Venčkauskas 2018-08-20 12:42:45 +03:00
parent 8d5338db2d
commit 0fd28959bf
4 changed files with 5 additions and 6 deletions

View file

@ -239,7 +239,7 @@ var Zotero_File_Interface_Bibliography = new function() {
document.getElementById("citations").label = label;
}
window.sizeToContent();
window.resizeTo(window.outerWidth, Math.min(650, window.screen.availHeight));
};
/*

View file

@ -43,10 +43,10 @@
<script src="../include.js"/>
<script src="../bibliography.js"/>
<vbox id="zotero-bibliography-container">
<groupbox>
<vbox id="zotero-bibliography-container" flex="1">
<groupbox flex="1">
<caption label="&zotero.bibliography.style.label;"/>
<listbox id="style-listbox" onselect="Zotero_File_Interface_Bibliography.styleChanged()"/>
<listbox id="style-listbox" onselect="Zotero_File_Interface_Bibliography.styleChanged()" flex="1"/>
<hbox align="right">
<label id="manage-styles" class="text-link"
onclick="Zotero_File_Interface_Bibliography.manageStyles()">&zotero.bibliography.manageStyles;</label>

View file

@ -1488,7 +1488,7 @@ Zotero.Integration.Session.prototype.setDocPrefs = Zotero.Promise.coroutine(func
// Make sure styles are initialized for new docs
yield Zotero.Styles.init();
yield Zotero.Integration.displayDialog('chrome://zotero/content/integration/integrationDocPrefs.xul', '', io);
yield Zotero.Integration.displayDialog('chrome://zotero/content/integration/integrationDocPrefs.xul', 'resizable', io);
if (!io.style || !io.fieldType) {
throw new Zotero.Exception.UserCancelled("document preferences window");

View file

@ -1,6 +1,5 @@
#style-listbox
{
height: 19em;
width: 325pt;
}