[Fai-commit] r4663 - in people/kugg/fai-gui: . views

kugg-guest at alioth.debian.org kugg-guest at alioth.debian.org
Fri Nov 9 14:28:39 UTC 2007


Author: kugg-guest
Date: 2007-11-09 14:28:39 +0000 (Fri, 09 Nov 2007)
New Revision: 4663

Added:
   people/kugg/fai-gui/views/
   people/kugg/fai-gui/views/classes.html
   people/kugg/fai-gui/views/host.html
   people/kugg/fai-gui/views/hosts.html
   people/kugg/fai-gui/views/scripts.html
Modified:
   people/kugg/fai-gui/search.js
   people/kugg/fai-gui/template.html
   people/kugg/fai-gui/template_style.css
Log:
Added a example view (classes).
Changed the search.


Modified: people/kugg/fai-gui/search.js
===================================================================
--- people/kugg/fai-gui/search.js	2007-11-09 13:14:01 UTC (rev 4662)
+++ people/kugg/fai-gui/search.js	2007-11-09 14:28:39 UTC (rev 4663)
@@ -23,6 +23,16 @@
 	}
 }
 
+
+function show_hint(element,response)
+{
+
+	document.getElementById(element).innerHTML=response;
+	
+	/*Insert keydown and key up arrow events here.*/	
+}
+
+
 function ajaxSearch(question)
 {
 	var xmlHttp;
@@ -41,12 +51,11 @@
 	{
 		if(xmlHttp.readyState==4)
 		{
-			document.getElementById("hint").innerHTML=xmlHttp.responseText;
+			//Showing a hint
+			show_hint("hint",xmlHttp.responseText);
 		}
 	}
 
 	xmlHttp.open("GET","search.result",true);
 	xmlHttp.send(question);
-	alert(xmlHttp.readyState + document.searchform.g.value);
-
 }

Modified: people/kugg/fai-gui/template.html
===================================================================
--- people/kugg/fai-gui/template.html	2007-11-09 13:14:01 UTC (rev 4662)
+++ people/kugg/fai-gui/template.html	2007-11-09 14:28:39 UTC (rev 4663)
@@ -20,7 +20,7 @@
 		<div id="searchbar">
 			<form class="searchform" action="http://google.uni-koeln.de/search?">
 				<fieldset class="searchform">
-					<input type="text" name="q" id="search" value="Search..." onkeyup="ajaxSearch(this.value);" onblur="hideSoon(this.name);" onclick="highlight('search');" />
+					<input type="text" name="q" id="search" value="Search..." onkeyup="ajaxSearch(this.value);" onblur="hideSoon(this.name);" onclick="highlight('search');" /><img src="glass.png" />
 					<br/><a id="hint" onclick="" href="http://google.uni-koeln.de/search?"></a>
 				</fieldset>
 			</form>

Modified: people/kugg/fai-gui/template_style.css
===================================================================
--- people/kugg/fai-gui/template_style.css	2007-11-09 13:14:01 UTC (rev 4662)
+++ people/kugg/fai-gui/template_style.css	2007-11-09 14:28:39 UTC (rev 4663)
@@ -31,12 +31,23 @@
 	color:#505050; 
 	font-size:0.9em; 
 	width:150px;
+	vertical-align:top;	
 }
 input, #hint {
 	background-color:#ffffff;
 	border:0px;
+	vertical-align:top;
 	
 }
+.searchform, img {
+	vertical-align:top;
+}
+
+.searchform {
+	position:relative;
+	top:0px;
+}
+
 ul#top_bar_list {
 	margin:0px;
 	padding:0px;

Added: people/kugg/fai-gui/views/classes.html
===================================================================
--- people/kugg/fai-gui/views/classes.html	                        (rev 0)
+++ people/kugg/fai-gui/views/classes.html	2007-11-09 14:28:39 UTC (rev 4663)
@@ -0,0 +1,76 @@
+<html>
+
+<body>
+
+<style type="text/css">
+.input_section {
+	float:left;
+	position:relative;
+}
+.vr {
+	border-left: 2px solid black;
+	height:210px;
+	width:10px;
+	margin-left:10px;
+	float:left;
+	position:relative;
+
+}
+select {
+width: 300px;
+border: 1px solid black;
+}
+
+</style>
+  <script language="JavaScript">
+
+   function AddEnable() {
+		var enabled_classes=document.getElementById("enabled_classes");
+		var availible_classes=document.getElementById("availible_classes");
+
+		var new_option=document.createElement('option');
+		new_option.text=availible_classes.options[availible_classes.selectedIndex].value;
+		enabled_classes.add(new_option,null);
+
+/*		alert(availible_classes.selectedIndex);*/
+		docuement.list_selection.enabled_classes.add("karate");
+   }
+
+   function RmEnable() {
+		var enabled_classes=document.getElementById("enabled_classes");
+/*		alert(enabled_classes.selectedIndex);*/
+		enabled_classes.remove(enabled_classes.selectedIndex);
+	}
+
+  </script>
+
+
+<h2>Hostname</h2>
+<form name="list_selection">
+<fieldset>
+<div class="input_section">
+	<label>Availible<br/>
+ 	<select name="availible_classes" id="availible_classes" multiple="multiple" size="10">
+		<option>lcd</option>
+		<option>games</option>
+		<option>science</option>
+		<option>school</option>
+		<option>economics</option>
+	</select><br/>
+	<input type="button" value="&gt;&gt;" onclick="AddEnable();" />
+	</label>
+</div>
+<div class="vr">
+</div>
+<div class="input_section">	
+	<label>Enabled<br/>
+	<select name="enabled_classes" id="enabled_classes" multiple="multiple" size="10">
+
+	</select><br/>
+	<input type="button" value="&lt;&lt;" onclick="RmEnable();" />		
+	</label>		
+</div>
+</fieldset>
+</form>
+</body>
+</html>

Added: people/kugg/fai-gui/views/host.html
===================================================================

Added: people/kugg/fai-gui/views/hosts.html
===================================================================

Added: people/kugg/fai-gui/views/scripts.html
===================================================================




More information about the Fai-commit mailing list