diff --git a/src/js/yunohost/controllers/diagnosis.js b/src/js/yunohost/controllers/diagnosis.js index d08cf03f..807e2cb9 100644 --- a/src/js/yunohost/controllers/diagnosis.js +++ b/src/js/yunohost/controllers/diagnosis.js @@ -64,6 +64,14 @@ // Render and display the view c.view('diagnosis/diagnosis_show', data, function() { + // Configure share with yunopaste button + $("button[data-action='share']").click(function() { + c.api('GET', '/diagnosis/show?share', {}, function(data) { + c.hideLoader(); + window.open(data.url, '_blank'); + }); + }); + // Configure 'rerun diagnosis' button behavior $("button[data-action='rerun-diagnosis']").click(function() { var category = $(this).data("category"); diff --git a/src/views/diagnosis/diagnosis_show.ms b/src/views/diagnosis/diagnosis_show.ms index f48ea67e..4a904b48 100644 --- a/src/views/diagnosis/diagnosis_show.ms +++ b/src/views/diagnosis/diagnosis_show.ms @@ -4,9 +4,9 @@
- +