X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Froom.js;h=63089036d3ccd9dc73b561ab68b55d76c58f90f6;hb=HEAD;hp=173b00453fd90be6436fea4bf135d42b2f665bbb;hpb=7f526939ded24298104cacd02b5f364bcc7bfa56;p=brisk.git diff --git a/web/room.js b/web/room.js index 173b004..6308903 100644 --- a/web/room.js +++ b/web/room.js @@ -274,7 +274,7 @@ function j_stand_cont(ddata) var data; - if (g_listen & l_list_isol) { + if (g_prefs.listen & l_list_isol) { data = new Array(); for (i = 0, ii = 0 ; ii < ddata.length ; ii++) { @@ -294,6 +294,9 @@ function j_stand_cont(ddata) if (standup_data_old == null || data.length < 4) { content = ''; for (i = 0 ; i < data.length ; i++) { + if (ddata[i][1] == window.myname) { + ddata[i][0] |= 1; + } if ((i % 4) == 0) content += ''; content += '
'; @@ -329,6 +332,9 @@ function j_stand_cont(ddata) for (i = 0 ; i < standup_data_old.length ; i++) { for (e = 0 ; e < data.length ; e++) { if (standup_data_old[i][1] == data[e][1]) { + if (data[e][1] == window.myname) { + data[e][0] |= 1; + } break; } } @@ -341,6 +347,9 @@ function j_stand_cont(ddata) if (standup_data_old[i][0] != data[e][0] || standup_data_old[i].length != data[e].length || (data[e].length == 3 && standup_data_old[i][2] != data[e][2])) { + if (data[e][1] == window.myname) { + data[e][0] |= 1; + } arr_mod[idx_mod_n] = data[e]; idx_mod[idx_mod_n++] = i; } @@ -356,6 +365,9 @@ function j_stand_cont(ddata) } } if (i == standup_data_old.length) { + if (data[e][1] == window.myname) { + data[e][0] |= 1; + } // console.log("ADD: "+data[e][1]); arr_add[idx_add_n] = data[e]; map_add[idx_add_n++] = e; @@ -421,11 +433,13 @@ function j_stand_cont(ddata) table_add($("standup"), td); } - standup_data_old = data; - return; } - // $("esco").innerHTML = ''; + + var usr = $("standup").getElementsByClassName("id_usr"); + for (i = 0 ; i < usr.length ; i++) { + addEvent(usr[i], "click", info_show_cb); + } } function esco_cb() { @@ -435,21 +449,24 @@ function esco_cb() { act_logout(0); }; - - function j_tab_cont(table_idx, data) { var i; var content = ''; for (i = 0 ; i < data.length ; i++) { - // content += user_decorator(data[i]); - // content += state_add(data[i][0]); + if (data[i][1] == window.myname) { + data[i][0] |= 1; + } content += j_stand_tdcont(data[i]); content += '
'; } $("table"+table_idx).innerHTML = content; + var usr = $("table"+table_idx).getElementsByClassName("id_usr"); + for (i = 0 ; i < usr.length ; i++) { + addEvent(usr[i], "click", info_show_cb); + } } function j_tab_act_cont(idx, act) @@ -458,6 +475,10 @@ function j_tab_act_cont(idx, act) // MLANG 1 $("table_act"+idx).innerHTML = ''; } + else if (act == 'sitappr') { + // MLANG 1 + $("table_act"+idx).innerHTML = ''; + } else if (act == 'sitreser') { // MLANG 1 $("table_act"+idx).innerHTML = ''; @@ -498,13 +519,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); } } @@ -523,31 +544,36 @@ function j_check_login(login, ret) } -function j_new_apprendice(form) +function j_new_apprentice(form) { var ret = { ret: '' }; var token; do { + if (form.elements['realsub'].value == "close") { + $('apprentice_div').style.display = 'none'; + break; + } + if (j_check_login(form.elements['nameid'].value, ret) == false || j_check_email(form.elements['emailid'].value, ret) == false) { - no = new notify(gst, "
" + ret.ret + "
", 1, (g_lang == 'en' ? "Close." : "Chiudi."), 280, 100); + no = new notify(gst, "
" + ret.ret + "
", 1, (g_lang == 'en' ? "Close." : "Chiudi."), 280, 100); break; } // submit the request - token = server_request('mesg', 'apprendice', + token = server_request('mesg', 'apprentice', 'cli_name', encodeURIComponent(form.elements['nameid'].value), 'cli_email', encodeURIComponent(form.elements['emailid'].value), 'cli_lang', g_lang); if (token == "1") { // FIXME LANG - $('apprendice_div').style.display = "none"; - no = new notify(gst, "
Richiesta inviata con successo.
Riceverai a breve un' e-mail per verificare la correttezza dell'indirizzo.
", 1, (g_lang == 'en' ? "Close." : "Chiudi."), 280, 100); + $('apprentice_div').style.display = "none"; + no = new notify(gst, "
Richiesta inviata con successo.
Riceverai a breve un' e-mail per verificare la correttezza dell'indirizzo.
", 1, (g_lang == 'en' ? "Close." : "Chiudi."), 280, 100); } else { - no = new notify(gst, "
" + token + "
", 1, (g_lang == 'en' ? "Close." : "Chiudi."), 280, 100); + no = new notify(gst, "
" + token + "
", 1, (g_lang == 'en' ? "Close." : "Chiudi."), 280, 100); } } while (0); @@ -628,7 +654,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."); @@ -693,7 +719,7 @@ function j_mesgtoadmbox(form) var no; do { - if (form.elements['realsub'].value == "chiudi") { + if (form.elements['realsub'].value == "cloid") { $('mesgtoadmbox').style.visibility = "hidden"; break; }