Index: controlies/trunk/MainLoop.py
===================================================================
--- controlies/trunk/MainLoop.py	(revision 103)
+++ controlies/trunk/MainLoop.py	(revision 104)
@@ -189,16 +189,19 @@
 				#h.wakeup()
 				return json.dumps(response)
 				
+				
         	elif request.args['action'][0] == "getThinclientGroups":
 				h = Hosts (l,"","","","","")
 				response = h.getThinclientGroups ()
 				return json.dumps({"response" : response})		
 				
+				
         	elif request.args['action'][0] == "getLTSPServers":
 				h = Hosts (l,"","","","","")
 				response = h.getLTSPServers ()
 				return json.dumps({"response" : response})		
 
+
         	elif request.args['action'][0] == "getLTSPStatus":
 				f = open('/tmp/controlIES.ltpsSevers', 'r')
 				computers = f.read().split(" ")
@@ -210,24 +213,15 @@
 				
 				return json.dumps({ "computers":computers, "teachers":teachers })
 
-        	elif request.args['action'][0] == "getLTSPClients":
-								
+
+        	elif request.args['action'][0] == "getClassroomDetails":
+
 				import xmlrpclib
+				s = xmlrpclib.Server("http://" + request.args['classroom'][0] + ":8900");
 				
-				h = Hosts (l,"","","","","")
-				response = h.getLTSPServers ()
-				
-				clients = []
-				for server in response:
-					s = xmlrpclib.Server("http://"+server+":8900")
-					print "connect: "+server
-					try:
-						clients[server] = s.Hosts()
-					except:
-						pass
-				
-				return json.dumps({ "clients":clients })
+				return json.dumps({ "students" : s.Hosts() })
 
+
         	else:
 				if request.args ['type'][0] == 'thinclient':
 					ip = ""
Index: controlies/trunk/Server.py
===================================================================
--- controlies/trunk/Server.py	(revision 103)
+++ controlies/trunk/Server.py	(revision 104)
@@ -46,7 +46,7 @@
 
 # Start up the web service.     
 Root = MainLoop.ControlIESProtocol() #Resource object
-Root.PageDir='/home/manu/proyectos/controlies/www/'
+Root.PageDir='/home/manu/proyectos/controlies/trunk/www/'
 #Root.PageDir='/home/chisco/Proyectos/controlies/www'
 site = server.Site(Root)
 
Index: controlies/trunk/Utils/Configs.py
===================================================================
--- controlies/trunk/Utils/Configs.py	(revision 103)
+++ controlies/trunk/Utils/Configs.py	(revision 104)
@@ -1,3 +1,3 @@
-LOG_FILENAME= '/var/log/controlies.log'
+LOG_FILENAME= '/tmp/controlies.log'
 
 
Index: controlies/trunk/www/main.html
===================================================================
--- controlies/trunk/www/main.html	(revision 103)
+++ controlies/trunk/www/main.html	(revision 104)
@@ -110,6 +110,14 @@
 
 	<!-- / END -->
 	<br><br><br>
-	<div id="module" class="centerGrid"></div>
+	<div id="module" class="centerMain"></div>
+	
+	<div id="dialogAlert" title="Atenci&oacute;n">
+		<p>
+			<span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 7px 0;"></span>
+			<span id="dialogAlertMessage"></span>
+		</p>
+	</div>
+
 </body>
 </html>
Index: controlies/trunk/www/css/helper.css
===================================================================
--- controlies/trunk/www/css/helper.css	(revision 103)
+++ controlies/trunk/www/css/helper.css	(revision 104)
@@ -18,7 +18,8 @@
 * html ul.dropdown ul { background-image: url(images/dropdown_pane_8bit.png); }
 
 .centerAuth{ position:absolute; left:50%; margin-left:-150px; }
