File tree 3 files changed +13
-2
lines changed 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -409,8 +409,12 @@ tbody.commits tr td.date {
409
409
overflow : auto;
410
410
}
411
411
412
- a # permalink { float : right; font-size : small; }
413
- a # permalink : hover { text-decoration : underline; }
412
+ a # permalink , a # pnglink {
413
+ float : right;
414
+ font-size : small;
415
+ margin-left : 0.5em ;
416
+ }
417
+ a # permalink : hover , a # pnglink : hover { text-decoration : underline; }
414
418
415
419
/* Plot styles */
416
420
div # plot { text-align : left; height : 500px ; width : 100% ; }
Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ function renderPlot(data) {
102
102
seriesindex = [ ] ;
103
103
var hiddenSeries = 0 ;
104
104
var median = data [ 'data_type' ] === 'M' ;
105
+ $ ( "#pnglink" ) . css ( "display" , "inline" ) ;
105
106
for ( var branch in data . branches ) {
106
107
// NOTE: Currently, only the "default" branch is shown in the timeline
107
108
for ( var exe_id in data . branches [ branch ] ) {
@@ -281,6 +282,7 @@ function render(data) {
281
282
$ ( "#revisions" ) . attr ( "disabled" , false ) ;
282
283
$ ( "#equidistant" ) . attr ( "disabled" , false ) ;
283
284
$ ( "span.options.median" ) . css ( "display" , "none" ) ;
285
+ $ ( "#pnglink" ) . css ( "display" , "none" ) ;
284
286
$ ( "#plotgrid" ) . html ( "" ) ;
285
287
if ( data . error !== "None" ) {
286
288
var h = $ ( "#content" ) . height ( ) ; //get height for error message
@@ -421,6 +423,10 @@ function init(def) {
421
423
$ ( "#permalink" ) . click ( function ( ) {
422
424
window . location = "?" + $ . param ( getConfiguration ( ) ) ;
423
425
} ) ;
426
+
427
+ $ ( "#pnglink" ) . click ( function ( ) {
428
+ window . location = $ ( "#plot" ) . jqplotToImageStr ( ) ;
429
+ } ) ;
424
430
}
425
431
426
432
return {
Original file line number Diff line number Diff line change 96
96
</ span >
97
97
{% endif %}
98
98
< a id ="permalink " href ="# "> Permalink</ a >
99
+ < a id ="pnglink " href ="# " style ="display: none "> PNG</ a >
99
100
</ div >
100
101
< div id ="content " class ="clearfix ">
101
102
< div id ="plotgrid "> </ div >
You can’t perform that action at this time.
0 commit comments