fixing delete feature

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2019-07-14 20:05:11 +02:00
parent d1da0c93e7
commit 0c830b1276
4 changed files with 4 additions and 5 deletions

View File

@ -469,7 +469,7 @@ define('ACTION_UNAUTHORIZED_DOWNLOAD_ATTACHMENT', 16);
define('ACTION_VIEW_JOURNAL', 17);
define('ACTION_NOT_SPAM', 18);
define('ACTION_MARK_AS_PRIVATE', 19);
define('ACTION_MARK_MESSAGE_FOR_REMOVAL, 20);
define('ACTION_MARK_MESSAGE_FOR_REMOVAL', 20);
$actions = array(
'unknown' => 1,

View File

@ -17,7 +17,6 @@ var Piler =
extra_folders: '',
bulkrestore_url: '/bulkrestore.php',
bulkpdf_url: '/bulkpdf.php',
text_successfully_removed: '<?php print $text_successfully_removed; ?>'
/*
* variables used at search listing
@ -365,7 +364,7 @@ var Piler =
$('#deletebox-modal').modal('show');
},
bulk_remove_messages:function(reason)
bulk_remove_messages:function(reason, text_successfully_removed)
{
Piler.log("[bulk_remove_messages]");

View File

@ -62,7 +62,7 @@
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal" aria-hidden="true"><?php print $text_close; ?></a>
<a href="#" onclick="var reason = $('#reason').val(); if(reason) { Piler.bulk_remove_messages(reason); }" class="btn btn-primary" data-dismiss="modal" aria-hidden="true">OK</a>
<a href="#" onclick="var reason = $('#reason').val(); if(reason) { Piler.bulk_remove_messages(reason, '<?php print $text_successfully_removed; ?>'); }" class="btn btn-primary" data-dismiss="modal" aria-hidden="true">OK</a>
</div>
</div>
<?php } ?>

View File

@ -149,7 +149,7 @@
<span class="add-on"><?php print $text_with_selected; ?>:&nbsp;</span>
<?php if(SMARTHOST || ENABLE_IMAP_AUTH == 1) { ?>
<a href="#" class="btn btn-custom btn-inverse<?php if(Registry::get('auditor_user') == 1) { ?> confirm-delete"><?php } else { ?>" onclick="Piler.bulk_restore_messages('<?php print $text_restored; ?>', '');" title="<?php print $text_bulk_restore_selected_emails; ?>"><?php } ?><i class="icon-share-alt"></i></a>
<a href="#" class="btn btn-custom btn-inverse<?php if(Registry::get('auditor_user') == 1) { ?> confirm-delete"<?php } else { ?>" onclick="Piler.bulk_restore_messages('<?php print $text_restored; ?>', '');" <?php } ?> title="<?php print $text_bulk_restore_selected_emails; ?>"><i class="icon-share-alt"></i></a>
<?php } ?>
<a href="#" class="btn btn-custom btn-inverse" onclick="Piler.download_messages();" title="<?php print $text_bulk_download; ?>"><i class="icon-download-alt"></i></a>
<!--a href="#" class="btn btn-custom btn-inverse" onclick="Piler.download_selected_as_pdf();" title="<?php print $text_download_selected_hits_as_pdf; ?>"><i class="icon-file"></i></a-->