-.centerGrid{ position:absolute; left:50%; margin-left:-450px; }
+.centerMain{ position:absolute; left:50%; margin-left:-600px; }
+.centerGrid{ position:absolute; left:50%; margin-left:140px; }
 
 form p{ margin-bottom:10px; font-weight:bold;}
 form input{ border:1px solid #DDD; }
Index: controlies/trunk/www/classroomServers/index.html
===================================================================
--- controlies/trunk/www/classroomServers/index.html	(revision 103)
+++ controlies/trunk/www/classroomServers/index.html	(revision 104)
@@ -4,9 +4,40 @@
 	#selectable { list-style-type: none; margin: 0; padding: 0; }
 	#selectable li { margin: 3px 3px 3px 0; padding: 1px; float: left; width: 80px; height: 95px; font-size: 1px; text-align: center; cursor:pointer; }
 </style>
+
+<script src="js/utils.js" type="text/javascript"></script>
+
 <script>
 	$(function() {
-		$( "#selectable" ).selectable();
+		$("#tabsActions").tabs().css("font-size","13px");
+		$("#tabsServers").tabs().css("font-size","13px");
+		
+		$( "#selectAll" )
+			.css("font-size","11px")
+			.button({ icons: { primary: "ui-icon-circle-plus"}})
+			.click(function(){ selectAll() });
+
+		$( "#selectNone" )
+			.css("font-size","11px")
+			.button({ icons: { primary: "ui-icon-circle-minus"}})
+			.click(function(){ selectNone() });
+
+		$( "#turnOn" )
+			.css("font-size","11px")		
+			.button({ icons: { primary: "ui-icon-power"}})
+			.click(function(){ alert("En desarrollo");/*sendOrderSelected("wakeup","","cambiaconfig");*/ });
+
+		$( "#turnOff" )
+			.css("font-size","11px")		
+			.button({ icons: { primary: "ui-icon-circle-close"}})
+			.click(function(){ alert("En desarrollo");/*sendOrderSelected("sleep","","cambiaconfig");*/ });		
+
+		$( "#classroomDetails" )
+			.css("font-size","11px")		
+			.button({ icons: { primary: "ui-icon-circle-close"}})
+			.click(function(){ getClassroomDetails(); });		
+		
+		$( "#selectable" ).selectable();		
 		getLTSPServers();
 	});
 	
@@ -15,7 +46,7 @@
 			var result = $.parseJSON(data);
 			
 			$.each(result.response, function(i, l){
-				$('#selectable').append('<li class="ui-state-default" id="selectable-'+l+'"><div id="pcName" style="font-size:11px;">'+l+'</div><img class="thumb-image" src="img/turnOff.png"/><div id="userName" style="font-size:11px;"></div></li>');					
+				$('#selectable').append('<li class="ui-state-default" id="selectable-'+l+'"><div id="pcName" style="font-size:11px;">'+l+'</div><img class="thumb-image" src="img/turnOff.png"/><div id="userName" style="font-size:11px;"></div></li>');
 			});
 			
 			getLTSPStatus();
@@ -30,7 +61,7 @@
 			$('#selectable li #userName').html('');
 			
 			$.each(result.computers, function(i, l){
-				$('#selectable #selectable-'+l+' .thumb-image').attr('src','img/turnOn.png');
+				$('#selectable #selectable-'+l+' .thumb-image').attr('src','img/turnOn.png');			
 			});
 
 			$.each(result.teachers, function(i, l){
@@ -46,14 +77,79 @@
 		});
 	}
 
