add bold for your user to js code j_stand_cont()
[brisk.git] / web / room.js
index 2dd207c..b6ee5b3 100644 (file)
@@ -278,6 +278,9 @@ function j_stand_cont(ddata)
         data = new Array();
 
         for (i = 0, ii = 0 ; ii < ddata.length ; ii++) {
+            if (ddata[ii][1] == window.myname) {
+                ddata[ii][0] |= 1;
+            }
             if ((ddata[ii][0] & 0x02) == 0) {
                 continue;
             }
@@ -443,6 +446,9 @@ function j_tab_cont(table_idx, data)
     var content = '';
 
     for (i = 0 ; i < data.length ; i++) {
+        if (data[i][1] == window.myname) {
+            data[i][0] |= 1;
+        }
         content += j_stand_tdcont(data[i]);
 
         content += '<br>';
@@ -460,6 +466,10 @@ function j_tab_act_cont(idx, act)
         // MLANG 1
         $("table_act"+idx).innerHTML = '<input type="button" class="button" name="xhenter'+idx+'"  value="'+(g_lang == 'en' ? "Sit down." : "Mi siedo.")+'" onclick="act_sitdown('+idx+');">';
     }
+    else if (act == 'sitappr') {
+        // MLANG 1
+        $("table_act"+idx).innerHTML = '<input type="button" style="background-repeat: no-repeat; background-position: center; background-image: url(\'img/okappr.png\');" class="button" name="xhenter'+idx+'"  value="'+(g_lang == 'en' ? "Sit down." : "Mi siedo.")+'" onclick="act_sitdown('+idx+');" title="'+(g_lang == 'en' ? "reserved table for authenticated and apprentice users only" : "tavolo riservato agli utenti registrati e agli apprendisti")+'" alt="'+(g_lang == 'en' ? "reserved table for authenticated and apprentice users only" : "tavolo riservato agli utenti registrati e agli apprendisti")+'">';
+    }
     else if (act == 'sitreser') {
         // MLANG 1
         $("table_act"+idx).innerHTML = '<input type="button" style="background-repeat: no-repeat; background-position: center; background-image: url(\'img/okauth.png\');" class="button" name="xhenter'+idx+'"  value="'+(g_lang == 'en' ? "Sit down." : "Mi siedo.")+'" onclick="act_sitdown('+idx+');" title="'+(g_lang == 'en' ? "reserved table for authenticated users only" : "tavolo riservato agli utenti registrati")+'" alt="'+(g_lang == 'en' ? "reserved table for authenticated users only" : "tavolo riservato agli utenti registrati")+'">';
@@ -500,13 +510,13 @@ function j_check_login(login, ret)
             (login[i] >= 'A' && login[i] <= 'Z')) {
             if (old_c != login[i]) {
                 old_c = login[i];
-                old_ct = 0;
+                old_ct = 1;
             }
             else {
-                if (old_ct > 3) {
+                if (old_ct > 2) {
                     // FIXME LANG
-                    ret.ret = (g_lang == 'en' ? "More than three contiguous '" + old_c + "' not allowed." :
-                               "Il nickname contiene più di tre caratteri '" + old_c + "' consecutivi.");
+                    ret.ret = (g_lang == 'en' ? "More than two contiguous '" + old_c + "' not allowed." :
+                               "Il nickname contiene più di 2 caratteri '" + old_c + "' consecutivi.");
                     return (false);
                 }
             }
@@ -635,7 +645,7 @@ function mesgtoadm_formtext_hilite(form)
 
 function j_check_email(email, ret)
 {
-    if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,10})+$/.test(email))
+    if (/^\w+([\.-]*\w+)*@\w+([\.-]*\w+)*(\.\w{2,10})+$/.test(email))
         return (true);
     ret.ret += (g_lang == 'en' ? "Invalid email address. " :
                 "Indirizzo e-mail non valido.");