98,7 → 98,7 |
function startTask() { |
|
var r = document.getElementById('results'); |
if ( r.style.display == 'none' ) switchTask(); |
//if ( r.style.display == 'none' ) switchTask(); |
r.innerHTML = ''; |
var btnstart = document.getElementById('btnstart'); |
btnstart.value= "Stop Analysis"; |
131,6 → 131,30 |
startTask(); |
} |
} |
|
function toProcess() { |
window.location.hash='#btnstart'; |
//window.location.hash='#blocklyDiv'; |
} |
|
function showDebug() { |
var btnstart = document.getElementById('btndebug'); |
var div = document.getElementById('results'); |
|
if (btnstart.value=== "Show Text"){ |
btnstart.value = "Hide Text"; |
div.style.display = 'block'; |
} else { |
btnstart.value = "Show Text"; |
div.style.display = 'none'; |
} |
} |
|
function showLicense() { |
window.location.href="license.html"; |
} |
|
|
function EventListener(e) { |
//addLog(JSON.stringify(e) ); |
|
137,7 → 161,7 |
var result = JSON.parse( e.data ); |
|
if(e.lastEventId == 'CLOSE') { |
addLog('Received CLOSE closing'); |
//addLog('Received CLOSE closing'); |
stopTask(); |
// es.close(); |
|
157,9 → 181,9 |
var sframe = jsonobj.fName; |
|
|
addLog('Histogram :'+ sframe ); |
var r = document.getElementById('results'); |
//var r = document.getElementById('drawing'); |
//addLog('Histogram :'+ sframe ); |
//var r = document.getElementById('results'); |
var r = document.getElementById('drawing'); |
if (document.getElementById(sframe) == null ){ |
r.insertAdjacentHTML('beforeend', '<div id="' + sframe +'" style="width:1000px; height:600px"></div><br/>'); |
r.insertAdjacentHTML('beforeend', '<div id="fit' + sframe +'" style="display: none"></div><br/>'); |
175,7 → 199,8 |
mform += '</form>'; |
fit.insertAdjacentHTML('beforeend', '<div id="param' + sframe +'"></div><br/>'); |
fit.insertAdjacentHTML('beforeend', mform); |
r.insertAdjacentHTML('beforeend','<input type="button" onclick="togglevisibility(\'fit'+sframe+'\');" class="mybutton" value="Show/Hide Fit Panel" /><hr/>' ); |
r.insertAdjacentHTML('beforeend','<input type="button" onclick="togglevisibility(\'fit'+sframe+'\');" class="mybutton" value="Show/Hide Fit Panel" />' ); |
r.insertAdjacentHTML('beforeend',' <input type="button" onclick="toProcess();" class="mybutton" value="To Process" /><hr/>' ); |
document.getElementById('data'+ sframe).value=result.message; |
//r.insertAdjacentHTML('beforeend', JSON.stringify(result.message)); |
} |
199,7 → 224,7 |
|
function stopTask() { |
es.close(); |
addLog('Task end'); |
//addLog('Task end'); |
var btnstart = document.getElementById('btnstart'); |
|
btnstart.value= "Run Analysis"; |
332,9 → 357,11 |
<!-- <input type="button" onclick="showCode();" class="mybutton" value="Show JavaScript" /> --> |
<input type="button" id="btnstart" onclick="startAction();" class="mybutton" value="Run Analysis" /> |
|
<!-- <input type="button" onclick="switchTask();" class="mybutton" value="Switch between Diagram and Results" /> --> |
<input type="button" onclick="saveBlockly();" class="mybutton" value="Save Diagram" /> |
<form style="display:inline;"><label for="file-input" class="mybutton" style="">Load Diagram</label> |
<input type="button" id="btndebug" onclick="showDebug();" class="mybutton" value="Hide Text" /> |
<input type="button" id="btnhelp" onclick="window.location.href='BelleIILabManual.pdf';" class="mybutton" value="Help" /> |
<input type="button" id="btnabout" onclick="showLicense();" class="mybutton" value="About" /> |
<input type="file" style="visibility:hidden;" id="file-input" onClick="this.form.reset()" data-buttonText="Load Diagram"/></form> |
<br/> |
<progress id='progressor' value="0" max='100' style="width:95%"></progress> |
343,9 → 370,9 |
|
<br /> |
|
<div id="blocklyDiv" style="height:500px; width:95%"></div><br /> |
<div id="results" style="border:1px solid #000; padding:10px; width:95%; height:80% ; overflow:auto; background:#eee;"></div> |
<br /> |
<div id="blocklyDiv" style="height:900px; width:95%"></div><br /> |
|
<script> |
|