-	function getLTSPClients(){
-		$.post('hosts','action=getLTSPClients', function(data) {
-			var result = $.parseJSON(data);
+
+	function getClassroomDetails(){
+		var selected = computersSelected();
+		
+		if(selected.length==0 || selected.length>1){
+			modalAlert("Únicamente hay que seleccionar un equipo");
+			return false;
+		}else{
+
+		/*	x = ($(window).width()-300)/2;
+			y = ($(window).height()-500)/2;
+
+			$("#messageLoading").hide();
+
+			$("#dialog-form").dialog({
+				resizable: false,
+				position: top,
+				modal: true,
+				width: 300,						
+				title: "Detalles del aula"
+			}).dialog('option', 'position', [x, y]);*/
 			
-			setTimeout("getLTSPClients()",25000);			
-		});
+			$.post('hosts','action=getClassroomDetails&classroom='+selected[0], function(data) {
+				var result = $.parseJSON(data);
+				alert(result);
+			});
+		}
 	}
-	
+
 </script>
 
-<ol id="selectable" style="width:900px;"></ol>
+<table width="100" cellspacing="12">
+<tr>
+	<td style="vertical-align:top;">
+		<div id="tabsActions">
+			<ul>
+				<li><a href="#tabs-1"><span id="actions">Acciones</span></a></li>
+			</ul>
+			<div id="tabs-1" style="padding:3px;">
+				<table width="100%">
+					<tr>
+						<td style="text-align:center;"><button id="selectAll" style="width:123px;">Selecc. Todo</button></td>
+						<td style="text-align:center;"><button id="selectNone" style="width:123px;">Selecc. Ninguno</button></td>						
+					</tr>
+					<tr>
+						<td style="text-align:center;"><button id="turnOn" style="width:123px;">Encender</button></td>
+						<td style="text-align:center;"><button id="turnOff" style="width:123px;">Apagar</button></td>
+					</tr>
+					<tr>
+						<td style="text-align:center;"><button id="classroomDetails" style="width:123px;">Mostrar Aula</button></td>
+						<td style="text-align:center;"></td>
+					</tr>					
+				</table>
+			</div>
+		</div>
+	</td>
+	<td>
+		<div id="tabsServers">
+			<ul>
+				<li><a href="#tabs-1"><span id="actions">Servidores</span></a></li>
+			</ul>
+			<div id="tabs-1" style="padding:3px;">	
+				<table>
+					<tr>
+						<td id="tableSelectable">
+							<ol id="selectable" style="width:870px;"></ol>
+						</td>
+					</tr>
+				</table>
+			</div>
+		</div>				
+	</td>
+</tr>
+</table>
+
+<div id="dialog-details"></div>
Index: controlies/trunk/www/js/utils.js
===================================================================
--- controlies/trunk/www/js/utils.js	(nonexistent)
+++ controlies/trunk/www/js/utils.js	(revision 104)
@@ -0,0 +1,111 @@
+/* #########################################################################
+# Project:     ControlIES
+# Module:     	utils.js
+# Purpose:     Util functions
+# Language:    javascript
+# Copyright:   2009-2010 - Manuel Mora Gordillo <manuito @nospam@ gmail.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program 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 General Public License for more details.
+# 
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# 
+############################################################################## */
+
+function selectAll(){
+	$("#tabsClassroom").tabs("select","tabsClassroom-1");
+	$("#selectable li").addClass("ui-selected");
+}
+
+function selectNone(){
+	$("#tabsClassroom").tabs("select","tabsClassroom-1");
+	$("#selectable li").removeClass("ui-selected");
+}
+
+function computersSelected(){
+	var selected = Array();
+	var j=0;
+	
+	$("#selectable li").each(function(i, item){
+		if($("#"+item.id).hasClass('ui-selected')==true){
+			selected[j] = $("#"+item.id + ":eq(0) > #pcName").html();
+			j++;
+		}
+	});
+	return selected;
+}
+
+function sendOrderSelected(url,args,action){
+
+	var selected = computersSelected(url);
+
+	if(selected.length==0){
+		modalAlert("Para realizar la acci&oacute;n debe seleccionar al menos un equipo");
+		return;
+	}
+
+	var classroom = {
+		"pclist" : selected,
+		"args" : args
+	}
+
+	var dataString = $.JSON.encode(classroom)
+	connection(url,dataString,action);
+}
+
+function sendOrder(url,args,action){
+
+	var classroom = {
+		"args" : args
+	}
+
+	var dataString = $.JSON.encode(classroom);
+	connection(url,dataString,action);
+}
+
+
+function modalAlert(message){
+
+	$("#dialogAlertMessage").html(message);
+
+	$("#dialogAlert")
+		.dialog({
+			modal: true,
+			width: 350,
+			resizable: false,
+			hide: "explode",
+			buttons: {
+				Ok: function() { $( this ).dialog( "close" ); }
+			}
+		})
+		.dialog('open'); 
+
+	return true;
+}
+
+function modalConfirm(message, funct){
+
+	$("#dialogAlertMessage").html(message);
+
+	$("#dialogAlert")
+		.dialog({
+			modal: true,
+			width: 350,
+			resizable: false,
+			buttons: {
+				"Si": function() { eval(funct); },
+				"No": function() { $( this ).dialog( "close" ); }
+			}
+		})
+		.dialog('open'); 
+
+	return true;
+}
Index: controlies/trunk/www/cover/index.html
===================================================================
--- controlies/trunk/www/cover/index.html	(revision 103)
+++ controlies/trunk/www/cover/index.html	(revision 104)
@@ -6,4 +6,4 @@
 	});
 </script>
 
