projects
/
brisk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Log refactoring, the_end field added, check to avoid multiple table_wakeup.
[brisk.git]
/
web
/
commons.js
diff --git
a/web/commons.js
b/web/commons.js
index
30108c6
..
091325c
100644
(file)
--- a/
web/commons.js
+++ b/
web/commons.js
@@
-22,6
+22,7
@@
var PLAYERS_N = 3;
var EXIT_BAN_TIME = 900;
var PLAYERS_N = 3;
var EXIT_BAN_TIME = 900;
+var cookiepath = "/brisk/";
function $(id) { return document.getElementById(id); }
function $(id) { return document.getElementById(id); }
@@
-174,8
+175,9
@@
function createXMLHttpRequest() {
function send_mesg(mesg)
{
var xhr_wr = createXMLHttpRequest();
function send_mesg(mesg)
{
var xhr_wr = createXMLHttpRequest();
- // xhr_wr.open('GET', 'index_wr.php?sess='+sess+'&mesg='+encodeURIComponent(mesg), true);
- xhr_wr.open('GET', 'index_wr.php?sess='+sess+'&mesg='+mesg, true);
+
+
+ xhr_wr.open('GET', 'index_wr.php?sess='+sess+'&mesg='+encodeURIComponent(mesg), true);
xhr_wr.onreadystatechange = function() { return; };
xhr_wr.send(null);
xhr_wr.onreadystatechange = function() { return; };
xhr_wr.send(null);
@@
-309,11
+311,6
@@
function act_shutdown()
c++;
}
c++;
}
-function act_preout()
-{
- act_logout();
-}
-
function postact_logout()
{
// alert("postact_logout");
function postact_logout()
{
// alert("postact_logout");
@@
-467,10
+464,12
@@
function dispose_asta(idx, pnt, nopoint)
btn = $("asta"+i);
if (i < idx) {
btn.src = "img/astapasso"+(pnt >= 0 ? "" : "_ro")+".png";
btn = $("asta"+i);
if (i < idx) {
btn.src = "img/astapasso"+(pnt >= 0 ? "" : "_ro")+".png";
+ btn.style.cursor = (pnt >= 0 ? "pointer" : "default");
pass = -1;
}
else {
btn.src = "img/asta"+i+(pnt >= 0 ? "" : "_ro")+".png";
pass = -1;
}
else {
btn.src = "img/asta"+i+(pnt >= 0 ? "" : "_ro")+".png";
+ btn.style.cursor = (pnt >= 0 ? "pointer" : "default");
pass = i;
}
if (i < 19)
pass = i;
}
if (i < 19)
@@
-478,15
+477,15
@@
function dispose_asta(idx, pnt, nopoint)
else
btn.style.left = asta_xarr[(i+1) % 3];
else
btn.style.left = asta_xarr[(i+1) % 3];
- btn.style.top = parseInt(i / 3) * 50
+1
;
+ btn.style.top = parseInt(i / 3) * 50
+ (i == 9 ? 0 : 1)
;
if (pnt >= 0) {
eval("btn.onclick = function () { act_asta("+pass+",61); }");
if (pnt >= 0) {
eval("btn.onclick = function () { act_asta("+pass+",61); }");
- btn.style.
hover_
cursor = "pointer";
+ btn.style.cursor = "pointer";
}
else {
btn.onclick = null;
}
else {
btn.onclick = null;
- btn.style.
hover_cursor = "
";
+ btn.style.
cursor = "default
";
}
}
}
}
@@
-504,14
+503,14
@@
function dispose_asta(idx, pnt, nopoint)
btn.style.left = asta_xarr[i % 3];
btn.style.top = 25 + parseInt(i / 3) * 50 - 1;
btn.src = "img/astaptsub"+(pnt >= 0 ? "" : "_ro")+".png";
btn.style.left = asta_xarr[i % 3];
btn.style.top = 25 + parseInt(i / 3) * 50 - 1;
btn.src = "img/astaptsub"+(pnt >= 0 ? "" : "_ro")+".png";
-
// btn.style.visibility = "visible"
;
+
btn.style.cursor = (pnt >= 0 ? "pointer" : "default")
;
if (pnt >= 0) {
btn.onclick = function () { act_asta(9,$("astapt").value); };
if (pnt >= 0) {
btn.onclick = function () { act_asta(9,$("astapt").value); };
-
// btn.stylehover
.cursor = "pointer";
+
btn.style
.cursor = "pointer";
}
else {
btn.onclick = null;
}
else {
btn.onclick = null;
-
// btn.stylehover.cursor = "
";
+
btn.style.cursor = "default
";
}
i+=1;
}
i+=1;
@@
-520,13
+519,12
@@
function dispose_asta(idx, pnt, nopoint)
btn.style.left = asta_xarr[i % 3];
btn.style.top = parseInt(i / 3) * 50;
btn.src = "img/astapashalf"+(pnt >= 0 ? "" : "_ro")+".png";
btn.style.left = asta_xarr[i % 3];
btn.style.top = parseInt(i / 3) * 50;
btn.src = "img/astapashalf"+(pnt >= 0 ? "" : "_ro")+".png";
+ btn.style.cursor = (pnt >= 0 ? "pointer" : "default");
if (pnt >= 0) {
btn.onclick = function () { act_asta(-1,0); };
if (pnt >= 0) {
btn.onclick = function () { act_asta(-1,0); };
- // btn.stylehover.cursor = "pointer";
}
else {
btn.onclick = null;
}
else {
btn.onclick = null;
- // btn.stylehover.cursor = "";
}
btn = $("astalascio");
}
btn = $("astalascio");
@@
-541,13
+539,12
@@
function dispose_asta(idx, pnt, nopoint)
btn.style.left = asta_xarr[i % 3];
btn.style.top = parseInt(i / 3) * 50;;
btn.src = "img/astapasso"+(pnt >= 0 ? "" : "_ro")+".png";
btn.style.left = asta_xarr[i % 3];
btn.style.top = parseInt(i / 3) * 50;;
btn.src = "img/astapasso"+(pnt >= 0 ? "" : "_ro")+".png";
+ btn.style.cursor = (pnt >= 0 ? "pointer" : "default");
if (pnt >= 0) {
btn.onclick = function () { act_asta(-1,0); };
if (pnt >= 0) {
btn.onclick = function () { act_asta(-1,0); };
- // btn.stylehover.cursor = "pointer";
}
else {
btn.onclick = null;
}
else {
btn.onclick = null;
- // btn.stylehover.cursor = "";
}
btn = $("astalascio");
}
btn = $("astalascio");
@@
-558,6
+555,13
@@
function dispose_asta(idx, pnt, nopoint)
$("asta").style.visibility = "visible";
}
$("asta").style.visibility = "visible";
}
+function asta_pnt_set(pnt)
+{
+ btn = $("astapt");
+ var rpnt = (pnt < 0 ? -pnt : pnt);
+ btn.value = (rpnt < 61 ? 61 : (rpnt > 120 ? 120 : rpnt));
+}
+
function hide_asta()
{
$("asta").style.visibility = "hidden";
function hide_asta()
{
$("asta").style.visibility = "hidden";
@@
-882,7
+886,7
@@
function room_checkspace(emme,tables,inpe)
stand = "<table class=\"table_standup\"><tbody><tr>";
for (i = 0 ; i < inpe ; i++) {
stand = "<table class=\"table_standup\"><tbody><tr>";
for (i = 0 ; i < inpe ; i++) {
- stand += "<td
class=\"td_standup\"
>"+nome+"</td>";
+ stand += "<td>"+nome+"</td>";
if ((i+1) % 4 == 0) {
stand += "</tr><tr>";
}
if ((i+1) % 4 == 0) {
stand += "</tr><tr>";
}
@@
-890,7
+894,7
@@
function room_checkspace(emme,tables,inpe)
stand += "</tr>";
$("standup").innerHTML = stand;
stand += "</tr>";
$("standup").innerHTML = stand;
- $("esco").innerHTML = "<input name=\"logout\" type=\"button\" value=\"Esco.\" onclick=\"window.onunload = null; act_logout();\" type=\"button\">";
+ $("esco").innerHTML = "<input
class=\"button\"
name=\"logout\" type=\"button\" value=\"Esco.\" onclick=\"window.onunload = null; act_logout();\" type=\"button\">";
}
function playsound(tag, sound) {
}
function playsound(tag, sound) {