client-side notify document return value managed
[brisk.git] / web / Obj / brisk.phh
index a2e1cb8..7fa2f36 100644 (file)
@@ -2374,7 +2374,7 @@ class Room
           return TRUE;
 
           break;
-      case "index_rd_ifra.php":
+      case "index_rd.php":
           if (($transp  = gpcs_var('transp', $get, $post, $cookie)) === FALSE)
               $transp = "iframe";
           if ($transp == 'websocket')
@@ -2881,6 +2881,19 @@ function show_notify_ex($text, $tout, $butt, $w, $h, $is_opaque, $block_time)
   return sprintf('var noti = new notify_ex(gst,"%s",%d,"%s",%d,%d, %s, %d);', $text, $tout, $butt, $w, $h, ($is_opaque ? "true" : "false"), $block_time);
 }
 
+function show_notify_document($text, $tout, $butt_arr, $w, $h, $is_opaque, $block_time)
+{
+  log_main("SHOW_NOTIFY OPAQUE: ".$text);
+
+  $butts = "";
+  for ($i = 0 ; $i < count($butt_arr) ; $i++) {
+      $butts .= sprintf("%s'%s'", ($i == 0 ? "" : ","), $butt_arr[$i]);
+  }
+
+  return sprintf('g_nd = new notify_document(gst, "%s", %d, [ %s ], %d, %d, %s, %d);|',
+                 escpush($text), $tout, $butts, $w, $h, ($is_opaque ? "true" : "false"), $block_time);
+}
+
 
 function root_welcome($user)
 {