missing update when S color changed fixed and version update v4.7.4
authorMatteo Nastasi <nastasi@alternativeoutput.it>
Sat, 16 Mar 2013 18:07:13 +0000 (19:07 +0100)
committerMatteo Nastasi <nastasi@alternativeoutput.it>
Sat, 16 Mar 2013 18:07:13 +0000 (19:07 +0100)
web/Obj/brisk.phh
web/room.js

index b480917..90df86f 100644 (file)
@@ -141,7 +141,7 @@ $mlang_brisk = array( 'btn_backstand'=> array( 'it' => 'torna in piedi',
 $G_lng = langtolng($G_lang);
 
 $G_all_points = array( 11,10,4,3,2, 0,0,0,0,0 );
-$G_brisk_version = "4.7.3";
+$G_brisk_version = "4.7.4";
 
 /* MLANG: ALL THE INFO STRINGS IN brisk.phh */
 $root_wellarr = array( 'it' => array ( 'Brisk (Ver. '.$G_brisk_version.'), <b>NOVITA\'</b>: prova il nuovo azioni->preferenze.',
index f4bb465..85ea699 100644 (file)
@@ -263,6 +263,9 @@ function j_stand_tdcont(el)
     return (user_dec_and_state(el));
 }
 
+/*
+  ddata = [ [ <flags-int>, <nick-str>, <color-str> ], ... ]
+ */
 function j_stand_cont(ddata)
 {
     var i, ii;
@@ -285,9 +288,11 @@ function j_stand_cont(ddata)
     else
         data = ddata;
 
+    // WARNING:
+    //
+    //   managing update needs this branch (for few users and the else!!)
+    //
     if (standup_data_old == null || data.length < 4) {
-    // if (standup_data_old == null) {
-        
         content = '<table cols="'+(data.length < 4 ? data.length : 4)+'" class="table_standup">';
         for (i = 0 ; i < data.length ; i++) {
             if ((i % 4) == 0)
@@ -305,18 +310,6 @@ function j_stand_cont(ddata)
         
         $("standup").innerHTML = content;
 
-        // console.log("inizio");
-        // for (i = 0 , curtag = table_walk($("standup")) ; curtag != null ;  curtag = table_walk(curtag), i++ ) {
-        //     console.log("inloop["+i+"]: "+curtag.tagName+"  ID: "+curtag.id);
-        // }
-        // console.log("fine "+i);
-
-        // walktable($("standup"), nextag);
-        // console.log($("standup").firstChild);
-        // console.log($("standup").firstChild.firstChild.firstChild.firstChild);
-
-        // log_walk($("standup"));
-
         standup_data_old = data;
     }
     else {
@@ -346,7 +339,9 @@ function j_stand_cont(ddata)
             }
             else {
                 /* modified entries */
-                if (standup_data_old[i][0] != data[e][0]) {
+                if (standup_data_old[i][0] != data[e][0] ||
+                    standup_data_old[i].length != data[e].length ||
+                    (data[e].length == 3 && standup_data_old[i][2] != data[e][2])) {
                     arr_mod[idx_mod_n] = data[e];
                     idx_mod[idx_mod_n++] = i;
                 }