From c6f4a0d0236eacde54f0af60911f7cb318fe89bc Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 13 Apr 2007 21:34:28 +0000 Subject: [PATCH] Restore default Zotero pane height of 300px if no savedHeight --- chrome/content/zotero/overlay.js | 8 +++++++- chrome/skin/default/zotero/overlay.css | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index c1addcf3ab..ab23d3a3b2 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -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); diff --git a/chrome/skin/default/zotero/overlay.css b/chrome/skin/default/zotero/overlay.css index 409918bf1f..e9ddfeb4ec 100644 --- a/chrome/skin/default/zotero/overlay.css +++ b/chrome/skin/default/zotero/overlay.css @@ -20,7 +20,6 @@ #zotero-pane { min-height: 32px; /* must match value in ZoteroPane.updateTagSelectorSize() */ - height: 300px; padding: 0 7px 4px; overflow: hidden; }