Commit 74bc1920 authored by Timothy Stack's avatar Timothy Stack

Convert to a CSS layout, hopefully it should make some workbenchy
things easier.

	* www/beginexp_form.php3: Widen the nscheck window a bit so it
	looks nice.

	* www/common-style.css: Clean out some dead definitions.

	* www/GNUmakefile.in, www/csshover.htc: Some magic that makes IE
	support the :hover CSS pseudo-class.

	* www/currentusage.php3: Tweak the header on the usage table.

	* www/linktest.php3: Drop an extraneous </div>.

	* www/menu.php3, www/tutorial/mobilewireless.php3: Use CSS and
	semantic markup instead of tables.

	* www/nscheck.php3: Hide some of the extra stuff.

	* www/style-doc.css: Some styling specific to documentation.

	* www/style.css, www/style-nonmain.css: Update for changes to
	menu.php3 and try to clean out some old stuff.
parent 61d45939
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2005 University of Utah and the Flux Group.
# Copyright (c) 2000-2006 University of Utah and the Flux Group.
# All rights reserved.
#
SRCDIR = @srcdir@
......@@ -48,6 +48,7 @@ FILES += $(wildcard $(SRCDIR)/*.ico)
FILES += $(wildcard $(SRCDIR)/*.class)
FILES += $(wildcard $(SRCDIR)/*.jar)
FILES += $(wildcard $(SRCDIR)/*.js)
FILES += $(wildcard $(SRCDIR)/*.htc)
FILES += $(SRCDIR)/.htaccess $(SRCDIR)/error.shtml \
$(SRCDIR)/ssh-mime.pl $(SRCDIR)/rdp-mime.pl \
$(SRCDIR)/ssh-mime-winxp.pl $(SRCDIR)/rdp-mime-winxp.pl \
......
......@@ -220,7 +220,7 @@ function SPITFORM($formfields, $errors)
document.form1.submit();
}
function SyntaxCheck() {
window.open('','nscheck','width=600,height=400,toolbar=no,".
window.open('','nscheck','width=650,height=400,toolbar=no,".
"resizeable=yes,scrollbars=yes,status=yes,".
"menubar=yes');
var action = document.form1.action;
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2000-2005 University of Utah and the Flux Group.
* Copyright (c) 2000-2006 University of Utah and the Flux Group.
* All rights reserved.
*/
......@@ -11,14 +11,6 @@ h5,h6 { font-weight: normal; }
p { text-indent: 1em; }
.m2enu {
background-color: #FFF;
border: 0px;
margin: 0px;
padding: 0px; }
.me2nuheader { font-size: 200%; color: #000; }
body, html {
margin: 0;
color: #000000;
......
<attach event="ondocumentready" handler="parseStylesheets" />
<script>
/**
* Whatever:hover - V1.42.060206 - hover & active
* ------------------------------------------------------------
* (c) 2005 - Peter Nederlof
* Peterned - http://www.xs4all.nl/~peterned/
* License - http://creativecommons.org/licenses/LGPL/2.1/
*
* Whatever:hover is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* Whatever:hover is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* Credits and thanks to:
* Arnoud Berendsen, Martin Reurings, Robert Hanson
*
* howto: body { behavior:url("csshover.htc"); }
* ------------------------------------------------------------
*/
var csshoverReg = /(^|\s)(([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active)/i,
currentSheet, doc = window.document, hoverEvents = [], activators = {
onhover:{on:'onmouseover', off:'onmouseout'},
onactive:{on:'onmousedown', off:'onmouseup'}
}
function parseStylesheets() {
if(!/MSIE (5|6)/.test(navigator.userAgent)) return;
window.attachEvent('onunload', unhookHoverEvents);
var sheets = doc.styleSheets, l = sheets.length;
for(var i=0; i<l; i++)
parseStylesheet(sheets[i]);
}
function parseStylesheet(sheet) {
if(sheet.imports) {
try {
var imports = sheet.imports, l = imports.length;
for(var i=0; i<l; i++) parseStylesheet(sheet.imports[i]);
} catch(securityException){}
}
try {
var rules = (currentSheet = sheet).rules, l = rules.length;
for(var j=0; j<l; j++) parseCSSRule(rules[j]);
} catch(securityException){}
}
function parseCSSRule(rule) {
var select = rule.selectorText, style = rule.style.cssText;
if(!csshoverReg.test(select) || !style) return;
var pseudo = select.replace(/[^:]+:([a-z-]+).*/i, 'on$1');
var newSelect = select.replace(/(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi, '.$2' + pseudo);
var className = (/\.([a-z0-9_-]*on(hover|active))/i).exec(newSelect)[1];
var affected = select.replace(/:(hover|active).*$/, '');
var elements = getElementsBySelect(affected);
if(elements.length == 0) return;
currentSheet.addRule(newSelect, style);
for(var i=0; i<elements.length; i++)
new HoverElement(elements[i], className, activators[pseudo]);
}
function HoverElement(node, className, events) {
if(!node.hovers) node.hovers = {};
if(node.hovers[className]) return;
node.hovers[className] = true;
hookHoverEvent(node, events.on, function() { node.className += ' ' + className; });
hookHoverEvent(node, events.off, function() { node.className = node.className.replace(new RegExp('\\s+'+className, 'g'),''); });
}
function hookHoverEvent(node, type, handler) {
node.attachEvent(type, handler);
hoverEvents[hoverEvents.length] = {
node:node, type:type, handler:handler
};
}
function unhookHoverEvents() {
for(var e,i=0; i<hoverEvents.length; i++) {
e = hoverEvents[i];
e.node.detachEvent(e.type, e.handler);
}
}
function getElementsBySelect(rule) {
var parts, nodes = [doc];
parts = rule.split(' ');
for(var i=0; i<parts.length; i++) {
nodes = getSelectedNodes(parts[i], nodes);
} return nodes;
}
function getSelectedNodes(select, elements) {
var result, node, nodes = [];
var identify = (/\#([a-z0-9_-]+)/i).exec(select);
if(identify) {
var element = doc.getElementById(identify[1]);
return element? [element]:nodes;
}
var classname = (/\.([a-z0-9_-]+)/i).exec(select);
var tagName = select.replace(/(\.|\#|\:)[a-z0-9_-]+/i, '');
var classReg = classname? new RegExp('\\b' + classname[1] + '\\b'):false;
for(var i=0; i<elements.length; i++) {
result = tagName? elements[i].all.tags(tagName):elements[i].all;
for(var j=0; j<result.length; j++) {
node = result[j];
if(classReg && !classReg.test(node.className)) continue;
nodes[nodes.length] = node;
}
}
return nodes;
}
</script>
\ No newline at end of file
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2005 University of Utah and the Flux Group.
# Copyright (c) 2000-2006 University of Utah and the Flux Group.
# All rights reserved.
#
require("defs.php3");
......@@ -60,9 +60,8 @@ function SHOWSTATS()
PAGEBEGINNING("Current Usage", 1, 1);
?>
<table valign=top align=center width=100% height=100% border=1>
<tr><td nowrap colspan=2 class="contentheader"
bgcolor="#E1EAEA" align="center">
<font size=-1>Current Experiments</font></td></tr>
<tr><th nowrap colspan=2 class='usagetitle'>
Current Experiments</th></tr>
<tr><td class="menuoptusage" align=right>
<?php echo $active_expts ?></td>
<td align="left" class="menuoptusage">
......
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2005 University of Utah and the Flux Group.
# Copyright (c) 2000-2006 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
......@@ -399,8 +399,7 @@ echo "</div>\n";
echo "<div id=output style='overflow:auto'>
<iframe onload=\"linktest_stopped();\"
width=80% height=400 scrolling=auto id=outputarea frameborder=1>
</iframe></center>
</div>\n";
</iframe></center>\n";
echo "</center>\n";
#
......
This diff is collapsed.
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# Copyright (c) 2000-2003, 2006 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");
#
# Define a stripped-down view of the web interface - less clutter
#
$view = array(
'hide_banner' => 1,
'hide_sidebar' => 1,
'hide_copyright' => 1
);
#
# Standard Testbed Header
#
PAGEHEADER("Syntax Check an NS File");
PAGEHEADER("Syntax Check an NS File", $view);
#
# Only known and logged in users can begin experiments.
......
/*
* EMULAB-COPYRIGHT
* Copyright (c) 2006 University of Utah and the Flux Group.
* All rights reserved.
*/
/*
* Some extra styling that puts documentation in a three column format with
* section headings in the left column, main text in the center, and figures
* in the right.
*/
#doctitle {
text-align: center;
}
.docsection {
border-top: solid 1px silver; /* Separate the sections. */
padding-top: 0px;
padding-left: 13ex; /* Make room for the left column. */
padding-right: 101px; /* Make room for the right column. */
margin-top: 16px;
margin-bottom: 16px;
}
.docsection h1, .docsection h2 {
float: left;
display: inline; /* XXX IE doubles the margins otherwise. */
margin: 0px;
margin-left: -13ex; /* Move it into the left column. */
width: 12ex;
text-align: right;
}
.docsection h1 {
padding-top: 1em;
font-size: medium;
}
.docsection h2 {
font-style: italic;
font-weight: normal;
font-size: small;
line-height: 1.5em;
}
.docsection p {
text-indent: 0px; /* Don't indent the first line. */
}
/* Place pictures that are 93px wide in the right column. */
.docfig {
float: right;
display: inline; /* XXX IE doubles the margins otherwise. */
padding: 0px;
margin: 0px;
margin-top: 16px;
margin-right: -101px;
width: 98px;
text-align: center;
white-space: nowrap;
font-size: x-small;
}
.docfig a { display: block; }
.docfig img { border: solid 1px; }
/* Surround sample code with a light gray border. */
.samplecode {
white-space: pre;
display: block;
border: solid 1px #bbb;
margin-top: 16px;
margin-right: 16px;
margin-left: 16px;
padding: 3px;
}
.caption {
display: block;
text-align: center;
font-size: x-small;
}
/* Stuff specific to the mobile wireless tutorial below. */
/* Float the list of tools useful for robots to the right. */
#toollist {
float: right;
display: inline; /* XXX IE doubles the margins otherwise. */
border: solid 1px silver;
background-color: #f1fafa;
margin-right: -95px;
margin-top: 1em;
}
#toollist h3 {
margin: 2px;
font-size: medium;
}
#toollist ul {
padding: 0px;
margin: 3px;
font-size: smaller;
}
#toollist li {
list-style: none;
}
#captionLayer {
height: 2em;
}
/* Make a horizontal list of robot thumbnail pictures. */
#robothumbs {
margin-left: -15ex;
margin-right: -101px;
text-align: center;
}
#robothumbs li {
display: inline;
list-style: none;
padding-left: 16px;
}
td, th {
border: solid 0px #696;
background-color: #F1FAF1;
border: solid 0px #696;
background-color: #F1FAF1;
}
.leftcell {
background-image: url(wallpaper0.jpg);
background-color: #9BBBAC;
span.devpagename {
color: #CCFFCC;
font-weight: bold;
font-size: large;
}
.rightcell {
background-image: url(wallpaper0.jpg);
background-color: #9BBBAC;
.menuheader, .submenuheader, .contenttitle {
background-color: #060;
}
.menuheader {
background-color: #060;
.leftcell {
border: solid 2px black;
}
.menufooter {
background-color: #acb;
.leftcell, #searchrow form, #searchrow table, #searchrow table td {
background-color: #dfe;
}
.menuopt, .menuoptb, .menuoptdiv, .menuopts, .menuoptst, .menuoptsb, .submenuopt, .submenuoptdiv {
background-color: #CED;
}
.menuopts, .menuoptst, .menuoptsb {
background-color: #dfe;
ul.submenu, .submenuheader, #searchrow {
border-color: #060;
}
.contentheader {
background-color: #060;
ul.menu, ul.submenu {
background-color: #CED;
}
body { background-image: url(wallpaper0.jpg); }
body { background-image: url("wallpaper0.jpg"); }
th { background-color: #E1EAE1; }
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment