[Web] Fix wrong element release/download/delete in quarantine details

master
andryyy 2020-11-30 19:38:25 +01:00
parent 9670d0c4f1
commit 2d8d227bfa
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
2 changed files with 8 additions and 4 deletions

View File

@ -130,7 +130,7 @@ jQuery(function($){
$('body').on('click', '.show_qid_info', function (e) {
e.preventDefault();
var qitem = $(this).data('item');
var qitem = $(this).attr('data-item');
var qError = $("#qid_error");
$('#qidDetailModal').modal('show');
@ -146,6 +146,10 @@ jQuery(function($){
$(this).attr("data-item", qitem);
});
$("#quick_download_link").attr("onclick", "window.open('/inc/ajax/qitem_details.php?id=" + qitem + "&eml', '_blank')");
$("#quick_release_link").attr("onclick", "window.open('/inc/ajax/qitem_details.php?id=" + qitem + "&quick_release', '_blank')");
$("#quick_delete_link").attr("onclick", "window.open('/inc/ajax/qitem_details.php?id=" + qitem + "&quick_delete', '_blank')");
$('#qid_detail_subj').text(data.subject);
$('#qid_detail_hfrom').text(data.header_from);
$('#qid_detail_efrom').text(data.env_from);

View File

@ -64,10 +64,10 @@ if (!isset($_SESSION['mailcow_cc_role'])) {
<li role="separator" class="divider"></li>
<li><a data-action="edit_selected" data-id="qitems_single" data-item="" data-api-url='edit/qitem' data-api-attr='{"action":"learnspam"}' href="#"><?=$lang['quarantine']['learn_spam_delete'];?></a></li>
<li role="separator" class="divider"></li>
<li><a data-id="qitems_single" data-item="" onclick="window.open('/inc/ajax/qitem_details.php?id=' + $(this).data('item') + '&eml', '_blank')" href="#"><?=$lang['quarantine']['download_eml'];?></a></li>
<li><a data-id="qitems_single" data-item="" id="quick_download_link" href="#"><?=$lang['quarantine']['download_eml'];?></a></li>
<li role="separator" class="divider"></li>
<li><a data-id="qitems_single" data-item="" onclick="window.open('/inc/ajax/qitem_details.php?id=' + $(this).data('item') + '&quick_release', '_blank')" href="#"><?=$lang['quarantine']['quick_release_link'];?></a></li>
<li><a data-id="qitems_single" data-item="" onclick="window.open('/inc/ajax/qitem_details.php?id=' + $(this).data('item') + '&quick_delete', '_blank')" href="#"><?=$lang['quarantine']['quick_delete_link'];?></a></li>
<li><a data-id="qitems_single" data-item="" id="quick_release_link" href="#"><?=$lang['quarantine']['quick_release_link'];?></a></li>
<li><a data-id="qitems_single" data-item="" id="quick_delete_link" href="#"><?=$lang['quarantine']['quick_delete_link'];?></a></li>
<li role="separator" class="divider"></li>
<li><a data-action="delete_selected" data-id="qitems_single" data-item="" data-api-url='delete/qitem' href="#"><?=$lang['quarantine']['remove'];?></a></li>
</ul>