-<div id="fancyClock"></div>
+<div id="fancyClock" style="margin-left:190px;"></div>
Index: controlies/trunk/www/groups/index.html
===================================================================
--- controlies/trunk/www/groups/index.html	(revision 103)
+++ controlies/trunk/www/groups/index.html	(revision 104)
@@ -209,7 +209,7 @@
 			}			
 		</script>
 
-		<div id="tabla_clientes">
+		<div id="tabla_clientes" class="centerGrid">
 		<table width="100%">
 		<tr>
 			<td style="width:2%"></td>
Index: controlies/trunk/www/users/index.html
===================================================================
--- controlies/trunk/www/users/index.html	(revision 103)
+++ controlies/trunk/www/users/index.html	(revision 104)
@@ -205,16 +205,16 @@
 			}
 		</script>
 
-		<div id="tabla_clientes">
-		<table width="100%">
-		<tr>
-			<td style="width:2%"></td>
-			<td><table id="list" width="100%"></table></td>
-			<td style="width:2%"></td>
-		</tr>
-		</table>
-		<div id="pager" style=""></div> 
-		<div id="filter" style="margin-left:30%;display:none">Search Invoices</div>
+		<div id="tabla_clientes" class="centerGrid">
+			<table width="100%" align="center">
+			<tr>
+				<td style="width:2%"></td>
+				<td style="text-align:center;"><table id="list" width="100%"></table></td>
+				<td style="width:2%"></td>
+			</tr>
+			</table>
+			<div id="pager" style=""></div> 
+			<div id="filter" style="margin-left:30%;display:none">Search Invoices</div>
 		</div>
 
 		<div id="dialog-form"></div>
Index: controlies/trunk/www/ltsp/index.html
===================================================================
--- controlies/trunk/www/ltsp/index.html	(revision 103)
+++ controlies/trunk/www/ltsp/index.html	(revision 104)
@@ -145,7 +145,7 @@
 			}					
 		</script>
 
-		<div id="tabla_clientes">
+		<div id="tabla_clientes" class="centerGrid">
 		<table width="100%">
 		<tr>
 			<td style="width:2%"></td>
Index: controlies/trunk/www/workstation/index.html
===================================================================
--- controlies/trunk/www/workstation/index.html	(revision 103)
+++ controlies/trunk/www/workstation/index.html	(revision 104)
@@ -153,7 +153,7 @@
 			
 		</script>
 
-		<div id="tabla_clientes">
+		<div id="tabla_clientes" class="centerGrid">
 		<table width="100%">
 		<tr>
 			<td style="width:2%"></td>
