Changeset 17856
- Timestamp:
- 05/14/14 17:31:23 (11 years ago)
- Location:
- trunk/FACT++/www/viewer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/www/viewer/index.html
r17847 r17856 405 405 <div id="ctrlcontainer" class="ui-widget-content"> 406 406 <form id="controls" method="POST" style="margin-bottom:0"> 407 <input id="getgeometry" type="button" onclick="onGetGeometry();" value="Get geometry"></input> 407 408 <input id="getcamera" type="button" onclick="onGetCameras();" value="Get camera data"></input> 408 409 <input id="getwaveform" type="button" onclick="onGetWaveforms();" value="Get waveforms"></input> 409 410 <input id="data" name="data" type="hidden"></input> 411 <input id="name" name="name" type="hidden"></input> 410 412 </form> 411 413 </div> … … 618 620 disp=1.42*(1-width/length). 619 621 622 <H3>What are the additional controls</H3> 623 <i>Get geometry</i>: You will get a file with the pixel positions in arbitrary units. 624 The three columns are the pixel index, and the x and y coordinate 625 in degree.<br> 626 <i>Get camera data</i>: You will get a file with the data from the currently 627 displayed cameras. The columns are pixel index and value of the cameras 628 1, 2, 3 and 4.<br> 629 <i>Get waveforms</i>: You will get a file with the data from the currently 630 displayed waveforms. The columns are sample index and amplitude of the waveforms 631 1, 2, 3 and 4. 632 620 633 <H3>Why is loading the page so slow?</H3> 621 634 The total contents of the javascript libraries is about 1MB which -
trunk/FACT++/www/viewer/index.js
r17852 r17856 267 267 268 268 $('#controls > input[name=data]').val(JSON.stringify(arr)); 269 $('#controls > input[name=name]').val('cameras.txt'); 269 270 $('#controls').attr('action','index.php'); 270 271 $('#controls').submit(); … … 276 277 277 278 $('#controls > input[name=data]').val(JSON.stringify(arr)); 279 $('#controls > input[name=name]').val('waveforms.txt'); 280 $('#controls').attr('action','index.php'); 281 $('#controls').submit(); 282 } 283 284 function onGetGeometry() 285 { 286 var sqrt32 = Math.sqrt(3)/2; 287 288 var arr = [ new Array(1440), new Array(1440) ]; 289 290 for (var i=0; i<1440; i++) 291 { 292 arr[0][i] = coord[i][0]*0.1111; 293 arr[1][i] = coord[i][1]*0.1111*sqrt32; 294 } 295 296 $('#controls > input[name=data]').val(JSON.stringify(arr)); 297 $('#controls > input[name=name]').val('geometry.txt'); 278 298 $('#controls').attr('action','index.php'); 279 299 $('#controls').submit(); … … 793 813 return; 794 814 795 if (!f.type.match('text/plain') && !f.type.match('application/javascript') )796 { 797 alert("ERROR - Unknown file type .");815 if (!f.type.match('text/plain') && !f.type.match('application/javascript') && !f.type.match('application/x-javascript')) 816 { 817 alert("ERROR - Unknown file type: "+f.type); 798 818 return; 799 819 } -
trunk/FACT++/www/viewer/index.php
r17841 r17856 37 37 header('Content-Type: text/plain'); 38 38 header('Content-Transfer-Encoding: Text'); 39 header('Content-Disposition: attachment; filename=" data.txt"');39 header('Content-Disposition: attachment; filename="'.$_POST['name'].'"'); 40 40 41 41 $json = json_decode($_POST['data']);
Note:
See TracChangeset
for help on using the changeset viewer.