X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Froom.js;h=82e6fcc1fac0e1e592bbcce3191c72b183dd04c8;hb=b65dddf6cb8fdc5a98719ed170ca38c2059b362c;hp=0c81cff3774010dee94ccc4a3045952e0d9dc753;hpb=fa82ba0deaaab26b5b9efe37c392a34cbec50a66;p=brisk.git diff --git a/web/room.js b/web/room.js index 0c81cff..82e6fcc 100644 --- a/web/room.js +++ b/web/room.js @@ -1,7 +1,7 @@ /* * brisk - room.js * - * Copyright (C) 2006-2011 Matteo Nastasi + * Copyright (C) 2006-2012 Matteo Nastasi * mailto: nastasi@alternativeoutput.it * matteo.nastasi@milug.org * web: http://www.alternativeoutput.it @@ -23,13 +23,11 @@ /* + data = [ [ flags, name ], ... ] */ -var l_list_all = 0x00; -var l_list_auth = 0x01; -var l_list_isol = 0x02; function state_add(flags) { @@ -86,6 +84,22 @@ function state_add(flags) name = "st_mop.png"; tit = (g_lang == 'en' ? "Mop time" : "sto rassettando"); break; + case 0xc00: + name = "st_babbo.png"; + tit = (g_lang == 'en' ? "Sto dando i regali" : "sto dando i regali"); + break; + case 0xd00: + name = "st_renna.png"; + tit = (g_lang == 'en' ? "in giro per regali" : "in giro per regali"); + break; + case 0xe00: + name = "st_pupaz.png"; + tit = (g_lang == 'en' ? "Neve a gogò" : "neve a gogò"); + break; + case 0xf00: + name = "st_visch.png"; + tit = (g_lang == 'en' ? "aspettando sotto al vischio" : "aspettando sotto al vischio"); + break; default: break; } @@ -123,7 +137,7 @@ var standup_data_old = null; function table_add(curtag, td) { - var tbody = null, tr; + var tbody = null, tr, ct; do { // console.log("wt: "+curtag.tagName); @@ -241,25 +255,7 @@ function table_walk(curtag) function j_stand_tdcont(el) { - var content = ""; - - if (el[0] & 0x01) - content += ''; - - if (el[0] & 0x02) - content += ''; - - content += el[1]; - - if (el[0] & 0x02) - content += ''; - - if (el[0] & 0x01) - content += ''; - - content += state_add(el[0]); - - return (content); + return (user_dec_and_state(el)); } function j_stand_cont(ddata) @@ -437,7 +433,7 @@ function esco_cb() { window.onbeforeunload = null; window.onunload = null; // nonunload = true; - act_logout(); + act_logout(0); }; @@ -448,20 +444,9 @@ function j_tab_cont(table_idx, data) var content = ''; for (i = 0 ; i < data.length ; i++) { - if (data[i][0] & 0x01) - content += ''; - - if (data[i][0] & 0x02) - content += ''; - - content += data[i][1]; - - if (data[i][0] & 0x02) - content += ''; - - if (data[i][0] & 0x01) - content += ''; - content += state_add(data[i][0]); + // content += user_decorator(data[i]); + // content += state_add(data[i][0]); + content += j_stand_tdcont(data[i]); content += '
'; } @@ -708,77 +693,6 @@ function j_pollbox(form) } - - -function list_set(what, is_update, info) -{ - // console.log(what); - var i; - var relo = false; - var old_st = readCookie("CO_list"); - - if (what == 'auth') { - $('list_auth').style.color = 'red'; - $('list_isol').style.color = 'black'; - $('list_all').style.color = 'black'; - if (old_st == 'isolation') - relo = true; - g_listen = l_list_auth; - } - else if (what == 'isolation') { - $('list_auth').style.color = 'black'; - $('list_isol').style.color = 'red'; - $('list_all').style.color = 'black'; - if (old_st != 'isolation') - relo = true; - g_listen = l_list_isol; - } - else { - $('list_auth').style.color = 'black'; - $('list_isol').style.color = 'black'; - $('list_all').style.color = 'red'; - if (old_st == 'isolation') - relo = true; - g_listen = l_list_all; - } - - set_checked_value($('ra_listen_auth'), what); - set_checked_value($('ra_listen_isol'), what); - set_checked_value($('ra_listen_all'), what); - - $('list_info').innerHTML = info; - if (is_update) { - createCookie("CO_list", what, 24*365, cookiepath); - } - - - if (relo || !is_update) { - for (i = g_tables_auth_n ; i < g_tables_n ; i++) { - - if (i % 4 == 0) { - $('tr_noauth'+i).style.display = (what == 'isolation' ? 'none' : ''); - } - - $('td_noauth'+i).style.display = (what == 'isolation' ? 'none' : ''); - } - if (what == 'isolation') { - tra.hide_noauth(); - } - else { - tra.show_noauth(); - } - - if (false) { - // ricalculation of standup area - if (standup_data_old != null) { - standup_data = standup_data_old; - standup_data_old = null; - j_stand_cont(standup_data); - } - } - } -} - function sideslide(domobj, height, step) { this.st = 'wait';