X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Froom.js;h=7085be4068d54b301ff9dfdc166692564f4699ba;hb=8197fc17752e4504bb2857fcea3f2e032916d9b3;hp=c7efc62fef1cc23e4a272b09260bc499cf5c6f9c;hpb=6d8db1ee47d3c0bb14133d3ab2e0a6bdc7ed60a0;p=brisk.git diff --git a/web/room.js b/web/room.js index c7efc62..7085be4 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 = '
';
@@ -426,7 +429,7 @@ function j_stand_cont(ddata)
var usr = $("standup").getElementsByClassName("id_usr");
for (i = 0 ; i < usr.length ; i++) {
- addEvent(usr[i], "click", click_update_cb);
+ addEvent(usr[i], "click", info_show_cb);
}
}
@@ -437,34 +440,15 @@ function esco_cb() {
act_logout(0);
};
-var g_user_info_target = "";
-
-function info_show(username)
-{
- // ret = server_request('mesg', 'prefs|save','__POST__', 'prefs', JSON.stringify(g_prefs));
- var udata = server_request('mesg', 'chatt|/info ' + username);
-
- // FIXME: just to be finished
- console.log(udata);
-}
-
-function click_update_cb(e)
-{
- if (g_user_info_target == e.target.innerHTML) {
- g_user_info_target = "";
- info_show(e.target.innerHTML);
- }
- else {
- g_user_info_target = e.target.innerHTML;
- }
-}
-
function j_tab_cont(table_idx, data)
{
var i;
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 += ' '; @@ -472,7 +456,7 @@ function j_tab_cont(table_idx, data) $("table"+table_idx).innerHTML = content; var usr = $("table"+table_idx).getElementsByClassName("id_usr"); for (i = 0 ; i < usr.length ; i++) { - addEvent(usr[i], "click", click_update_cb); + addEvent(usr[i], "click", info_show_cb); } } @@ -482,6 +466,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 = ''; @@ -522,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); } } @@ -657,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."); |