aggiunto metodo act_help
[brisk.git] / web / commons.js
index 041b552..5079a8b 100644 (file)
@@ -90,7 +90,7 @@ function reset_images()
 
 function update_images()
 {
-    $("imgct").innerHTML = "Immagini caricate "+g_preload_imgsz_arr[g_imgct]+"%.";
+    // $("imgct").innerHTML = "Immagini caricate "+g_preload_imgsz_arr[g_imgct]+"%.";
     if (g_imgct < g_preload_img_arr.length)
        setTimeout(preload_images, 100, g_preload_img_arr, g_imgct);
     g_imgct++;
@@ -204,6 +204,11 @@ function act_tableinfo()
     send_mesg("tableinfo");
 }
 
+function act_help()
+{
+    send_mesg("help");
+}
+
 function safelogout()
 {
     var res;
@@ -244,7 +249,7 @@ function postact_logout()
        xhr_rd.abort();
     } catch (e) {}
 
-    eraseCookie("sess");
+    // eraseCookie("sess");
     document.location.assign("index.php");
 }
 
@@ -451,12 +456,14 @@ function notify(st, ancestor, text, tout, butt)
     var t = this;
     
     this.st = st;
+
     this.ancestor = ancestor;
     
     this.st.st_loc_new++;
 
     clo = document.createElement("input");
     clo.type = "submit";
+    clo.className = "button";
     clo.value = butt;
     clo.obj = this;
     clo.onclick = this.input_hide;
@@ -566,10 +573,16 @@ function set_names(so,ea,ne,nw,we)
 {
 //    alert("EA: "+ea);
     $("name").innerHTML = so; 
+    $("name").title = so; 
     $("name_ea").innerHTML = ea;
+    $("name_ea").title = ea;
     $("name_ne").innerHTML = ne;
+    $("name_ne").title = ne;
     $("name_nw").innerHTML = nw;
+    $("name_nw").title = nw;
     $("name_we").innerHTML = we;
+    $("name_we").title = we;
+
     return;
 }
 
@@ -700,7 +713,7 @@ function onunload_cb () {
        if (res == true) {
            the_end = true; 
            act_shutdown();
-           for (i = 0 ; i < 1000000 ; i++)
+           while (1) 
                u++;
        }
        else {
@@ -716,3 +729,32 @@ function onunload_cb () {
     return(false);
 }
 
+
+function room_checkspace(emme,tables,inpe)
+{
+    nome = "<b>";
+    for (i = 0 ; i < emme ; i++) 
+       nome += "m";
+    nome += "</b>";
+
+    alta = "";
+    for (i = 0 ; i < 5 ; i++) 
+       alta += nome+"<br>";
+
+    for (i = 0 ; i < tables ; i++) {
+       $("table"+i).innerHTML = alta;
+       $("table_act"+i).innerHTML = "<input type=\"button\" class=\"button\" name=\"xhenter"+i+"\"  value=\"Mi siedo.\" onclick=\"act_sitdown(1);\">";
+       }
+
+    stand = "<table class=\"table_standup\"><tbody><tr>";
+    for (i = 0 ; i < inpe ; i++) {
+       stand += "<td class=\"td_standup\">"+nome+"</td>";
+       if ((i+1) % 4 == 0) {
+           stand += "</tr><tr>";
+       }
+    }
+    stand += "</tr>";
+    $("standup").innerHTML = stand;
+
+    $("esco").innerHTML = "<input name=\"logout\" type=\"button\" value=\"Esco.\" onclick=\"window.onunload = null; act_logout();\" type=\"button\">";
+}