Disable save as image and download graph buttons.

This commit is contained in:
Darold Gilles 2012-12-06 23:46:50 +01:00
parent d079962fcf
commit b4efbc6697
1 changed files with 13 additions and 10 deletions

View File

@ -3004,10 +3004,10 @@ sub flotr2_bargraph
<script type="text/javascript"> <script type="text/javascript">
(function mouse_zoom(container) { (function mouse_zoom(container) {
document.writeln('<table align="center"><tr><td><input type="button" class="dldButton" value="To Image" id="toimage$buttonid" onclick="return false;">'+ //document.writeln('<table align="center"><tr><td><input type="button" class="dldButton" value="To Image" id="toimage$buttonid" onclick="return false;">'+
'<input type="button" class="dldButton" value="Download" id="download$buttonid" onclick="return false;">' + // '<input type="button" class="dldButton" value="Download" id="download$buttonid" onclick="return false;">' +
'<input type="button" class="dldButton" value="Reset" id="reset$buttonid" onclick="return false;"></td></tr><tr><td>&nbsp;</td></tr></table>' // '<input type="button" class="dldButton" value="Reset" id="reset$buttonid" onclick="return false;"></td></tr><tr><td>&nbsp;</td></tr></table>'
); // );
$data1 $data1
$data2 $data2
$data3 $data3
@ -3098,6 +3098,8 @@ document.writeln('<table align="center"><tr><td><input type="button" class="dldB
Flotr.EventAdapter.observe(container, "flotr:click", function() { Flotr.EventAdapter.observe(container, "flotr:click", function() {
drawGraph(); drawGraph();
}); });
/*
document.getElementById('reset$buttonid').onclick = function() { document.getElementById('reset$buttonid').onclick = function() {
graph.download.restoreCanvas(); graph.download.restoreCanvas();
}; };
@ -3119,7 +3121,7 @@ document.writeln('<table align="center"><tr><td><input type="button" class="dldB
} }
graph.download.saveImage('$self->{ImgFormat}', null, null, true); graph.download.saveImage('$self->{ImgFormat}', null, null, true);
}; };
*/
})(document.getElementById("$divid")); })(document.getElementById("$divid"));
</script> </script>
EOF EOF
@ -3145,10 +3147,10 @@ sub flotr2_piegraph
(function basic_pie(container) { (function basic_pie(container) {
document.writeln('<input type="button" class="dldButton" value="To Image" id="toimage$buttonid" onclick="return false;">'+ //document.writeln('<input type="button" class="dldButton" value="To Image" id="toimage$buttonid" onclick="return false;">'+
'<input type="button" class="dldButton" value="Download" id="download$buttonid" onclick="return false;">' + // '<input type="button" class="dldButton" value="Download" id="download$buttonid" onclick="return false;">' +
'<input type="button" class="dldButton" value="Reset" id="reset$buttonid" onclick="return false;">' // '<input type="button" class="dldButton" value="Reset" id="reset$buttonid" onclick="return false;">'
); // );
@datadef @datadef
var graph = Flotr.draw(container, [ var graph = Flotr.draw(container, [
@ -3182,6 +3184,7 @@ document.writeln('<input type="button" class="dldButton" value="To Image" id="to
backgroundColor: "#D2E8FF" backgroundColor: "#D2E8FF"
} }
}); });
/*
document.getElementById('reset$buttonid').onclick = function() { document.getElementById('reset$buttonid').onclick = function() {
graph.download.restoreCanvas(); graph.download.restoreCanvas();
}; };
@ -3203,7 +3206,7 @@ document.writeln('<input type="button" class="dldButton" value="To Image" id="to
} }
graph.download.saveImage('$self->{ImgFormat}', null, null, true); graph.download.saveImage('$self->{ImgFormat}', null, null, true);
}; };
i*/
})(document.getElementById("$divid")); })(document.getElementById("$divid"));
</script> </script>