From 8999ffa5e50d2c772b2cf765e24f2e3df76fee44 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Mon, 19 Oct 2015 18:35:25 +0200 Subject: [PATCH] add new is_real argument for user_decorator js function --- web/briskin5/briskin5.js | 10 +++++----- web/commons.js | 14 ++++++++------ web/room.css | 3 +++ 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/web/briskin5/briskin5.js b/web/briskin5/briskin5.js index ffe6c8b..f67dd49 100644 --- a/web/briskin5/briskin5.js +++ b/web/briskin5/briskin5.js @@ -274,15 +274,15 @@ function act_reload() function set_names(so,ea,ne,nw,we) { // alert("SET NAME"); - $("name").innerHTML = user_decorator(so); + $("name").innerHTML = user_decorator(so, false); $("name").title = unescapeHTML(so[1]); - $("name_ea").innerHTML = user_decorator(ea); + $("name_ea").innerHTML = user_decorator(ea, false); $("name_ea").title = unescapeHTML(ea[1]); - $("name_ne").innerHTML = user_decorator(ne); + $("name_ne").innerHTML = user_decorator(ne, false); $("name_ne").title = unescapeHTML(ne[1]); - $("name_nw").innerHTML = user_decorator(nw); + $("name_nw").innerHTML = user_decorator(nw, false); $("name_nw").title = unescapeHTML(nw[1]); - $("name_we").innerHTML = user_decorator(we); + $("name_we").innerHTML = user_decorator(we, false); $("name_we").title = unescapeHTML(we[1]); for (i = 0 ; i < PLAYERS_N ; i++) diff --git a/web/commons.js b/web/commons.js index 5b6e915..c42fc7b 100644 --- a/web/commons.js +++ b/web/commons.js @@ -1,7 +1,7 @@ /* * brisk - commons.js * - * Copyright (C) 2006-2012 Matteo Nastasi + * Copyright (C) 2006-2015 Matteo Nastasi * mailto: nastasi@alternativeoutput.it * matteo.nastasi@milug.org * web: http://www.alternativeoutput.it @@ -145,7 +145,7 @@ function getStyle(x,IEstyleProp, MozStyleProp) })() -function addEvent(obj,type,fn) +function addEvent(obj, type, fn) { if (obj.addEventListener) { obj.addEventListener( type, fn, false); @@ -1024,7 +1024,7 @@ var chatt_lines_n = 0; var CHATT_MAXLINES = 40; -function user_decorator(user) +function user_decorator(user, is_real) { var name, i, sp = "", cl = ""; var flags = user[0] & 0x03 | ((user[0] & 0x0c0000) >> 16); @@ -1039,7 +1039,9 @@ function user_decorator(user) } if (flags != 0) - name = ""+user[1]+""; + name = ""+user[1]+""; else name = user[1]; @@ -1051,7 +1053,7 @@ function user_dec_and_state(el) var content = ""; var val_el; - content = user_decorator(el); + content = user_decorator(el, true); content += state_add(el[0],(typeof(el[2]) != 'undefined' ? el[2] : null)); return (content); @@ -1066,7 +1068,7 @@ function chatt_sub(dt,data,str) var flags; var isauth; var bolder = [ (data[0] | 1), data[1] ]; - name = user_decorator(bolder); + name = user_decorator(bolder, false); if ($("txt").scrollTop + parseInt(getStyle($("txt"),"height", "height")) - $("txt").scrollHeight >= 0) must_scroll = true; diff --git a/web/room.css b/web/room.css index c709a3a..4f15cb9 100644 --- a/web/room.css +++ b/web/room.css @@ -457,3 +457,6 @@ img.tickbut { margin-top:4px; } +span.id_usr { + cursor: pointer; +} \ No newline at end of file -- 2.17.1