X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Froom.js;h=0e0aed916e1be31f7e68652b0d0cda87ff5f0205;hb=ea9ea2b7924e1aa5e55f5cbc3909375a38b9d730;hp=9cc2616a7ed75fe1ca124b40919731e9c7de6126;hpb=d4d10ccef12155675f0b6d1c658e16101e4dbad5;p=brisk.git
diff --git a/web/room.js b/web/room.js
index 9cc2616..0e0aed9 100644
--- a/web/room.js
+++ b/web/room.js
@@ -44,7 +44,7 @@ function state_add(flags)
break;
}
if (name != "") {
- content += '';
+ content += ' ';
}
}
@@ -435,20 +435,6 @@ function j_login_manager(form)
return (false);
}
-function formtext_hilite(obj)
-{
- obj.className = 'input_text';
- addEvent(obj, "focus", function () { this.className = 'input_text_hi'; });
- addEvent(obj, "blur", function () { this.className = 'input_text'; });
-}
-
-function formsub_hilite(obj)
-{
- obj.className = 'input_sub';
- addEvent(obj, "focus", function () { this.className = 'input_sub_hi'; });
- addEvent(obj, "blur", function () { this.className = 'input_sub'; });
-}
-
function login_formtext_hilite()
{
formtext_hilite($("nameid"));
@@ -462,12 +448,32 @@ function login_init()
login_formtext_hilite();
}
-function warrant_formtext_hilite()
+function warrant_formtext_hilite(form)
{
+ /*
formtext_hilite($("nameid"));
formtext_hilite($("emailid"));
formsub_hilite($("subid"));
formsub_hilite($("cloid"));
+ */
+ formtext_hilite(form.elements['name']);
+ formtext_hilite(form.elements['email']);
+ formsub_hilite(form.elements['sub']);
+ formsub_hilite(form.elements['clo']);
+}
+
+function mesgtoadm_formtext_hilite(form)
+{
+ /*
+ formtext_hilite($("subjid"));
+ formtext_hilite($("mesgid"));
+ formsub_hilite($("subid"));
+ formsub_hilite($("cloid"));
+ */
+ formtext_hilite(form.elements['subj']);
+ formtext_hilite(form.elements['mesg']);
+ formsub_hilite(form.elements['sub']);
+ formsub_hilite(form.elements['clo']);
}
@@ -482,14 +488,17 @@ function j_authbox(form)
{
var no;
- if (form.elements['realsub'].value == "chiudi") {
- $('authbox').style.visibility = "hidden";
- return (false);
- }
+ do {
+ if (form.elements['realsub'].value == "chiudi") {
+ $('authbox').style.visibility = "hidden";
+ break;
+ }
+
+ 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);
+ break;
+ }
- 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);
- else {
// submit the request
token = server_request('mesg', 'warranty',
'cli_name', encodeURIComponent(form.elements['name'].value),
@@ -498,9 +507,9 @@ function j_authbox(form)
$('authbox').style.visibility = "hidden";
form.elements['name'].value = "";
form.elements['email'].value = "";
- return (false);
+ break;
}
- }
+ } while (0);
return (false);
}
@@ -517,8 +526,72 @@ function authbox(w, h)
box.style.height = h+"px";
box.style.top = parseInt((document.body.clientHeight - h) / 2) + document.body.scrollTop;
- warrant_formtext_hilite();
+ warrant_formtext_hilite($('auth_form'));
box.style.visibility = "visible";
$("nameid").focus();
}
+
+function j_mesgtoadmbox(form)
+{
+ var no;
+
+ do {
+ if (form.elements['realsub'].value == "chiudi") {
+ $('mesgtoadmbox').style.visibility = "hidden";
+ break;
+ }
+
+ 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);
+ break;
+ }
+
+ // submit the request
+ token = server_request('mesg', 'mesgtoadm',
+ 'cli_subj', encodeURIComponent(form.elements['subj'].value),
+ 'cli_mesg', encodeURIComponent(form.elements['mesg'].value) );
+ if (token == "1") {
+ $('mesgtoadmbox').style.visibility = "hidden";
+ form.elements['subj'].value = "";
+ form.elements['mesg'].value = "";
+ break;
+ }
+ } while (0);
+
+ return (false);
+}
+
+function mesgtoadmbox(w, h)
+{
+ var box;
+
+ box = $('mesgtoadmbox');
+
+ box.style.zIndex = 200;
+ box.style.width = w+"px";
+ box.style.marginLeft = -parseInt(w/2)+"px";
+ box.style.height = h+"px";
+ box.style.top = parseInt((document.body.clientHeight - h) / 2) + document.body.scrollTop;
+
+ mesgtoadm_formtext_hilite($('mesgtoadm_form'));
+
+ box.style.visibility = "visible";
+ $('mesgtoadm_form').elements['subj'].focus();
+}
+
+function list_set(what, setco, info)
+{
+ if (what == 'auth') {
+ $('list_auth').style.color = 'red';
+ $('list_all').style.color = 'black';
+ }
+ else {
+ $('list_auth').style.color = 'black';
+ $('list_all').style.color = 'red';
+ }
+ $('list_info').innerHTML = info;
+ if (setco) {
+ createCookie("CO_list", what, 24*365, cookiepath);
+ }
+}