log_legal function usable without a valid user instance as parameter
[brisk.git] / web / commons.js
index c65dd51..721b816 100644 (file)
@@ -274,9 +274,26 @@ function send_mesg(mesg, content)
         }
         var target = window.location.href.substring(0,
             window.location.href.lastIndexOf('/') + 1) + 'index_wr.php';
-        var ws_msg = JSON.stringify({target: target, mesg: mesg, stp:gst.st, sess:sess});
-        console.log(ws_msg);
-        xstm.transp.ws.send(ws_msg);
+        var ws_msg = JSON.stringify({
+            target: target,
+            mesg: mesg,
+            stp:gst.st,
+            sess:sess,
+            table_idx: readCookie("table_idx"),
+            table_token: readCookie("table_token"),
+            lang: readCookie("lang")
+            });
+        // console.log(ws_msg);
+        xstm.send(ws_msg);
+        /*
+        if (xstm.transp.ws.readyState == 1) {
+            xstm.transp.ws.send(ws_msg);
+        }
+        else {
+            xstm.transp.out_queue.push(ws_msg);
+        }
+        */
+
     }
     else {
     var xhr_wr = createXMLHttpRequest();