Merge pull request #5 from NeoRaider/master

HTML validity fixes
alfred-data
Nils Schneider 2012-06-16 16:40:53 -07:00
commit 8029b390fd
5 changed files with 14 additions and 12 deletions

View File

@ -49,6 +49,6 @@
fill: #C83771; fill: #C83771;
} }
sidebar { #sidebar {
color: #ddd; color: #ddd;
} }

View File

@ -55,6 +55,6 @@
fill: #C83771; fill: #C83771;
} }
sidebar { #sidebar {
color: #777; color: #777;
} }

View File

@ -131,7 +131,7 @@
text-shadow: none; text-shadow: none;
} }
sidebar { #sidebar {
position: absolute; position: absolute;
top: 1em; top: 1em;
right: 1.5em; right: 1.5em;
@ -153,7 +153,7 @@ sidebar {
vertical-align: center; vertical-align: center;
} }
sidebar h2 { #sidebar h2 {
margin-top: 0; margin-top: 0;
font-size: 9pt; font-size: 9pt;
} }

View File

@ -5,13 +5,15 @@ function switch_style(s) {
for (var i = 0; i < el.length; i++ ) { for (var i = 0; i < el.length; i++ ) {
if (el[i].getAttribute("rel").indexOf("style") != -1 if (el[i].getAttribute("rel").indexOf("style") != -1
&& el[i].getAttribute("title")) { && el[i].getAttribute("title")) {
if (el[i].getAttribute("title") == s) { /* always set to true first to workaround Chrome bug */
style_btn.text(s)
el[i].disabled = false
} else
el[i].disabled = true el[i].disabled = true
if (el[i].getAttribute("title") == s)
el[i].disabled = false
} }
} }
style_btn.text(s)
} }
function getOffset( el ) { function getOffset( el ) {
@ -109,7 +111,7 @@ btns.append("button")
.text("VPN") .text("VPN")
.on("click", update_graph) .on("click", update_graph)
var meshinfo = d3.select("sidebar") var meshinfo = d3.select("#sidebar")
.insert("div", ":first-child") .insert("div", ":first-child")
meshinfo.append("h2").text("Mesh") meshinfo.append("h2").text("Mesh")

View File

@ -5,7 +5,7 @@
<title>Freifunk Lübeck - Knotengraph</title> <title>Freifunk Lübeck - Knotengraph</title>
<link href='style.css' rel='stylesheet' type='text/css' /> <link href='style.css' rel='stylesheet' type='text/css' />
<link href='force.css' rel='stylesheet' type='text/css' /> <link href='force.css' rel='stylesheet' type='text/css' />
<link href='force-big.css' rel='alternate stylesheet' type='text/css' title='big' disabled/> <link href='force-big.css' rel='alternate stylesheet' type='text/css' title='big'/>
<link href='force-light.css' rel='stylesheet' type='text/css' title='light'/> <link href='force-light.css' rel='stylesheet' type='text/css' title='light'/>
<script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="d3.v2.js"></script> <script type="text/javascript" src="d3.v2.js"></script>
@ -22,7 +22,7 @@
</ul> </ul>
</header> </header>
<div id="chart"> <div id="chart">
<sidebar> <div id="sidebar">
<div id="legend"> <div id="legend">
<h2>Legende</h2> <h2>Legende</h2>
<ul> <ul>
@ -66,7 +66,7 @@
</li> </li>
</ul> </ul>
</div> </div>
</sidebar> </div>
</div> </div>
<script src='force.js' type='text/javascript'></script> <script src='force.js' type='text/javascript'></script>
</body> </body>