Skip to content

Commit 400cb6d

Browse files
authored
Merge pull request #1694 from pom2ter/search-tweaks
fix(frontend): css adjustments to search and actions buttons
2 parents 6c2fac1 + e680929 commit 400cb6d

File tree

5 files changed

+27
-33
lines changed

5 files changed

+27
-33
lines changed

modules/advanced_search/modules.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -261,14 +261,14 @@ protected function output() {
261261
$this->targets().
262262
$this->times().
263263
$this->other().
264-
'<div class="submit_section px-5"><input type="button" class="btn btn-primary" id="adv_search" value="'.$this->trans('Search').'" />'.
264+
'<div class="submit_section px-3 mb-3"><input type="button" class="btn btn-primary" id="adv_search" value="'.$this->trans('Search').'" />'.
265265
' <input class="btn btn-light border" type="button" class="adv_reset" value="'.$this->trans('Reset').'" />';
266266
}
267267

268268
protected function targets() {
269-
return '<div data-target=".targets_section" class="settings_subtitle cursor-pointer px-3 py-2 "><i class="bi bi-file-earmark-fill me-2"></i>'.$this->trans('Targets').
269+
return '<div data-target=".targets_section" class="settings_subtitle cursor-pointer px-3 py-2 mt-3"><i class="bi bi-file-earmark-fill me-2"></i>'.$this->trans('Targets').
270270
'<span class="target_count">'.sprintf($this->trans('targets: %d'), 0).'</span></div>'.
271-
'<div class="targets_section mx-5 py-4"><div class="col-lg-6 col-12" id="adv_target"><table class="adv_targets table table-borderless"><tr><th>'.
271+
'<div class="targets_section mx-5 py-1"><div class="col-lg-6 col-12" id="adv_target"><table class="adv_targets table table-borderless"><tr><th>'.
272272
'<input type="radio" value="TEXT" id="adv_msg" class="target_radio form-check-input" checked="checked" '.
273273
'name="target_type" /><label class="form-check-label ms-2" for="adv_msg">'.$this->trans('Entire message').'</label></th>'.
274274
'<th><input type="radio" class="target_radio form-check-input" value="BODY" name="target_type" id="adv_body" '.
@@ -286,7 +286,7 @@ protected function terms() {
286286
return '<div data-target=".terms_section" class="settings_subtitle cursor-pointer px-3 py-2 mt-3">'.
287287
'<i class="bi bi-search me-2"></i>'.$this->trans('Terms').
288288
'<span class="term_count">'.sprintf($this->trans('terms: %d'), 0).'</span></div>'.
289-
'<div class="terms_section mx-5 py-4">'.
289+
'<div class="terms_section mx-5 py-1">'.
290290
'<div class="d-flex align-items-center"><span id="adv_term_not" class="adv_term_nots"><input type="checkbox" class="form-check-input" value="not" id="adv_term_not" /> !</span>'.
291291
'<input class="adv_terms form-control w-auto" id="adv_term" type="text" /><i class="bi bi-plus-circle new_term cursor-pointer ms-3"></i></div></div>';
292292
}
@@ -296,25 +296,25 @@ protected function times() {
296296
$from_date = date("Y-m-d", $from_time);
297297
$to_time = strtotime("+1 day", time());
298298
$to_date = date("Y-m-d", $to_time);
299-
return '<div data-target=".time_section" class="settings_subtitle cursor-pointer px-3 py-2 "><i class="bi bi-calendar3-week-fill me-2"></i>'.$this->trans('Time').
299+
return '<div data-target=".time_section" class="settings_subtitle cursor-pointer px-3 py-2 mt-3"><i class="bi bi-calendar3-week-fill me-2"></i>'.$this->trans('Time').
300300
'<span class="time_count">'.sprintf($this->trans('time ranges: %d'), 0).'</span></div>'.
301-
'<div class="time_section mx-5 py-4"><span id="adv_time" class="adv_times d-flex align-items-center gap-2">'.$this->trans('From').
301+
'<div class="time_section mx-5 py-1"><span id="adv_time" class="adv_times d-flex align-items-center gap-2">'.$this->trans('From').
302302
' <input class="adv_time_fld_from form-control w-auto" type="date" value="'.$this->html_safe($from_date).
303303
'" /> '.$this->trans('To').' <input class="adv_time_fld_to form-control w-auto" type="date" value="'.
304304
$this->html_safe($to_date).'" /></span><i class="bi bi-plus-circle new_time cursor-pointer"></i></div>';
305305
}
306306

307307
protected function sources() {
308-
return '<div data-target=".source_section" class="settings_subtitle cursor-pointer px-3 py-2 "><i class="bi bi-folder-fill me-2"></i>'.$this->trans('Sources').
308+
return '<div data-target=".source_section" class="settings_subtitle cursor-pointer px-3 py-2 mt-3"><i class="bi bi-folder-fill me-2"></i>'.$this->trans('Sources').
309309
'<span class="source_count">'.sprintf($this->trans('sources: %d'), 0).'</span></div>'.
310-
'<div class="source_section mx-5 py-4">'.$this->trans('IMAP').' <i class="bi bi-plus-circle adv_folder_select cursor-pointer"></i><br /><div '.
310+
'<div class="source_section mx-5 py-1">'.$this->trans('IMAP').' <i class="bi bi-plus-circle adv_folder_select cursor-pointer"></i><br /><div '.
311311
'class="adv_folder_list"></div><div class="adv_source_list"></div></div>';
312312
}
313313

314314
protected function other() {
315-
return '<div data-target=".other_section" class="settings_subtitle cursor-pointer px-3 py-2 "><i class="bi bi-gear-fill me-2"></i>'.$this->trans('Other').
315+
return '<div data-target=".other_section" class="settings_subtitle cursor-pointer px-3 py-2 mt-3"><i class="bi bi-gear-fill me-2"></i>'.$this->trans('Other').
316316
'<span class="other_count">'.sprintf($this->trans('other settings: %d'), 0).'</span></div>'.
317-
'<div class="other_section mx-5 py-4"><div class="col-lg-6 col-12"><table class="table table-borderless"><tr><th>'.$this->trans('Character set').'</th><td><select class="charset form-select w-auto">'.
317+
'<div class="other_section mx-5 py-1 mb-3"><div class="col-lg-6 col-12"><table class="table table-borderless"><tr><th>'.$this->trans('Character set').'</th><td><select class="charset form-select w-auto">'.
318318
'<option value="">'.$this->trans('Default').'</option><option value="UTF-8">UTF-8</option>'.
319319
'<option value="ASCII">ASCII</option></select></td></tr><tr><th>'.$this->trans('Results per source').'</th>'.
320320
'<td><input type="number" value="100" class="adv_source_limit form-control" /></td></tr><tr><th>'.$this->trans('Flags').'</th><td>'.

modules/core/message_list_functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ function message_controls($output_mod) {
429429
$res = '<a class="toggle_link" href="#"><i class="bi bi-check-square-fill"></i></a>'.
430430
'<div class="msg_controls fs-6 d-none gap-1 align-items-center">'.
431431
'<div class="dropdown on_mobile">'.
432-
'<button type="button" class="btn btn-outline-success btn-sm dropdown-toggle" id="coreMsgControlDropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">Actions</button>'.
432+
'<button type="button" class="btn btn-outline-secondary btn-sm dropdown-toggle" id="coreMsgControlDropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">Actions</button>'.
433433
'<ul class="dropdown-menu" aria-labelledby="coreMsgControlDropdown">';
434434
foreach ($controls as $control) {
435435
$res .= '<li><a class="dropdown-item msg_'.$control.' core_msg_control btn btn-sm btn-light text-black-50" href="#" data-action="'.$control.'">'.$output_mod->trans(ucfirst($control)).'</a></li>';

modules/core/site.css

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,8 @@ div.unseen,
989989
max-height: 35rem;
990990
align-items: center;
991991
flex-wrap: wrap;
992-
gap: 2rem;
992+
}
993+
.mobile .content_title:not(.search_result_title) {
993994
border-top: none;
994995
}
995996
.mobile .list_meta,
@@ -1021,7 +1022,6 @@ div.unseen,
10211022
.mobile .msg_text {
10221023
white-space: nowrap !important;
10231024
width: 100%;
1024-
max-width: 768px !important;
10251025
word-break: break-all;
10261026
word-wrap: break-word;
10271027
font-size: 100%;
@@ -1030,12 +1030,10 @@ div.unseen,
10301030
.mobile .msg_controls {
10311031
z-index: 1000;
10321032
position: fixed;
1033-
right: 0px;
1034-
height: 54px;
1033+
height: 50px;
10351034
font-size: 115%;
10361035
padding-left: 5px;
1037-
padding-top: 5px;
1038-
top: 1px;
1036+
top: 0px;
10391037
left: 60px !important;
10401038
}
10411039
@media (orientation: landscape) {
@@ -1068,7 +1066,7 @@ div.unseen,
10681066
}
10691067
.mobile .msg_text_inner {
10701068
font-size: 120%;
1071-
padding: 5px !important;
1069+
padding: 10px !important;
10721070
}
10731071
.mobile .list_meta {
10741072
display: none;
@@ -1084,15 +1082,12 @@ div.unseen,
10841082
overflow: hidden;
10851083
text-overflow: ellipsis;
10861084
}
1087-
.mobile .search_form {
1088-
margin-top: 20px !important;
1089-
}
10901085
.mobile .search_form select,
10911086
.mobile .search_form button,
10921087
.mobile .search_form input {
10931088
margin-left: 0px !important;
10941089
margin: 0px;
1095-
margin-top: 5px;
1090+
margin-top: 2px;
10961091
}
10971092
.mobile .search_form > form {
10981093
flex-wrap: wrap;
@@ -1118,7 +1113,6 @@ div.unseen,
11181113
display: flex;
11191114
flex-direction: column;
11201115
justify-content: space-between;
1121-
height: 100vh;
11221116
}
11231117
.mobile .unsaved_reminder {
11241118
display: none;
@@ -1627,6 +1621,10 @@ pre.msg_source {
16271621
word-break: break-word;
16281622
}
16291623

1624+
.msg_text .col-md-2 {
1625+
font-weight: bold;
1626+
}
1627+
16301628
/* Mobile responsive overrides for Bootstrap classes */
16311629
@media (max-width: 768px) {
16321630
.small_header {
@@ -1642,12 +1640,6 @@ pre.msg_source {
16421640
flex-wrap: wrap;
16431641
}
16441642

1645-
.small_header .col-md-2 {
1646-
font-weight: bold;
1647-
white-space: nowrap;
1648-
width: fit-content !important;
1649-
}
1650-
16511643
.long_header .col-md-2 {
16521644
font-weight: bold;
16531645
}
@@ -1670,4 +1662,8 @@ pre.msg_source {
16701662
.mobile .message_list .list_controls.on_mobile {
16711663
position: absolute; top: 12px; right: 15px;
16721664
}
1665+
.mobile .small_header .col-md-2 {
1666+
font-weight: bold; white-space: nowrap; width: fit-content !important;
1667+
}
1668+
.mobile .small_header:nth-child(-n+3) { padding-bottom: 6px !important; }
16731669
}

modules/imap/output_modules.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -815,8 +815,8 @@ protected function output() {
815815
if ($this->get('move_copy_controls', false)) {
816816
$res = '<span class="ctr_divider"></span> <div class="d-flex align-items-start gap-1 dropdown"><a class="imap_move disabled_input btn btn-sm btn-secondary no_mobile" href="#" data-action="copy" data-bs-toggle="dropdown">'.$this->trans('Copy').'</a>';
817817
$res .= '<a class="imap_move disabled_input btn btn-sm btn-secondary no_mobile" data-bs-toggle="dropdown" href="#" data-action="move">'.$this->trans('Move').'</a>';
818-
$res .= '<a class="imap_move disabled_input btn btn-outline-success btn-sm on_mobile" href="#" data-action="copy">'.$this->trans('Copy').'</a>';
819-
$res .= '<a class="imap_move disabled_input btn btn-outline-success btn-sm on_mobile" href="#" data-action="move">'.$this->trans('Move').'</a>';
818+
$res .= '<a class="imap_move disabled_input text-decoration-none btn btn-outline-secondary btn-sm on_mobile" href="#" data-action="copy">'.$this->trans('Copy').'</a>';
819+
$res .= '<a class="imap_move disabled_input text-decoration-none btn btn-outline-secondary btn-sm on_mobile" href="#" data-action="move">'.$this->trans('Move').'</a>';
820820
$res .= '<div class="move_to_location dropdown-menu" data-bs-auto-close="outside"></div>';
821821
$res .= '<input type="hidden" class="move_to_type" value="" />';
822822
$res .= '<input type="hidden" class="move_to_string1" value="'.$this->trans('Move to ...').'" />';

modules/imap/site.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@
7575
.msg_text_inner {
7676
min-height: 300px;
7777
font-family: monospace;
78-
width: 90%;
7978
padding: 30px;
80-
padding-left: 40px;
8179
}
8280

8381
.mobile .msg_text_inner {

0 commit comments

Comments
 (0)