]> mop.ddnsfree.com - git repositories - brisk.git/commitdiff
renamed xhr.js to http_streaming.js and move hbit to externa heartbit.js file
authorMatteo Nastasi (mop) <nastasi@alternativeoutput.com>
Sat, 17 Dec 2011 17:25:55 +0000 (18:25 +0100)
committerMatteo Nastasi (mop) <nastasi@alternativeoutput.com>
Sat, 17 Dec 2011 17:25:55 +0000 (18:25 +0100)
INSTALL.sh
web/briskin5/index.php
web/heartbit.js [new file with mode: 0644]
web/http_streaming.js [moved from web/xhr.js with 97% similarity]
web/index.php

index 134d2fbd0cc2fdaf4ba7862483806556ea773b02..e4321a103000636cf32db2b780eb675733b64e45 100755 (executable)
@@ -313,7 +313,7 @@ sed -i "s@define *( *BRISK_CONF,[^)]*)@define(BRISK_CONF, \"$brisk_conf\")@g" ${
 
 sed -i "s@define *( *BRISK_AUTH_CONF,[^)]*)@define(BRISK_AUTH_CONF, \"$brisk_auth_conf\")@g" ${web_path}__/Obj/auth.phh
 
-sed -i "s@\( \+xhr_rd_cookiepath *: *\)\"[^\"]*\" *,@\1 \"$cookie_path\",@g" ${web_path}__/xhr.js
+sed -i "s@\( \+xhr_rd_cookiepath *: *\)\"[^\"]*\" *,@\1 \"$cookie_path\",@g" ${web_path}__/http_streaming.js
 sed -i "s@var \+cookiepath \+= \+\"[^\"]*\";@var cookiepath = \"$cookie_path\";@g" ${web_path}__/commons.js
 
 if [ -d ${web_path} ]; then
index 6a0b9e1ac04d71e1e81c10e2277d0df1b60f9a15..369e6b9f36eefeff631ebd6b82a8765218f9c8fa 100644 (file)
@@ -53,7 +53,8 @@ header('Content-type: text/html; charset="utf-8"',true);
 <title>Brisk - Tavolo <?php echo "$table_idx";?></title>
 <link rel="shortcut icon" href="../img/brisk_ico.png">
 <script type="text/javascript" src="../commons.js"></script> 
-<script type="text/javascript" src="../xhr.js"></script>
+<script type="text/javascript" src="../heartbit.js"></script>
+<script type="text/javascript" src="../http_streaming.js"></script>
 <script type="text/javascript" src="dnd.js"></script>
 <script type="text/javascript" src="dom-drag.js"></script>
 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
@@ -101,7 +102,7 @@ window.onload = function() {
 
   sess = "<?php echo "$sess"; ?>";
   hstm = new http_streaming("sess");
-  hstm.hbit_set(hbit);
+  hstm.hbit_set(heartbit);
   
   window.onbeforeunload = onbeforeunload_cb;  
   window.onunload = onunload_cb;  
diff --git a/web/heartbit.js b/web/heartbit.js
new file mode 100644 (file)
index 0000000..d408775
--- /dev/null
@@ -0,0 +1,11 @@
+function heartbit(symb)
+{
+    if ($("heartbit").innerHTML.length >= 120) {
+        $("heartbit").innerHTML = $("heartbit").innerHTML.substring(10);
+        $("heartbit").innerHTML += symb;
+    }
+    else {
+        $("heartbit").innerHTML += symb;
+    }
+}
+
similarity index 97%
rename from web/xhr.js
rename to web/http_streaming.js
index 16a34959ed86428271d75fbf53a543dd02d3a881..a813814927281b4917aa5e2faa9041e42af8e8e7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  brisk - xhr.js
+ *  brisk - http_streaming.js
  *
  *  Copyright (C) 2006-2011 Matteo Nastasi
  *                          mailto: nastasi@alternativeoutput.it 
@@ -24,7 +24,6 @@
  *   MANDATORY
  *
  *   NOT MANDATORY
- *   - remove hbit imple
  *   - gst management
  *   - sandbox management
  *   - myfrom into the constructor
  *   - substitute fixed "eval" with a generic command hunks processor
  *
  *   DONE - xhr_rd prefix remove from inner class attrs
+ *   DONE - move hbit implementation to external file
  *
  */
 
-function hbit(symb)
-{
-    if ($("heartbit").innerHTML.length >= 120) {
-        $("heartbit").innerHTML = $("heartbit").innerHTML.substring(10);
-        $("heartbit").innerHTML += symb;
-    }
-    else {
-        $("heartbit").innerHTML += symb;
-    }
-}
-
 function http_streaming(cookiename)
 {
     this.xhr = createXMLHttpRequest();
+    // this.xhr.setRequestHeader("Content-type", "text/html; charset=utf-8");
     this.cookiename = cookiename;
 }
 
index 170bb75a199430d7448f3e8b8d4004f3045c1075..489f23bbe0b7a7e613c799c19dfc7f71ccf71a52 100644 (file)
@@ -873,9 +873,8 @@ supported by:<br>
 <script type="text/javascript" src="commons.js"></script> 
 <script type="text/javascript" src="myconsole.js"></script>
 <script type="text/javascript" src="menu.js"></script>
-<!-- <script type="text/javascript" src="dnd.js"></script>
-<script type="text/javascript" src="dom-drag.js"></script> -->
-<script type="text/javascript" src="xhr.js"></script>
+<script type="text/javascript" src="heartbit.js"></script>
+<script type="text/javascript" src="http_streaming.js"></script>
 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
 <script type="text/javascript" src="AC_OETags.js"></script>
 <script type="text/javascript" src="room.js"></script>
@@ -1007,10 +1006,9 @@ echo "$body"; ?>
 <script type="text/javascript" src="commons.js"></script>
 <script type="text/javascript" src="myconsole.js"></script>
 <script type="text/javascript" src="menu.js"></script>
-<!-- <script type="text/javascript" src="dnd.js"></script>
-<script type="text/javascript" src="dom-drag.js"></script> -->
 <script type="text/javascript" src="ticker.js"></script>
-<script type="text/javascript" src="xhr.js"></script>
+<script type="text/javascript" src="heartbit.js"></script>
+<script type="text/javascript" src="http_streaming.js"></script>
 <script type="text/javascript" src="room.js"></script>
 <script type="text/javascript" src="preload_img<?php echo langtolng($G_lang); ?>.js"></script>
 <script type="text/javascript" src="AC_OETags.js"></script>
@@ -1067,8 +1065,7 @@ else {
 ?>
      sess = "<?php echo "$sess"; ?>";
      hstm = new http_streaming("sess");
-     hstm.hbit_set(hbit);
-     // xhr_rd.setRequestHeader("Content-type", "text/html; charset=utf-8");
+     hstm.hbit_set(heartbit);
      tra = new train($('room_tit'));
      window.onunload = onunload_cb;
      window.onbeforeunload = onbeforeunload_cb;