X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Froom.js;h=4a53d50959e65d1903cb1d47b764b443fd9ee542;hb=70234232cbab5617dcae7a3719b7d7a75f63cf62;hp=46f861205966f799cdc3141a7bba7c3121aeec6b;hpb=905faa3e218eb6a89f175e005c94dc7d5fb2d013;p=brisk.git diff --git a/web/room.js b/web/room.js index 46f8612..4a53d50 100644 --- a/web/room.js +++ b/web/room.js @@ -1,7 +1,7 @@ /* * brisk - room.js * - * Copyright (C) 2006-2009 Matteo Nastasi + * Copyright (C) 2006-2011 Matteo Nastasi * mailto: nastasi@alternativeoutput.it * matteo.nastasi@milug.org * web: http://www.alternativeoutput.it @@ -33,9 +33,10 @@ var l_list_isol = 0x02; function state_add(flags) { - var content = ""; - var st, name = ""; - var tit = ""; + var content = "", supercont = ""; + var st, superst, name = "", supername = "", supersfx = ""; + var tit = "", supertit = ""; + if ((flags & 0xf00) != 0) { st = flags & 0xf00; @@ -73,12 +74,43 @@ function state_add(flags) name = "st_rabbit.png"; tit = (g_lang == 'en' ? "Rabbit time" : "sono a spasso col coniglio"); break; + case 0x900: + name = "st_soccer.png"; + tit = (g_lang == 'en' ? "Soccer time" : "c'è la partita!!"); + break; + case 0xa00: + name = "st_baby.png"; + tit = (g_lang == 'en' ? "Children time" : "ho il pupo da accudire"); + break; + case 0xb00: + name = "st_mop.png"; + tit = (g_lang == 'en' ? "Mop time" : "sto rassettando"); + break; default: break; } + } + + if ((flags & 0xf0000) != 0) { + superst = flags & 0xf0000; if (name != "") { - content += ' '; + supersfx = "_side"; } + + switch (superst) { + case 0x20000: + supername = "superuser"+supersfx+".png"; + supertit = (g_lang == 'en' ? "Brisk Supporter" : "Brisk Supporter"); + break; + } + } + + if (supername != "") { + content += ' '; + } + + if (name != "") { + content += ' '; } return content; @@ -209,25 +241,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) @@ -416,20 +430,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 += '
'; }