mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
Button for the 'share with yunopaste' thing
This commit is contained in:
parent
426b9df9b1
commit
b84d948611
2 changed files with 10 additions and 2 deletions
|
@ -64,6 +64,14 @@
|
||||||
// Render and display the view
|
// Render and display the view
|
||||||
c.view('diagnosis/diagnosis_show', data, function() {
|
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
|
// Configure 'rerun diagnosis' button behavior
|
||||||
$("button[data-action='rerun-diagnosis']").click(function() {
|
$("button[data-action='rerun-diagnosis']").click(function() {
|
||||||
var category = $(this).data("category");
|
var category = $(this).data("category");
|
||||||
|
|
|
@ -4,9 +4,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="actions-group">
|
<div class="actions-group">
|
||||||
<a href="javascript:void(null);" onclick="c.api('/diagnosis/show?share', function(data) { $('div.loader').remove(); window.open(data.url, '_blank'); });" class="btn btn-success">
|
<button class="btn btn-success" data-action="share">
|
||||||
<span class="fa-cloud-upload"></span> {{t 'logs_share_with_yunopaste'}}
|
<span class="fa-cloud-upload"></span> {{t 'logs_share_with_yunopaste'}}
|
||||||
</a>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="separator"></div>
|
<div class="separator"></div>
|
||||||
|
|
Loading…
Reference in a new issue