X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Froom.js;h=38a3d2a410cc8b769f89f4f1e0a757f14d7db6fe;hb=d0accc6cc623168616438ad06f0611a3dbb8f5a4;hp=f6d6d247b2cef63c8375ac3a496f8f7f33a82487;hpb=29386faba01ac22d3d47e5f467412dc63b4e22cf;p=brisk.git
diff --git a/web/room.js b/web/room.js
index f6d6d24..38a3d2a 100644
--- a/web/room.js
+++ b/web/room.js
@@ -426,7 +426,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,44 +437,6 @@ 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 info_in = JSON.parse(server_request('mesg', 'chatt|/info ' + username));
- var info = null;
-
- if (info_in.ret == 0) {
- var fields = { login: { type: 'value' },
- state: { type: 'value' },
- guar: { type: 'value' },
- match: { type: 'value' },
- game: { type: 'value' },
- friend: { type: 'radio' } };
-
- info = new Fieldify($('info'), fields);
- info.populate(info_in);
- info.visible(true);
- }
- else {
- console.log("some error: open a dialog");
- }
- // FIXME: just to be finished
- console.log(info);
-}
-
-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;
@@ -488,7 +450,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);
}
}
@@ -498,6 +460,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 = '';
@@ -538,13 +504,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);
}
}