File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 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 {
409409 overflow : auto;
410410}
411411
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; }
414418
415419/* Plot styles */
416420div # 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) {
102102 seriesindex = [ ] ;
103103 var hiddenSeries = 0 ;
104104 var median = data [ 'data_type' ] === 'M' ;
105+ $ ( "#pnglink" ) . css ( "display" , "inline" ) ;
105106 for ( var branch in data . branches ) {
106107 // NOTE: Currently, only the "default" branch is shown in the timeline
107108 for ( var exe_id in data . branches [ branch ] ) {
@@ -281,6 +282,7 @@ function render(data) {
281282 $ ( "#revisions" ) . attr ( "disabled" , false ) ;
282283 $ ( "#equidistant" ) . attr ( "disabled" , false ) ;
283284 $ ( "span.options.median" ) . css ( "display" , "none" ) ;
285+ $ ( "#pnglink" ) . css ( "display" , "none" ) ;
284286 $ ( "#plotgrid" ) . html ( "" ) ;
285287 if ( data . error !== "None" ) {
286288 var h = $ ( "#content" ) . height ( ) ; //get height for error message
@@ -421,6 +423,10 @@ function init(def) {
421423 $ ( "#permalink" ) . click ( function ( ) {
422424 window . location = "?" + $ . param ( getConfiguration ( ) ) ;
423425 } ) ;
426+
427+ $ ( "#pnglink" ) . click ( function ( ) {
428+ window . location = $ ( "#plot" ) . jqplotToImageStr ( ) ;
429+ } ) ;
424430}
425431
426432return {
Original file line number Diff line number Diff line change 9696 </ span >
9797 {% endif %}
9898 < a id ="permalink " href ="# "> Permalink</ a >
99+ < a id ="pnglink " href ="# " style ="display: none "> PNG</ a >
99100</ div >
100101< div id ="content " class ="clearfix ">
101102< div id ="plotgrid "> </ div >
You can’t perform that action at this time.
0 commit comments