Changeset 17711 for trunk/FACT++


Ignore:
Timestamp:
04/28/14 12:17:05 (11 years ago)
Author:
tbretz
Message:
Do not process main when only the pixel has been changed; some imporvements to the main accordion; A slightly nicer test code.
Location:
trunk/FACT++/www/viewer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/www/viewer/index.html

    r17703 r17711  
    7373      <div id="textcontainer2">
    7474         <textarea id="editor2" name="editor2" type="textarea">
    75 print("test\n2nd line\n");
     75print("This output will go to the Console.\n");
    7676
    7777// The four first values of pixel 1
    7878var arr = [ $.data[1][0], $.data[1][1], $.data[1][2], $.data[1][3] ];
    79 print("return [ "+arr+" ]\n");
     79print("Pixel 1: [ "+arr+" ]\n");
    8080
    8181// Get the maximum sample from each pixel
  • trunk/FACT++/www/viewer/index.js

    r17700 r17711  
    321321function onDataReceived(rc)
    322322{
     323    var err = document.getElementById("error");
    323324    var dbg = document.getElementById("debug");
     325    var con = document.getElementById("console");
    324326
    325327    var pre = document.createElement("pre");
     
    343345    el.appendChild(document.createTextNode(rc.event.numEvents));
    344346
    345     if (rc.timeJs)
    346     {
    347         var err = document.getElementById("error");
     347    if (rc.ret)
     348    {
     349        while (con.lastChild)
     350            con.removeChild(con.lastChild);
     351    }
     352
     353    if (rc.err)
     354    {
    348355        while (err.lastChild)
    349356            err.removeChild(err.lastChild);
    350357
    351         $("#accordion").accordion("option", "active", false);
    352         $("#accordion").find('h3').filter(':contains(Runtime)').hide();
    353 
    354         var con = document.getElementById("console");
    355         while (con.lastChild)
    356             con.removeChild(con.lastChild);
    357     }
    358 
    359 
    360     if (rc.err)
    361     {
    362358        err.appendChild(document.createTextNode("Javascript runtime exception: "+rc.err.file+":"+rc.err.lineNumber));
    363359        err.appendChild(document.createTextNode("\n"));
     
    524520        dbg.removeChild(dbg.lastChild);
    525521
     522    var active = $("#accordion").accordion("option", "active");
     523    if (active==0)
     524    {
     525        $("#accordion").accordion("option", "active", false);
     526        $("#accordion").find('h3').filter(':contains(Runtime)').hide();
     527    }
     528
    526529    var event   = document.getElementById("event").value;
    527530    var pixel   = document.getElementById("pixel").value;
     
    531534    var uri = "file="+file+"&event="+event+"&pixel="+map[pixel];
    532535    uri += "&source1="+encodeURIComponent(source1);
    533     uri += "&source2="+encodeURIComponent(source2);
     536    if (!pixelOnly)
     537        uri += "&source2="+encodeURIComponent(source2);
    534538
    535539    $.ajax({
Note: See TracChangeset for help on using the changeset viewer.