X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Froom.js;h=e8b19eabf6aad56e18624ad8c8426a9f1be1980d;hb=7f31c2b3b37621dfce4652b0822a6656b0c8c2c2;hp=85c927589336e2f6c0e0f3c42078deb5f6e2ddcb;hpb=e18c2d271172bc19f1c999cc9498989c3eb87800;p=brisk.git
diff --git a/web/room.js b/web/room.js
index 85c9275..e8b19ea 100644
--- a/web/room.js
+++ b/web/room.js
@@ -1,3 +1,27 @@
+/*
+ * brisk - room.js
+ *
+ * Copyright (C) 2006-2009 Matteo Nastasi
+ * mailto: nastasi@alternativeoutput.it
+ * matteo.nastasi@milug.org
+ * web: http://www.alternativeoutput.it
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABLILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details. You should have received a
+ * copy of the GNU General Public License along with this program; if
+ * not, write to the Free Software Foundation, Inc, 59 Temple Place -
+ * Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
/*
data = [ [ flags, name ], ... ]
@@ -11,34 +35,35 @@ function state_add(flags)
if ((flags & 0xf00) != 0) {
st = flags & 0xf00;
+ // MLANG 4,12,16,20,24,28
switch (st) {
case 0x100:
name = "st_pau.png";
- tit = "sono in pausa";
+ tit = (g_lang == 'en' ? "I'm doing a break" : "sono in pausa");
break;
case 0x200:
name = "st_out.png";
- tit = "sono fuori";
+ tit = (g_lang == 'en' ? "I'm away" : "sono fuori");
break;
case 0x300:
name = "st_dog.png";
- tit = "sono a spasso col cane";
+ tit = (g_lang == 'en' ? "Dog time" : "sono a spasso col cane");
break;
case 0x400:
name = "st_eat.png";
- tit = "sto mangiando";
+ tit = (g_lang == 'en' ? "I'm eating" : "sto mangiando");
break;
case 0x500:
name = "st_wrk.png";
- tit = "sono a lavoro";
+ tit = (g_lang == 'en' ? "I'm working" : "sono a lavoro");
break;
case 0x600:
name = "st_smk.png";
- tit = "sto fumando una sigaretta (e facendomi venire il cancro)";
+ tit = (g_lang == 'en' ? "I'm smoking a sigarett (and keeping a cancer)" : "sto fumando una sigaretta (e facendomi venire il cancro)");
break;
case 0x700:
name = "st_eye.png";
- tit = "sono presente!";
+ tit = (g_lang == 'en' ? "I'm here!" : "sono presente!");
break;
default:
break;
@@ -389,17 +414,21 @@ function j_tab_cont(table_idx, data)
function j_tab_act_cont(idx, act)
{
if (act == 'sit') {
- $("table_act"+idx).innerHTML = '';
+ // MLANG 1
+ $("table_act"+idx).innerHTML = '';
}
else if (act == 'sitreser') {
//
- $("table_act"+idx).innerHTML = '';
+ // MLANG 1
+ $("table_act"+idx).innerHTML = '';
}
else if (act == 'wake') {
- $("table_act"+idx).innerHTML = '';
+ // MLANG 1
+ $("table_act"+idx).innerHTML = '';
}
else if (act == 'reserved') {
- $("table_act"+idx).innerHTML = '';
+ // MLANG 1
+ $("table_act"+idx).innerHTML = '';
}
else {
$("table_act"+idx).innerHTML = '';
@@ -495,7 +524,11 @@ function j_authbox(form)
}
if (form.elements['name'].value == '' || j_check_email(form.elements['email'].value) == false) {
- no = new notify(gst, " I campi user e/o e-mail non sono validi; correggeteli per favore.", 1, "chiudi", 280, 100);
+ // MLANG 2-4
+ no = new notify(gst,
+ (g_lang == 'en' ? " nickname and/or e-mail fields are invalid; please, fix them." :
+ " I campi nickname e/o e-mail non sono validi; correggeteli per favore."),
+ 1, (g_lang == 'en' ? "close" : "chiudi"), 280, 100);
break;
}
@@ -543,7 +576,10 @@ function j_mesgtoadmbox(form)
}
if (form.elements['mesg'].value == '' || form.elements['subj'].value == '') {
- no = new notify(gst, " Il soggetto e il messaggo non possono essere vuoti; correggeteli per favore.", 1, "chiudi", 280, 100);
+ // MLANG 1-3
+ no = new notify(gst, (g_lang == 'en' ? " subject and the message cannot be void; please, fix them." :
+ " Il soggetto e il messaggo non possono essere vuoti; correggeteli per favore."), 1,
+ (g_lang == 'en' ? "close" : "chiudi"), 280, 100);
break;
}
@@ -580,6 +616,43 @@ function mesgtoadmbox(w, h)
$('mesgtoadm_form').elements['subj'].focus();
}
+function j_pollbox(form)
+{
+ var no, i, choose;
+
+ do {
+ // submit the request
+
+ for (i = 0 ; i < form.elements.length ; i++) {
+ if (form.elements[i].checked == true)
+ break;
+ }
+ if (i == form.elements.length) {
+ // MLANG 1-3
+ no = new notify(gst, (g_lang == 'en' ? " You must choose ah item; please, fix it." :
+ " Non hai espresso nessuna preferenza; correggi per favore."), 1,
+ (g_lang == 'en' ? "close" : "chiudi"), 280, 100);
+ return false;
+ }
+ else
+ choose = form.elements[i].value;
+
+ token = server_request('mesg', 'poll',
+ 'cli_choose', encodeURIComponent(choose) );
+
+ if (token == "1") {
+ // TODO: mesg to user
+ // $('mesgtoadmbox').style.visibility = "hidden";
+ break;
+ }
+ } while (0);
+
+ return (false);
+}
+
+
+
+
function list_set(what, setco, info)
{
if (what == 'auth') {