commit f5b2f77a3a51e8931a946b920e831e2c9515f010
parent e92b46a46ca88c6205f7d34cb12e302ee7642c48
Author: Simon Kornblith <simon@simonster.com>
Date: Thu, 9 Apr 2009 05:28:41 +0000
hide toolbars when Zotero is in fullscreen mode. this doesn't look quite right on OS X, but I can't figure out how to fix it.
Diffstat:
1 file changed, 34 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js
@@ -90,6 +90,7 @@ var ZoteroPane = new function()
const COLLECTIONS_HEIGHT = 125; // minimum height of the collections pane and toolbar
var self = this;
+ var titlebarcolorState, collapseState, titleState;
/*
* Called when the window is open
@@ -388,6 +389,39 @@ var ZoteroPane = new function()
document.getElementById('content').setAttribute('collapsed', makeFullScreen);
document.getElementById('zotero-splitter').setAttribute('hidden', makeFullScreen);
fs.setAttribute('fullscreenmode', makeFullScreen);
+
+ // hide or show navigation toolbars
+ var toolbox = getNavToolbox();
+ if(makeFullScreen) {
+ titleState = document.title;
+ document.title = "Zotero";
+
+ // the below would be a good thing to do if the whole title bar (and not just the center
+ // part) got updated when it happened...
+ /*if(Zotero.isMac) {
+ titlebarcolorState = document.documentElement.getAttribute("activetitlebarcolor");
+ document.documentElement.removeAttribute("activetitlebarcolor");
+ }*/
+ if(Zotero.isMac) document.getElementById("zotero-pane").style.borderTop = "1px solid black";
+
+ collapseState = [node.collapsed for each (node in toolbox.childNodes)];
+ for(var i=0; i<toolbox.childNodes.length; i++) {
+ toolbox.childNodes[i].collapsed = true;
+ }
+
+ window.focus();
+ } else {
+ document.title = titleState;
+
+ /*if(Zotero.isMac) {
+ document.documentElement.setAttribute("activetitlebarcolor", titlebarcolorState);
+ }*/
+ if(Zotero.isMac) document.getElementById("zotero-pane").style.borderTop = "";
+
+ for(var i=0; i<toolbox.childNodes.length; i++) {
+ toolbox.childNodes[i].collapsed = collapseState[i];
+ }
+ }
}