Changeset 13768
- Timestamp:
- 05/17/12 20:22:25 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/www/smartfact/index.js
r13747 r13768 299 299 var inputs = document.getElementsByTagName("input"); 300 300 301 var args = "start="+script ;301 var args = "start="+script+".dim"; 302 302 for (var i=0; i<inputs.length; i++) 303 303 args += "&"+inputs[i].name+"="+inputs[i].value; … … 329 329 } 330 330 331 var title = lines[0].split('/'); 331 var title = lines[0]; 332 var is_cmd = title[0]=='*'; 333 if (is_cmd) 334 title = title.substr(1); 332 335 333 336 var table = $("table"+z); … … 411 414 sp2.setAttribute("data-color", "3"); 412 415 sp0.appendChild(document.createTextNode(" \u2022 ")); 413 sp1.appendChild(document.createTextNode(title [0]));416 sp1.appendChild(document.createTextNode(title)); 414 417 sp2.appendChild(document.createTextNode(" \u2022 ")); 415 if ( title[1]!=undefined)416 { 417 // sp1.onclick = function() { this.style.backgroundColor='rgba(0,0,0,0.77)'; loadPage('fact', z, -1); }418 if (is_cmd) 419 { 420 sp1.onclick = function() { this.style.backgroundColor='rgba(0,0,0,0.77)'; submit(name); this.style.backgroundColor=''; } 418 421 } 419 422 else … … 426 429 div1.id = "reporttime"+z; 427 430 div1.appendChild(document.createTextNode("---")); 431 432 div1.onclick = function() { this.style.backgroundColor='rgba(0,0,0,0.77)'; sendCommand('stop'); this.style.backgroundColor=''; } 428 433 429 434 htd0.appendChild(sp0); … … 1286 1291 1287 1292 // --- data --- 1288 ctx.beginPath(); 1289 ctx.moveTo(ml, ch-mb-data.charCodeAt(0)/128*h); 1290 for (var i=1; i<data.length; i++) 1291 ctx.lineTo(ml+w/(data.length-1)*i, ch-mb-data.charCodeAt(i)/128*h); 1292 1293 // --- finalize data --- 1294 ctx.lineTo(cw-mr, ch-mb); 1295 ctx.lineTo(ml, ch-mb); 1296 ctx.fillStyle = "#"+color(100); 1297 ctx.stroke(); 1298 ctx.fill(); 1293 if (data.length>1) 1294 { 1295 ctx.beginPath(); 1296 ctx.moveTo(ml, ch-mb-data.charCodeAt(0)/128*h); 1297 for (var i=1; i<data.length; i++) 1298 ctx.lineTo(ml+w/(data.length-1)*i, ch-mb-data.charCodeAt(i)/128*h); 1299 1300 // --- finalize data --- 1301 ctx.lineTo(cw-mr, ch-mb); 1302 ctx.lineTo(ml, ch-mb); 1303 ctx.fillStyle = "#"+color(100); 1304 ctx.stroke(); 1305 ctx.fill(); 1306 } 1299 1307 1300 1308 ctx.beginPath();
Note:
See TracChangeset
for help on using the changeset viewer.