Index: /trunk/FACT++/www/smartfact/index.js
===================================================================
--- /trunk/FACT++/www/smartfact/index.js	(revision 13767)
+++ /trunk/FACT++/www/smartfact/index.js	(revision 13768)
@@ -299,5 +299,5 @@
     var inputs = document.getElementsByTagName("input");
 
-    var args = "start="+script;
+    var args = "start="+script+".dim";
     for (var i=0; i<inputs.length; i++)
         args += "&"+inputs[i].name+"="+inputs[i].value;
@@ -329,5 +329,8 @@
     }
 
-    var title = lines[0].split('/');
+    var title  = lines[0];
+    var is_cmd = title[0]=='*';
+    if (is_cmd)
+        title = title.substr(1);
 
     var table = $("table"+z);
@@ -411,9 +414,9 @@
     sp2.setAttribute("data-color", "3");
     sp0.appendChild(document.createTextNode(" \u2022 "));
-    sp1.appendChild(document.createTextNode(title[0]));
+    sp1.appendChild(document.createTextNode(title));
     sp2.appendChild(document.createTextNode(" \u2022 "));
-    if (title[1]!=undefined)
-    {
-        // sp1.onclick = function() { this.style.backgroundColor='rgba(0,0,0,0.77)'; loadPage('fact', z, -1); }
+    if (is_cmd)
+    {
+        sp1.onclick = function() { this.style.backgroundColor='rgba(0,0,0,0.77)'; submit(name); this.style.backgroundColor=''; }
     }
     else
@@ -426,4 +429,6 @@
     div1.id = "reporttime"+z;
     div1.appendChild(document.createTextNode("---"));
+
+    div1.onclick = function() { this.style.backgroundColor='rgba(0,0,0,0.77)'; sendCommand('stop'); this.style.backgroundColor=''; }
 
     htd0.appendChild(sp0);
@@ -1286,15 +1291,18 @@
 
     // --- data ---
-    ctx.beginPath();
-    ctx.moveTo(ml, ch-mb-data.charCodeAt(0)/128*h);
-    for (var i=1; i<data.length; i++)
-        ctx.lineTo(ml+w/(data.length-1)*i, ch-mb-data.charCodeAt(i)/128*h);
-
-    // --- finalize data ---
-    ctx.lineTo(cw-mr, ch-mb);
-    ctx.lineTo(ml,    ch-mb);
-    ctx.fillStyle = "#"+color(100);
-    ctx.stroke();
-    ctx.fill();
+    if (data.length>1)
+    {
+        ctx.beginPath();
+        ctx.moveTo(ml, ch-mb-data.charCodeAt(0)/128*h);
+        for (var i=1; i<data.length; i++)
+            ctx.lineTo(ml+w/(data.length-1)*i, ch-mb-data.charCodeAt(i)/128*h);
+
+        // --- finalize data ---
+        ctx.lineTo(cw-mr, ch-mb);
+        ctx.lineTo(ml,    ch-mb);
+        ctx.fillStyle = "#"+color(100);
+        ctx.stroke();
+        ctx.fill();
+    }
 
     ctx.beginPath();
