Mobile fixes

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2020-03-15 11:10:24 +01:00
parent ae7e6cfc1d
commit 51a3ee72d7
19 changed files with 548 additions and 472 deletions

View File

@ -178,7 +178,7 @@ $config['BULK_DOWNLOAD_FOR_USERS'] = 1;
$config['MAX_DOWNLOAD_PER_HOUR'] = 0; $config['MAX_DOWNLOAD_PER_HOUR'] = 0;
$config['MAX_RESTORE_PER_HOUR'] = 0; $config['MAX_RESTORE_PER_HOUR'] = 0;
$config['MAX_CGI_FROM_SUBJ_LEN'] = 34; $config['MAX_CGI_FROM_SUBJ_LEN'] = 48;
$config['PAGE_LEN'] = 20; $config['PAGE_LEN'] = 20;
$config['MAX_NUMBER_OF_FROM_ITEMS'] = 5; $config['MAX_NUMBER_OF_FROM_ITEMS'] = 5;
$config['MAX_SEARCH_HITS'] = 1000; $config['MAX_SEARCH_HITS'] = 1000;

View File

@ -4,23 +4,18 @@ class ControllerCommonLayoutSearch extends Controller {
protected function index() { protected function index() {
$this->data['title'] = $this->document->title; $this->data['title'] = $this->document->title;
if(MOBILE_DEVICE) {
$this->template = "common/layout-search-mobile.tpl";
} else {
$this->template = "common/layout-search.tpl"; $this->template = "common/layout-search.tpl";
}
$this->data['search_args'] = ''; $this->data['search_args'] = '';
$this->data['open_saved_search_box'] = 0; $this->data['open_saved_search_box'] = 0;
/*if(isset($_SERVER['REQUEST_URI'])) {
$this->data['search_args'] = preg_replace("/\/([\w]+)\.php\?{0,1}/", "", $_SERVER['REQUEST_URI']);
if(preg_match("/\&a\=1/", $this->data['search_args'])) { $this->data['open_saved_search_box'] = 1; }
}*/
$this->children = array( $this->children = array(
"common/menu", "common/menu",
"search/folder", "search/folder",
@ -34,6 +29,3 @@ class ControllerCommonLayoutSearch extends Controller {
} }
?>

View File

@ -6,7 +6,11 @@ class ControllerMessageHeaders extends Controller {
public function index(){ public function index(){
$this->id = "content"; $this->id = "content";
if(MOBILE_DEVICE) {
$this->template = "message/headers-mobile.tpl";
} else {
$this->template = "message/headers.tpl"; $this->template = "message/headers.tpl";
}
$this->layout = "common/layout-empty"; $this->layout = "common/layout-empty";
$request = Registry::get('request'); $request = Registry::get('request');

View File

@ -6,7 +6,11 @@ class ControllerMessageView extends Controller {
public function index(){ public function index(){
$this->id = "content"; $this->id = "content";
if(MOBILE_DEVICE) {
$this->template = "message/view-mobile.tpl";
} else {
$this->template = "message/view.tpl"; $this->template = "message/view.tpl";
}
$this->layout = "common/layout-empty"; $this->layout = "common/layout-empty";
$session = Registry::get('session'); $session = Registry::get('session');

View File

@ -23,7 +23,12 @@ class ControllerSearchHelper extends Controller {
public function index(){ public function index(){
$this->id = "content"; $this->id = "content";
if(MOBILE_DEVICE) {
$this->template = "search/helper-mobile.tpl";
} else {
$this->template = "search/helper.tpl"; $this->template = "search/helper.tpl";
}
$this->layout = "common/layout-empty"; $this->layout = "common/layout-empty";

View File

@ -489,3 +489,5 @@ $_['text_reject'] = "Reject";
$_['text_user_data_officer'] = "Data officer"; $_['text_user_data_officer'] = "Data officer";
$_['text_no_selected_message'] = "no selected message"; $_['text_no_selected_message'] = "no selected message";
$_['text_create_note'] = "Create note";

View File

@ -496,3 +496,5 @@ $_['text_reject'] = "Reject";
$_['text_user_data_officer'] = "Data officer"; $_['text_user_data_officer'] = "Data officer";
$_['text_no_selected_message'] = "no selected message"; $_['text_no_selected_message'] = "no selected message";
$_['text_create_note'] = "Create note";

View File

@ -61,6 +61,7 @@ $_['text_counters'] = "Counters";
$_['text_cpu_load'] = "CPU load"; $_['text_cpu_load'] = "CPU load";
$_['text_cpu_usage'] = "CPU usage"; $_['text_cpu_usage'] = "CPU usage";
$_['text_create_new_secret'] = "Create new secret"; $_['text_create_new_secret'] = "Create new secret";
$_['text_create_note'] = "Create note";
$_['text_cumulative_counts'] = "Cumulative counts"; $_['text_cumulative_counts'] = "Cumulative counts";
$_['text_customers'] = "Customers"; $_['text_customers'] = "Customers";

View File

@ -494,3 +494,5 @@ $_['text_reject'] = "Reject";
$_['text_user_data_officer'] = "Data officer"; $_['text_user_data_officer'] = "Data officer";
$_['text_no_selected_message'] = "no selected message"; $_['text_no_selected_message'] = "no selected message";
$_['text_create_note'] = "Create note";

View File

@ -491,3 +491,5 @@ $_['text_reject'] = "Reject";
$_['text_user_data_officer'] = "Data officer"; $_['text_user_data_officer'] = "Data officer";
$_['text_no_selected_message'] = "no selected message"; $_['text_no_selected_message'] = "no selected message";
$_['text_create_note'] = "Create note";

View File

@ -61,6 +61,7 @@ $_['text_counters'] = "Számlálók";
$_['text_cpu_load'] = "CPU terhelés"; $_['text_cpu_load'] = "CPU terhelés";
$_['text_cpu_usage'] = "CPU használat"; $_['text_cpu_usage'] = "CPU használat";
$_['text_create_new_secret'] = "Új kód"; $_['text_create_new_secret'] = "Új kód";
$_['text_create_note'] = "Megjegyzés";
$_['text_cumulative_counts'] = "Összesített számlálók"; $_['text_cumulative_counts'] = "Összesített számlálók";
$_['text_customers'] = "Ügyfelek"; $_['text_customers'] = "Ügyfelek";

View File

@ -491,3 +491,4 @@ $_['text_reject'] = "Reject";
$_['text_user_data_officer'] = "Data officer"; $_['text_user_data_officer'] = "Data officer";
$_['text_no_selected_message'] = "no selected message"; $_['text_no_selected_message'] = "no selected message";
$_['text_create_note'] = "Create note";

View File

@ -484,3 +484,4 @@ $_['text_reason_of_rejection'] = "Reason of rejection";
$_['text_user_data_officer'] = "Data officer"; $_['text_user_data_officer'] = "Data officer";
$_['text_no_selected_message'] = "no selected message"; $_['text_no_selected_message'] = "no selected message";
$_['text_create_note'] = "Create note";

View File

@ -492,3 +492,4 @@ $_['text_reject'] = "Reject";
$_['text_user_data_officer'] = "Data officer"; $_['text_user_data_officer'] = "Data officer";
$_['text_no_selected_message'] = "no selected message"; $_['text_no_selected_message'] = "no selected message";
$_['text_create_note'] = "Create note";

View File

@ -492,3 +492,4 @@ $_['text_reject'] = "Reject";
$_['text_user_data_officer'] = "Data officer"; $_['text_user_data_officer'] = "Data officer";
$_['text_no_selected_message'] = "no selected message"; $_['text_no_selected_message'] = "no selected message";
$_['text_create_note'] = "Create note";

View File

@ -1,3 +1,4 @@
#messagebox1{position:absolute;top:150px;z-index:2;width:300px;margin-left:-150px;left:50%;display:none;text-align:center;}
#mainscreen{position:absolute;top:40px;right:15px;bottom:20px;left:15px;min-width:320px;z-index:0;} #mainscreen{position:absolute;top:40px;right:15px;bottom:20px;left:15px;min-width:320px;z-index:0;}
#mailleftcontainer{position:absolute;top:0;left:0;bottom:0;width:195px;} #mailleftcontainer{position:absolute;top:0;left:0;bottom:0;width:195px;}
#mailrightcontent{position:absolute;top:0px;left:0;right:0;bottom:0;} #mailrightcontent{position:absolute;top:0px;left:0;right:0;bottom:0;}
@ -9,3 +10,7 @@
#pagingrow{height:33px;overflow:hidden;} #pagingrow{height:33px;overflow:hidden;}
#pagingbox{background-color:#eeeeee;border-right:1px solid #ccc;padding:4px;height:25px;overflow:hidden;min-width:180px;} #pagingbox{background-color:#eeeeee;border-right:1px solid #ccc;padding:4px;height:25px;overflow:hidden;min-width:180px;}
#notesbox{display:none;} #notesbox{display:none;}
.success{color:green;}
.danger{color:red;}
.message_highlight{background:lightblue;}
#restorebox{display:none;}

View File

@ -40,6 +40,8 @@
</div> </div>
</div> </div>
<div id="messagebox1" class="alert alert-info lead"></div>
<div id="piler1" class="container-fluid"> <div id="piler1" class="container-fluid">
<input type="hidden" name="searchtype" id="searchtype" value="expert" /> <input type="hidden" name="searchtype" id="searchtype" value="expert" />
<input type="hidden" name="sort" id="sort" value="date" /> <input type="hidden" name="sort" id="sort" value="date" />
@ -48,8 +50,8 @@
<input type="hidden" name="prefix" id="prefix" value="" /> <input type="hidden" name="prefix" id="prefix" value="" />
<div class="row"> <div class="row">
<div class="col-xs-8"><input type="text" id="_search" name="_search" class="form-control" placeholder="Search" /></div> <div class="col-xs-10"><input type="text" id="_search" name="_search" class="form-control" placeholder="Search" /></div>
<div class="col-xs-4"><button id="button_search" class="btn btn-default btn-danger" onclick="Piler.expert(this); return false;"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button></div> <div class="col-xs-2"><button id="button_search" class="btn btn-default btn-danger" onclick="Piler.expert(this); return false;"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button></div>
</div> </div>
</div> </div>

View File

@ -0,0 +1,45 @@
<div id="restorebox" class="alert alert-general">
<?php if(Registry::get('auditor_user') == 1 && count($rcpt) > 0) { ?>
<?php foreach($rcpt as $r) { ?>
<input type="checkbox" class="restorebox" id="rcpt_<?php print $r; ?>" name="rcpt_<?php print $r; ?>" value="1" /> <?php print $r; ?><br />
<?php } ?>
<br />
<input type="button" id="restore_button" name="restore_button" value="<?php print $text_restore; ?>" class="btn btn-primary" onclick="Piler.restore_message_for_recipients(<?php print $id; ?>, '<?php print $text_restored; ?>', '<?php print $text_select_recipients; ?>');" />
<input type="button" value="<?php print $text_cancel; ?>" class="btn btn-inverse" onclick="$('#restorebox').hide();" />
<?php } ?>
</div>
<div class="messageheader">
<p>
<?php if($can_download == 1) { ?>
<a class="messagelink" href="index.php?route=message/download&amp;id=<?php print $id; ?>"><i class="glyphicon glyphicon-cloud-download"></i>&nbsp;<?php print $text_download_message; ?></a> |
<?php } ?>
<?php if(SMARTHOST || ENABLE_IMAP_AUTH == 1) { if(Registry::get('auditor_user') == 1) { ?>
<a class="messagelink" href="#" onclick="$('#restorebox').show();"><i class="glyphicon glyphicon-refresh"></i>&nbsp;<?php print $text_restore_to_mailbox; ?></a> |
<?php } else if($can_restore == 1) { ?>
<a class="messagelink" href="#" onclick="Piler.restore_message(<?php print $id; ?>);"><i class="glyphicon glyphicon-refresh"></i>&nbsp;<?php print $text_restore_to_mailbox; ?></a> |
<?php } } ?>
<a class="messagelink" href="#" onclick="Piler.view_message(<?php print $id; ?>);"><i class="glyphicon glyphicon-envelope"></i>&nbsp;<?php print $text_view_message; ?></a>
<?php if(ENABLE_PDF_DOWNLOAD) { ?>
| <a class="messagelink" href="index.php?route=message/pdf&amp;id=<?php print $id; ?>"><img src="/view/theme/default/assets/images/fileicons/pdf.png" />&nbsp;PDF</a>
<?php } ?>
<?php if($message['has_journal'] == 1 && Registry::get('auditor_user') == 1 && SHOW_ENVELOPE_JOURNAL == 1) { ?>
| <a class="messagelink" href="#" onclick="Piler.view_journal(<?php print $id; ?>);"><i class="glyphicon glyphicon-envelope"></i>&nbsp;<?php print $text_view_journal_envelope; ?></a>
<?php } ?>
| <a href="#" onclick="($('#notesbox').is(':hidden'))?$('#notesbox').show():$('#notesbox').hide();"><i class="glyphicon glyphicon-file"></i>&nbsp;<?php print $text_create_note; ?></a>
</p>
</div>
<div id="notesbox" class="input-prepend input-append" style="display:none;">
<span class="add-on"><i class="icon-file-alt icon-large"></i>&nbsp;<?php print $text_notes; ?>:</span>
<input type="text" size="60" id="note" name="note" class="mynote" value="<?php print preg_replace("/\"/", "&quot;", $message['note']); ?>" />
<input type="button" class="btn btn-info" value="<?php print $text_save; ?>" class="message_button" onclick="Piler.add_note_to_message(<?php print $id; ?>, '<?php print $text_saved; ?>');" />
</div>
<pre class="messagesmtpheaders"><?php print $message['headers']; ?></pre>

View File

@ -1,4 +1,4 @@
<div id="restorebox" class="alert alert-general" style="display:none;"> <div id="restorebox" class="alert alert-general">
<?php if(Registry::get('auditor_user') == 1 && count($rcpt) > 0) { ?> <?php if(Registry::get('auditor_user') == 1 && count($rcpt) > 0) { ?>
<?php foreach($rcpt as $r) { ?> <?php foreach($rcpt as $r) { ?>
<input type="checkbox" class="restorebox" id="rcpt_<?php print $r; ?>" name="rcpt_<?php print $r; ?>" value="1" /> <?php print $r; ?><br /> <input type="checkbox" class="restorebox" id="rcpt_<?php print $r; ?>" name="rcpt_<?php print $r; ?>" value="1" /> <?php print $r; ?><br />
@ -14,32 +14,37 @@
<p> <p>
<?php if($can_download == 1) { ?> <?php if($can_download == 1) { ?>
<a class="messagelink" href="index.php?route=message/download&amp;id=<?php print $id; ?>"><i class="icon-cloud-download"></i>&nbsp;<?php print $text_download_message; ?></a> | <a class="messagelink" href="index.php?route=message/download&amp;id=<?php print $id; ?>"><i class="glyphicon glyphicon-cloud-download"></i>&nbsp;<?php print $text_download_message; ?></a> |
<?php } ?> <?php } ?>
<?php if(SMARTHOST || ENABLE_IMAP_AUTH == 1) { if(Registry::get('auditor_user') == 1) { ?> <?php if(SMARTHOST || ENABLE_IMAP_AUTH == 1) { if(Registry::get('auditor_user') == 1) { ?>
<a class="messagelink" href="#" onclick="$('#restorebox').show();"><i class="icon-reply"></i>&nbsp;<?php print $text_restore_to_mailbox; ?></a> | <a class="messagelink" href="#" onclick="$('#restorebox').show();"><i class="glyphicon glyphicon-refresh"></i>&nbsp;<?php print $text_restore_to_mailbox; ?></a> |
<?php } else if($can_restore == 1) { ?> <?php } else if($can_restore == 1) { ?>
<a class="messagelink" href="#" onclick="Piler.restore_message(<?php print $id; ?>);"><i class="icon-reply"></i>&nbsp;<?php print $text_restore_to_mailbox; ?></a> | <a class="messagelink" href="#" onclick="Piler.restore_message(<?php print $id; ?>);"><i class="glyphicon glyphicon-refresh"></i>&nbsp;<?php print $text_restore_to_mailbox; ?></a> |
<?php } } ?> <?php } } ?>
<a class="messagelink" href="#" onclick="Piler.view_headers(<?php print $id; ?>);"><i class="icon-envelope-alt"></i>&nbsp;<?php print $text_view_headers; ?></a> <a class="messagelink" href="#" onclick="Piler.view_headers(<?php print $id; ?>);"><i class="glyphicon glyphicon-envelope"></i>&nbsp;<?php print $text_view_headers; ?></a>
<?php if(ENABLE_PDF_DOWNLOAD) { ?> <?php if(ENABLE_PDF_DOWNLOAD) { ?>
| <a class="messagelink" href="index.php?route=message/pdf&amp;id=<?php print $id; ?>"><img src="/view/theme/default/assets/images/fileicons/pdf.png" />&nbsp;<?php print "PDF"; ?></a> | <a class="messagelink" href="index.php?route=message/pdf&amp;id=<?php print $id; ?>"><img src="/view/theme/default/assets/images/fileicons/pdf.png" />&nbsp;PDF</a>
<?php } ?> <?php } ?>
<?php if($message['has_journal'] == 1 && Registry::get('auditor_user') == 1 && SHOW_ENVELOPE_JOURNAL == 1) { ?> <?php if($message['has_journal'] == 1 && Registry::get('auditor_user') == 1 && SHOW_ENVELOPE_JOURNAL == 1) { ?>
| <a class="messagelink" href="#" onclick="Piler.view_journal(<?php print $id; ?>);"><i class="icon-envelope-alt"></i>&nbsp;<?php print $text_view_journal_envelope; ?></a> | <a class="messagelink" href="#" onclick="Piler.view_journal(<?php print $id; ?>);"><i class="icon-envelope-alt"></i>&nbsp;<?php print $text_view_journal_envelope; ?></a>
<?php } ?> <?php } ?>
<?php if(Registry::get('auditor_user') == 1) { ?> <?php if(Registry::get('auditor_user') == 1) { ?>
| <a class="messagelink" href="#" onclick="Piler.mark_as_private(<?php print $id; ?>, <?php $message['private'] == 1 ? print "0" : print "1" ?>);"><i class="icon-bookmark<?php if($message['private'] == 0) { ?>-empty<?php } ?>"></i>&nbsp;<?php print "private"; ?></a> <?php if($message['private'] == 0) { ?>
| <a class="messagelink" href="#" onclick="Piler.mark_as_private(<?php print $id; ?>, 1);"><i class="glyphicon glyphicon-eye-open"></i>&nbsp;<?php print "Non-" . strtolower($text_private); ?></a>
<?php } else { ?>
| <a class="messagelink" href="#" onclick="Piler.mark_as_private(<?php print $id; ?>, 0);"><i class="glyphicon glyphicon-eye-close"></i>&nbsp;<?php print $text_private; ?></a>
<?php } ?>
<?php } ?> <?php } ?>
<?php if($spam == 1) { ?> <?php if($spam == 1) { ?>
| <a class="messagelink" href="#" onclick="Piler.not_spam(<?php print $id; ?>);"><i class="icon-exclamation-sign"></i>&nbsp;<?php print $text_not_spam; ?></a> | <a class="messagelink" href="#" onclick="Piler.not_spam(<?php print $id; ?>);"><i class="glyphicon glyphicon-exclamation-sign"></i>&nbsp;<?php print $text_not_spam; ?></a>
<?php } ?> <?php } ?>
| <a href="#" onclick="Piler.print_div('messageblock');"><i class="glyphicon glyphicon-print"></i>&nbsp;<?php print $text_print_message; ?></a> | <a href="#" onclick="Piler.print_div('messageblock');"><i class="glyphicon glyphicon-print"></i>&nbsp;<?php print $text_print_message; ?></a>
<?php if(ENABLE_ON_THE_FLY_VERIFICATION == 0) { <?php if(ENABLE_ON_THE_FLY_VERIFICATION == 0) { ?>
if ($message['verification'] == 1) { ?><?php print $text_verified_flag; ?> <i class="glyphicon glyphicon-ok-sign icon-large" title="<?php print $text_verified_flag; ?>"></i><?php } else { ?><?php print $text_unverified_flag; ?> <i class="glyphicon glyphicon-remove-sign icon-large" title="<?php print $text_unverified_flag; ?>"></i><?php } |
<?php if ($message['verification'] == 1) { ?><a><i class="glyphicon glyphicon-ok-sign success" title="<?php print $text_verified_flag; ?>"></i></a><?php } else { ?><a><i class="glyphicon glyphicon-remove-sign danger" title="<?php print $text_unverified_flag; ?>"></i></a><?php }
} ?> } ?>
| <a href="#" onclick="($('#notesbox').is(':hidden'))?$('#notesbox').show():$('#notesbox').hide();"><i class="glyphicon glyphicon-file"></i>&nbsp;<?php print $text_create_note; ?></a> | <a href="#" onclick="($('#notesbox').is(':hidden'))?$('#notesbox').show():$('#notesbox').hide();"><i class="glyphicon glyphicon-file"></i>&nbsp;<?php print $text_create_note; ?></a>