Lines 2443-2470
Link Here
|
2443 |
if( $("#preview-sql-modal").length > 0) { |
2443 |
if( $("#preview-sql-modal").length > 0) { |
2444 |
$("#preview-sql-modal").remove(); |
2444 |
$("#preview-sql-modal").remove(); |
2445 |
} |
2445 |
} |
2446 |
$("body").append('<div id="preview-sql-modal" tabindex="-1" role="dialog" aria-hidden="true" class="modal">\ |
2446 |
$("body").append("<div id=\"preview-sql-modal\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\" class=\"modal\">\ |
2447 |
<div class="modal-dialog">\ |
2447 |
<div class=\"modal-dialog\">\ |
2448 |
<div class="modal-content">\ |
2448 |
<div class=\"modal-content\">\ |
2449 |
<div class="modal-header" style="min-height:40px;">\ |
2449 |
<div class=\"modal-header\" style=\"min-height:40px;\">\ |
2450 |
<button type="button" class="closebtn" data-dismiss="modal" aria-label="Close">\ |
2450 |
<button type=\"button\" class=\"closebtn\" data-dismiss=\"modal\" aria-label=\"Close\">\ |
2451 |
<span aria-hidden="true">×</span>\ |
2451 |
<span aria-hidden=\"true\">×</span>\ |
2452 |
</button>\ |
2452 |
</button>\ |
2453 |
<h4 class="modal-title">' + title + '</h4>\ |
2453 |
<h4 class=\"modal-title\">" + title + "</h4>\ |
2454 |
</div>\ |
2454 |
</div>\ |
2455 |
<div class="modal-body"><textarea id="code' + reportid + '">' + message + '</textarea>\ |
2455 |
<div class=\"modal-body\"><textarea id=\"code" + reportid + "\">" + message + "</textarea>\ |
2456 |
</div>\ |
2456 |
</div>\ |
2457 |
<div class="modal-footer">\ |
2457 |
<div class=\"modal-footer\">\ |
2458 |
<a id="preview-modal-editreport" class="btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?id=' + reportid + '&op=edit_form"><i class="fa-solid fa-pencil" aria-hidden="true"></i> ' + _("Edit") + '</a>\ |
2458 |
<a id=\"preview-modal-editreport\" class=\"btn btn-default\" href=\"/cgi-bin/koha/reports/guided_reports.pl?id=" + reportid + "&op=edit_form\"><i class=\"fa-solid fa-pencil\" aria-hidden=\"true\"></i> " + _("Edit") + "</a>\ |
2459 |
<a id="preview-modal-duplicate" class="btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?op=duplicate&id=' + reportid + '"><i class="fa fa-copy"></i> ' + _("Duplicate") + '</a>\ |
2459 |
<a id=\"preview-modal-duplicate\" class=\"btn btn-default\" href=\"/cgi-bin/koha/reports/guided_reports.pl?op=duplicate&id=" + reportid + "\"><i class=\"fa fa-copy\"></i> " + _("Duplicate") + "</a>\ |
2460 |
<a id="preview-modal-duplicate" class="btn btn-default" href="/cgi-bin/koha/tools/scheduler.pl?id=' + reportid + '"><i class="fa-solid fa-clock"></i> ' + _("Schedule") + '</a>\ |
2460 |
<a id=\"preview-modal-duplicate\" class=\"btn btn-default\" href=\"/cgi-bin/koha/tools/scheduler.pl?id=" + reportid + "\"><i class=\"fa-solid fa-clock\"></i> " + _("Schedule") + "</a>\ |
2461 |
<a class="btn btn-default submit-form-link" href="#" data-id="' + reportid + '" data-action="guided_reports.pl" data-method="post" data-op="cud-delete" data-confirmation-msg="' + _('Are you sure you want to delete this report?') + '"><i class="fa fa-trash-can"></i> Delete</a>\ |
2461 |
<a class=\"btn btn-default submit-form-link\" href=\"#\" data-id=\"" + reportid + "\" data-action=\"guided_reports.pl\" data-method=\"post\" data-op=\"cud-delete\" data-confirmation-msg=\"" + _("Are you sure you want to delete this report?") + "\"><i class=\"fa fa-trash-can\"></i> Delete</a>\ |
2462 |
<a id="preview-modal-runreport" class="btn btn-default" href="/cgi-bin/koha/reports/guided_reports.pl?id=' + reportid + '&op=run"><i class="fa fa-play"></i> ' + _("Run report") + '</a>\ |
2462 |
<a id=\"preview-modal-runreport\" class=\"btn btn-default\" href=\"/cgi-bin/koha/reports/guided_reports.pl?id=" + reportid + "&op=run\"><i class=\"fa fa-play\"></i> " + _("Run report") + "</a>\ |
2463 |
<a href="#" id="preview-sql-modal-cancel" data-dismiss="modal" class="btn btn-default"><i class="fa fa-times" aria-hidden="true"></i> ' + _("Close") + '</a>\ |
2463 |
<a href=\"#\" id=\"preview-sql-modal-cancel\" data-dismiss=\"modal\" class=\"btn btn-default\"><i class=\"fa fa-times\" aria-hidden=\"true\"></i> " + _("Close") + "</a>\ |
2464 |
</div>\ |
2464 |
</div>\ |
2465 |
</div>\ |
2465 |
</div>\ |
2466 |
</div>\ |
2466 |
</div>\ |
2467 |
</div>'); |
2467 |
</div>"); |
2468 |
|
2468 |
|
2469 |
$("#preview-sql-modal").modal('show'); |
2469 |
$("#preview-sql-modal").modal('show'); |
2470 |
CodeMirror.fromTextArea( document.getElementById("code" + reportid ), { |
2470 |
CodeMirror.fromTextArea( document.getElementById("code" + reportid ), { |
2471 |
- |
|
|