Restore default Zotero pane height of 300px if no savedHeight

This commit is contained in:
Dan Stillman 2007-04-13 21:34:28 +00:00
parent 6e6e8b5d69
commit c6f4a0d023
2 changed files with 7 additions and 2 deletions

View file

@ -85,6 +85,7 @@ var ZoteroPane = new function()
this.relinkAttachment = relinkAttachment;
this.reportErrors = reportErrors;
const DEFAULT_ZPANE_HEIGHT = 300;
const COLLECTIONS_HEIGHT = 125; // minimum height of the collections pane and toolbar
var self = this;
@ -238,7 +239,12 @@ var ZoteroPane = new function()
this.fullScreen(true);
}
var savedHeight = zoteroPane.getAttribute('savedHeight');
if (zoteroPane.hasAttribute('savedHeight')) {
var savedHeight = zoteroPane.getAttribute('savedHeight');
}
else {
var savedHeight = DEFAULT_ZPANE_HEIGHT;
}
/*
Zotero.debug("zoteroPane.boxObject.height: " + zoteroPane.boxObject.height);

View file

@ -20,7 +20,6 @@
#zotero-pane
{
min-height: 32px; /* must match value in ZoteroPane.updateTagSelectorSize() */
height: 300px;
padding: 0 7px 4px;
overflow: hidden;
}