diff --git a/codespeed/static/css/main.css b/codespeed/static/css/main.css index da86b438..4750b78c 100644 --- a/codespeed/static/css/main.css +++ b/codespeed/static/css/main.css @@ -484,6 +484,22 @@ p.note { background-image: url(../images/note.png); } +div.plotpng a { + background-color: #F1F1F1; + background-repeat: no-repeat; + background-position: 3px; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + border-radius: 10px; + -moz-box-shadow: 3px 3px 3px #888; + -webkit-box-shadow: 3px 3px 3px #888; + box-shadow: 3px 3px 3px #888; + float: right; + margin-top: 20px; + padding: 1em; + text-decoration: underline; +} + div.footer{ color: white; font-size: small; diff --git a/codespeed/static/css/timeline.css b/codespeed/static/css/timeline.css index 937a177e..e4c189a9 100644 --- a/codespeed/static/css/timeline.css +++ b/codespeed/static/css/timeline.css @@ -1,3 +1,6 @@ select#baseline { width: 100%; } +div#plotdescription { + margin-right: 55px; +} diff --git a/codespeed/static/js/comparison.js b/codespeed/static/js/comparison.js index b05d77e6..028204a9 100644 --- a/codespeed/static/js/comparison.js +++ b/codespeed/static/js/comparison.js @@ -54,9 +54,19 @@ function refreshContent() { if (benchmarks.length === 0) { continue; } var plotid = "plot" + plotcounter; - $("#plotwrapper").append('
'); + var pngid = "pnglink" + plotcounter; + $("#plotwrapper").append(''); plotcounter++; renderComparisonPlot(plotid, benchmarks, exes, enviros, conf.bas, conf.chart, conf.hor); + $("#" + pngid).data("plot", plotid); + $("#" + pngid).click(function() { + var string = $("#" + $(this).data("plot")).jqplotToImageStr(); + var iframe = "" + var x = window.open(); + x.document.open(); + x.document.write(iframe); + x.document.close(); + }); } }); } diff --git a/codespeed/static/js/timeline.js b/codespeed/static/js/timeline.js index 51731fcf..9653968a 100644 --- a/codespeed/static/js/timeline.js +++ b/codespeed/static/js/timeline.js @@ -165,7 +165,16 @@ function renderPlot(data) { digits++; } } - $("#plotgrid").html(''); + $("#plotgrid").html(''); + + $("#pnglink").click(function() { + var string = $("#plot").jqplotToImageStr(); + var iframe = "" + var x = window.open(); + x.document.open(); + x.document.write(iframe); + x.document.close(); + }); if (data.benchmark_description) { $("#plotdescription").html('' + data.benchmark + ': ' + data.benchmark_description + '
');