svn commit: samba r13145 - in
branches/tmp/deryck-samba4-swat/swat/js: .
deryck at samba.org
deryck at samba.org
Wed Jan 25 22:58:34 GMT 2006
Author: deryck
Date: 2006-01-25 22:58:33 +0000 (Wed, 25 Jan 2006)
New Revision: 13145
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=13145
Log:
Expand the "console" div if content overflows the window.
deryck
Modified:
branches/tmp/deryck-samba4-swat/swat/js/display.js
Changeset:
Modified: branches/tmp/deryck-samba4-swat/swat/js/display.js
===================================================================
--- branches/tmp/deryck-samba4-swat/swat/js/display.js 2006-01-25 22:47:10 UTC (rev 13144)
+++ branches/tmp/deryck-samba4-swat/swat/js/display.js 2006-01-25 22:58:33 UTC (rev 13145)
@@ -6,6 +6,27 @@
//
// Released under the GNU GPL v2 or later.
+function setAppLen()
+{
+ // Find the nodes by ID
+ var header = el('header');
+ var menu = el('menu');
+ var app = el('app');
+ var help = el('help');
+ var content = el('content');
+
+ // If screen is small, extend app space to cover content and help
+ if (elY(app) < elY(content) || elY(app) < elY(help)) {
+ var nY = Math.max(elY(content), elY(help));
+ // Account for header, menu, and padding
+ nY = nY + elY(header) + elY(menu) + 10;
+ app.style.height = px(nY + 10);
+ } else {
+ // Revert to default stylesheet setting otherwise
+ app.style.height = '100%';
+ }
+}
+
function setHelpLen()
{
// Find the nodes by ID
@@ -27,11 +48,13 @@
// Init the page.
// All client side onload functions should be placed here for now.
window.onload = function() {
+ setAppLen();
if (el('help')) {
setHelpLen();
}
}
window.onresize = function() {
+ setAppLen();
if (el('help')) {
setHelpLen();
}
More information about the samba-cvs
mailing list