prepared the gui to remove messages

This commit is contained in:
SJ
2015-07-07 14:12:35 +02:00
parent 1b9e2e639d
commit 2b6e12d89a
22 changed files with 115 additions and 2 deletions

View File

@ -340,6 +340,27 @@ var Piler =
},
bulk_remove_messages:function(msg)
{
Piler.log("[bulk_remove_messages]");
Piler.poor_mans_keepalive_for_dummy_browsers();
var idlist = Piler.get_selected_messages_list();
if(!idlist) return;
jQuery.ajax('/bulkremove.php', {
data: { idlist: idlist },
type: "POST"
})
.done( function( a ) {})
.fail(function( a, b ) { alert("Problem retrieving XML data:" + b) });
Piler.show_message('messagebox1', msg, 0.8);
},
bulk_restore_messages:function(msg, email)
{
Piler.log("[bulk_restore_messages]", email);

View File

@ -72,7 +72,7 @@
<div class="controls row-fluid">
<div id="input-span" class="span6">
<label for="_search"><?php print $text_search; ?></label>
<input type="text" id="_search" name="_search" placeholder="<?php print $text_enter_search_terms; ?>" />
<input type="text" id="_search" name="_search" placeholder="<?php print $text_enter_search_terms; ?>" <?php if(ENABLE_DELETE == 1) { ?>style="background: #faafbe;"<?php } ?> />
</div>
<div class="span6 input-append btn-group">
<button id="button_search" class="btn btn-large btn-danger" onclick="Piler.expert(this); return false;"><i class="icon-search icon-large"></i>&nbsp;<?php print $text_search; ?></button>

View File

@ -57,6 +57,10 @@
<p><a href="<?php print $auth_url; ?>"><?php print $text_login_via_google; ?></a></p>
<?php } ?>
<?php if(ENABLE_DELETE == 1) { ?>
<p><?php print $text_compliance_warning; ?></p>
<?php } ?>
<p><?php print COMPATIBILITY; ?></p>
</div>

View File

@ -0,0 +1 @@
<p><?php print $text_removed; ?>: <?php print $removed; ?></p>

View File

@ -132,9 +132,12 @@
<?php if($page < $total_pages) { ?><a href="#" class="navlink" onclick="Piler.navigation(<?php print $total_pages; ?>);"><i class="icon-double-angle-right icon-large"></i></a><?php } else { ?> <span class="navlink"><i class="icon-double-angle-right icon-large muted"></i></span><?php } ?>
&nbsp;
<i class="icon-exclamation-sign" title="<?php print $text_compliance_warning; ?>"></i>
<?php } else { print $text_none_found; } ?>
</div>
</div>
<div id="functionrow" class="span8">
<input type="hidden" id="tag_keys" name="tag_keys" value="<?php print $all_ids; ?>" />
<input type="hidden" id="_ref" name="_ref" value="<?php if(isset($_ref)) { print $_ref; } ?>" />
@ -150,6 +153,7 @@
<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>
<?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>
<?php if(ENABLE_DELETE == 1 && isAuditorUser() == 1) { ?><a href="#" class="btn btn-custom btn-inverse" onclick="Piler.bulk_remove_messages('<?php print $text_successfully_removed; ?>');" title="<?php print $text_remove; ?>"><i class="icon-remove-sign"></i></a><?php } ?>
<input type="text" id="tag_value" name="tag_value" class="tagtext" />
<a href="#" class="btn btn-custom btn-inverse" onclick="Piler.tag_search_results('<?php print $text_tagged; ?>');" title="<?php print $text_tag_selected_messages; ?>"><i class="icon-tags" title="Tag"></i></a>
</div>

View File

@ -71,7 +71,7 @@
<input type="hidden" name="ref" id="ref" value="" />
<input type="hidden" name="prefix" id="prefix" value="" />
<input type="text" id="_search" name="_search" class="input-medium span6" value="" placeholder="<?php print $text_enter_search_terms; ?>" />
<input type="text" id="_search" name="_search" class="input-medium span6" value="" placeholder="<?php print $text_enter_search_terms; ?>" <?php if(ENABLE_DELETE == 1) { ?>style="background: #faafbe;"<?php } ?> />
<?php if(OUTLOOK == 0) { ?>
<a id="advsearch_caret" href="#" onclick="$('#searchpopup1').show();"><b class="caret"></b></a>

View File

@ -60,6 +60,10 @@
<p><a href="<?php print $auth_url; ?>"><?php print $text_login_via_google; ?></a></p>
<?php } ?>
<?php if(ENABLE_DELETE == 1) { ?>
<p><?php print $text_compliance_warning; ?></p>
<?php } ?>
<p><?php print COMPATIBILITY; ?></p>
</div>

View File

@ -0,0 +1 @@
<p><?php print $text_removed; ?>: <?php print $removed; ?></p>

View File

@ -115,6 +115,8 @@
<button class="btn piler-right-margin<?php if(Registry::get('auditor_user') == 1) { ?> confirm-delete"><?php } else { ?>" onclick="Piler.bulk_restore_messages('<?php print $text_restored; ?>', ''); return false;"><?php } ?><?php print $text_bulk_restore_selected_emails; ?></button>
<?php } ?>
<?php if(ENABLE_DELETE == 1 && isAuditorUser() == 1) { ?><a href="#" class="btn btn-custom btn-inverse" onclick="Piler.bulk_remove_messages('<?php print $text_successfully_removed; ?>');" title="<?php print $text_remove; ?>"><i class="icon-remove-sign"></i></a><?php } ?>
<input type="text" id="tag_value" name="tag_value" class="input-xlarge" placeholder="<?php print $text_tag_selected_messages; ?>" />
<button class="btn" onclick="Piler.tag_search_results('<?php print $text_tagged; ?>'); return false;" >OK</button>
</form>