Mercurial > templog
comparison web/views/top.tpl @ 250:141948a400a6
working zoom
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 27 May 2015 23:45:03 +0800 |
parents | c490de0cf17e |
children | 6c14e0573f50 |
comparison
equal
deleted
inserted
replaced
249:c490de0cf17e | 250:141948a400a6 |
---|---|
24 <title></title> | 24 <title></title> |
25 </head> | 25 </head> |
26 <script type="text/javascript"> | 26 <script type="text/javascript"> |
27 function updatewidth() { | 27 function updatewidth() { |
28 var width_input = document.getElementById("scaledwidth"); | 28 var width_input = document.getElementById("scaledwidth"); |
29 width_input.value = document.getElementById("mainimage").clientWidth; | 29 var main_image = document.getElementById("mainimage"); |
30 width_input.value = main_image.clientWidth; | |
31 return true; | |
30 } | 32 } |
31 | 33 |
32 </script> | 34 </script> |
33 <body> | 35 <body> |
34 <form action="" method="get"> | 36 <form action="" method="get" onsubmit="return updatewidth();"> |
35 <span class="no_selection"><input type="image" id="mainimage" src="{{graphdata}}" onclick="updatewidth();"/></span> | 37 <span class="no_selection"><input type="image" id="mainimage" src="{{graphdata}}"/></span> |
36 <input type="hidden" name="length" value="{{length}}"/> | 38 <input type="hidden" name="length" value="{{length}}"/> |
37 <input type="hidden" name="end" value="{{end}}"/> | 39 <input type="hidden" name="end" value="{{end}}"/> |
38 <input type="hidden" name="zoom" value="yeah"/> | 40 <input type="hidden" name="zoom" value="yeah"/> |
39 <input type="hidden" name="scaledwidth" id="scaledwidth" value="-1"/> | 41 <input type="hidden" name="scaledwidth" id="scaledwidth" value="{{graphwidth}}"/> |
40 </form> | 42 </form> |
41 <span class="codelink">Click to zoom in, click the left axis to zoom out. <a href="https://secure.ucc.asn.au/hg/templog/file/tip">Source code</a> for the Raspberry Pi controller and this web interface</a>. <a href="set">Adjustments</a> by phone.</span> | 43 <span class="codelink">Click to zoom in, click the left axis to zoom out. <a href="https://secure.ucc.asn.au/hg/templog/file/tip">Source code</a> for the Raspberry Pi controller and this web interface</a>. <a href="set">Adjustments</a> by phone.</span> |
42 </body> | 44 </body> |
43 </html> | 45 </html> |