Skip to content

Commit bd4a294

Browse files
Merge branch 'cypht-filter-start-from-one' of https://github.com/camilevahviraki/cypht into cypht-filter-start-from-one
2 parents a918c00 + ed9adb5 commit bd4a294

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+628
-731
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ WORDPRESS_CLIENT_URI=
216216
RECAPTCHA_SECRET=
217217
RECAPTCHA_SITE_KEY=
218218

219-
CYPHT_MODULES="core,contacts,local_contacts,ldap_contacts,gmail_contacts,feeds,jmap,imap,smtp,account,idle_timer,desktop_notifications,calendar,themes,nux,developer,profiles,imap_folders,sievefilters,tags"
219+
CYPHT_MODULES="core,contacts,local_contacts,ldap_contacts,gmail_contacts,feeds,jmap,imap,smtp,account,idle_timer,desktop_notifications,calendar,themes,nux,developer,profiles,imap_folders,sievefilters,tags,history"
220220

221221
#LoginPage
222222
FANCY_LOGIN=false

modules/calendar/js_modules/route_handlers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function applyCalendarPageHandlers() {
2-
$('.event_delete').on("click", function() {
2+
$('.event_delete a').on("click", function() {
33
if (hm_delete_prompt()) {
4-
$(this).parent().submit();
4+
$(this).closest('form').submit();
55
}
66
});
77
$('.cal_title').on("click", function(e) {

modules/calendar/site.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44
.calendar_week td { width: 14%; height: 600px; text-align: left; padding: 10px; border-bottom: solid 1px #eee; vertical-align: top; border-right: solid 1px #eee; }
55
.event_details { cursor: pointer; z-index: 100; display: none; position: absolute; width: 300px; border: solid 1px #ddd; background-color: #fff; padding: 10px; }
66
.event_details td { padding: 5px; border: none; height: auto; }
7+
.event_detail {
8+
max-height: 35vh;
9+
overflow: auto;
10+
}

modules/contacts/site.css

Lines changed: 123 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,126 @@
200200

201201
.mobile .add_contact_row a {
202202
display: none;
203-
}
203+
}
204+
205+
/* Table css */
206+
.contact-group { margin: 0;padding: 0;border: 0;outline: none;font-size: 0;text-align: left;padding-top: 15px; }
207+
.contact-group>input { position: absolute;left: -9999px; }
208+
.contact-group>label { position: relative;display: inline-block;margin: 0;padding: 0;border: 0;outline: none;cursor: pointer;transition: all 0.1s;-o-transition: all 0.1s;-ms-transition: all 0.1s;-moz-transition: all 0.1s;-webkit-transition: all 0.1s; }
209+
.contact-group>label i { display: block;float: left;margin: 16px 8px 0 -2px;padding: 0;border: 0;outline: none;font-family: FontAwesome;font-style: normal;font-size: 17px; }
210+
.contact-group>input:checked+label { cursor: default; }
211+
.contact-group>ul { list-style: none;position: relative;display: block;overflow: hidden;margin: 0;padding: 0;border: 0;outline: none;font-size: 13px; }
212+
.contact-group>ul>li { position: absolute;width: 100%;overflow: auto;padding: 20px 0px;box-sizing: border-box;-moz-box-sizing: border-box;opacity: 0;transition: all 0.5s;-o-transition: all 0.5s;-ms-transition: all 0.5s;-moz-transition: all 0.5s;-webkit-transition: all 0.5s; }
213+
.contact-group>.tab-content-first:checked~ul .tab-content-first,
214+
.contact-group>.tab-content-2:checked~ul .tab-content-2,
215+
.contact-group>.tab-content-3:checked~ul .tab-content-3,
216+
.contact-group>.tab-content-4:checked~ul .tab-content-4,
217+
.contact-group>.tab-content-5:checked~ul .tab-content-5,
218+
.contact-group>.tab-content-6:checked~ul .tab-content-6,
219+
.contact-group>.tab-content-7:checked~ul .tab-content-7,
220+
.contact-group>.tab-content-8:checked~ul .tab-content-8,
221+
.contact-group>.tab-content-9:checked~ul .tab-content-9,
222+
.contact-group>.tab-content-last:checked~ul .tab-content-last { z-index: 1;top: 0;left: 0;opacity: 1;-webkit-transform: scale(1, 1);-webkit-transform: rotate(0deg); }
223+
224+
.contact-group-height-auto>ul { height: auto !important;}
225+
.contact-group-height-auto>ul>li { position: static;display: none;height: auto !important; }
226+
.contact-group-height-auto>.tab-content-first:checked~ul .tab-content-first,
227+
.contact-group-height-auto>.tab-content-2:checked~ul .tab-content-2,
228+
.contact-group-height-auto>.tab-content-3:checked~ul .tab-content-3,
229+
.contact-group-height-auto>.tab-content-4:checked~ul .tab-content-4,
230+
.contact-group-height-auto>.tab-content-5:checked~ul .tab-content-5,
231+
.contact-group-height-auto>.tab-content-last:checked~ul .tab-content-last { display: block; }
232+
.contact-group .grid-row { margin-top: 20px;}
233+
.contact-group .grid-row:after { content: '';display: table;clear: both; }
234+
.contact-group .grid-row:first-child { margin-top: 0;}
235+
.contact-group .grid-col { display: block;float: left;margin-left: 2%; }
236+
.contact-group .grid-col:first-child { margin-left: 0;}
237+
.contact-group .grid-col .inner { padding: 10px 0;border-radius: 5px;background: #BDCBE5;text-align: center; }
238+
.contact-group .grid-col-1 { width: 15%; }
239+
.contact-group .grid-col-2 { width: 32%; }
240+
.contact-group .grid-col-3 { width: 49%; }
241+
.contact-group .grid-col-4 { width: 66%; }
242+
.contact-group .grid-col-5 { width: 83%; }
243+
.contact-group .grid-col-offset-1 { margin-left: 19%; }
244+
.contact-group .grid-col-offset-1:first-child { margin-left: 17%; }
245+
.contact-group .grid-col-offset-2 { margin-left: 36%; }
246+
.contact-group .grid-col-offset-2:first-child { margin-left: 34%; }
247+
.contact-group .grid-col-offset-3 { margin-left: 53%; }
248+
249+
.contact-group .grid-col-offset-3:first-child { margin-left: 51%; }
250+
251+
.contact-group .grid-col-offset-4 { margin-left: 70%; }
252+
253+
.contact-group .grid-col-offset-4:first-child { margin-left: 68%; }
254+
.contact-group .grid-col-offset-5:first-child { margin-left: 85%; }
255+
256+
.contact-group .typography { color: #666; }
257+
.contact-group .typography h1,
258+
.contact-group .typography h2,
259+
.contact-group .typography h3,
260+
.contact-group .typography h4,
261+
.contact-group .typography h5,
262+
.contact-group .typography h6 { margin: 40px 0 0 0; padding: 0; text-align: left; color: #333; }
263+
.contact-group .typography h1 { font-size: 40px; line-height: 60px; text-shadow: 3px 3px rgba(0, 0, 0, 0.1); }
264+
.contact-group .typography h2 { font-size: 32px; line-height: 48px; text-shadow: 2px 2px rgba(0, 0, 0, 0.1); }
265+
.contact-group .typography h3 { font-size: 26px;line-height: 38px;text-shadow: 1px 1px rgba(0, 0, 0, 0.1); }
266+
.contact-group .typography h4 { font-size: 20px;line-height: 30px; }
267+
.contact-group .typography h5 { font-size: 15px;line-height: 23px;text-transform: uppercase; }
268+
.contact-group .typography h6 { font-size: 13px;line-height: 20px;font-weight: 700;text-transform: uppercase; }
269+
.contact-group .typography p { margin: 20px 0 0 0;padding: 0;line-height: 20px;text-align: left; }
270+
.contact-group .typography ul,
271+
.contact-group .typography ol { list-style: none; margin: 20px 0 0 0; padding: 0; }
272+
.contact-group .typography li { position: relative; margin-top: 5px; padding-left: 20px; }
273+
.contact-group .typography li ul,.contact-group .typography li ol { margin-top: 5px; }
274+
.contact-group .typography ul li:before {content: '';position: absolute;top: 8px;left: 0;width: 6px;height: 4px;background: #404040;}
275+
.contact-group .typography ol { counter-reset: list1; }
276+
.contact-group .typography ol>li:before { counter-increment: list1; content: counter(list1)'.'; position: absolute; top: 0; left: 0; }
277+
.contact-group .typography a { text-decoration: underline; color: #008080; }
278+
.contact-group .typography a:hover { text-decoration: none; }
279+
.contact-group .typography .pic { padding: 4px; border: 1px dotted #ccc; }
280+
.contact-group .typography .pic img { display: block; }
281+
.contact-group .typography .pic-right { float: right; margin: 0 0 10px 20px;}
282+
.contact-group .typography .link {text-decoration: underline;color: #008080;cursor: pointer;}
283+
.contact-group .typography .link:hover {text-decoration: none;}
284+
.contact-group .typography h1:first-child,.contact-group .typography h2:first-child,.contact-group .typography h3:first-child,.contact-group .typography h4:first-child,.contact-group .typography h5:first-child,.contact-group .typography h6:first-child,.contact-group .typography p:first-child { margin-top: 0; }
285+
.contact-group .typography .text-center { text-align: center; }
286+
.contact-group .typography .text-right { text-align: right; }
287+
.contact-group-steps>label { cursor: default; }
288+
289+
.contact-group-effect-scale>ul>li { -webkit-transform: scale(0.1, 0.1); }
290+
.contact-group-effect-rotate>ul>li { -webkit-transform: rotate(180deg); }
291+
.contact-group-effect-slide-top>ul>li { top: -40px; }
292+
.contact-group-effect-slide-right>ul>li { left: 80px; }
293+
.contact-group-effect-slide-bottom>ul>li { top: 40px; }
294+
.contact-group-effect-slide-left>ul>li { left: -80px; }
295+
296+
.contact-group-layout-top-right { text-align: right; }
297+
.contact-group-layout-top-center { text-align: center; }
298+
.contact-group>.right { float: right; }
299+
300+
@media screen and (max-width: 980px) {}
301+
302+
@media screen and (max-width: 767px) {
303+
.contact-group>label { display: block; }
304+
.contact-group>.right { float: none; }
305+
}
306+
307+
.contact-group>label { padding: 0 20px; background: #e5e5e5; font-size: 13px; line-height: 49px; }
308+
.contact-group>label:hover { background: #f2f2f2; }
309+
.contact-group>input:checked+label { background: #f2f2f2; }
310+
.contact-group>ul { background: #fff;text-align: left; }
311+
.contact-group-steps>label:hover { background: #e5e5e5; }
312+
313+
.contact-group-theme-1>label { margin: 0 5px 5px 0;border-radius: 5px;background: #fff;box-shadow: 0 2px rgba(0, 0, 0, 0.2);color: #808080;opacity: 0.8; }
314+
.contact-group-theme-1>label:hover { opacity: 1; }
315+
.contact-group-theme-1>input:checked+label { margin-bottom: 0; padding-bottom: 5px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; color: 008080; opacity: 1; }
316+
.contact-group-theme-1>ul { border-radius: 5px; }
317+
.contact-group-theme-1>.tab-content-first:checked~ul { border-top-left-radius: 0; }
318+
@media screen and (max-width: 767px) {
319+
.contact-group-theme-1>label { margin-right: 0 }
320+
.contact-group-theme-1>input:checked+label { margin-bottom: 5px; padding-bottom: 0; border-radius: 5px }
321+
.contact-group-theme-1>.tab-content-first:checked~ul { border-top-left-radius: 5px; }
322+
}
323+
324+
.contact-group>ul,
325+
.contact-group>ul>li {height: 100vh;}

modules/core/functions.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ function save_user_settings($handler, $form, $logout) {
383383
Hm_Msgs::add('Could not save settings: ' . $e->getMessage(), 'warning');
384384
}
385385
}
386-
386+
387387
}}
388388

389389
/**
@@ -486,6 +486,9 @@ function get_tls_stream_type() {
486486
$method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT;
487487
$method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT;
488488
}
489+
if (defined('STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT')) {
490+
$method |= STREAM_CRYPTO_METHOD_TLSv1_3_CLIENT;
491+
}
489492
return $method;
490493
}}
491494

@@ -550,7 +553,7 @@ function in_server_list($list, $id, $user) {
550553
/**
551554
* Perform a check on last added server
552555
* It gets deleted if already configured
553-
*
556+
*
554557
* @param string $list class to process on check
555558
* @param string $user username to check for
556559
* @return bool
@@ -777,3 +780,8 @@ function getSettingsSectionOutput($section, $sectionLabel, $sectionIcon, $settin
777780
return $res;
778781
}
779782

783+
function isPageConfigured($page) {
784+
$pages = array_keys(Hm_Handler_Modules::dump());
785+
return in_array($page, $pages);
786+
}
787+

modules/core/handler_modules.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,11 @@ public function process() {
11791179
$this->out('imap_service_name', $provider);
11801180
}
11811181
$this->out('just_saved_credentials', true);
1182-
Hm_Msgs::add("Server saved. To preserve these settings after logout, please go to <a class='alert-link' href='/?page=save'>Save Settings</a>.");
1182+
if (isPageConfigured('save')) {
1183+
Hm_Msgs::add("Server saved. To preserve these settings after logout, please go to <a class='alert-link' href='/?page=save'>Save Settings</a>.");
1184+
} else {
1185+
Hm_Msgs::add("Server saved.");
1186+
}
11831187
}
11841188

11851189
if ($createProfile && $this->smtp_server_id && ($this->imap_server_id || $this->jmap_server_id)) {

modules/core/hm-mailbox.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -559,25 +559,25 @@ public function set_search_charset($charset) {
559559
}
560560
}
561561

562-
public function search($folder, $target='ALL', $terms=array(), $sort=null, $reverse=null, $exclude_deleted=true, $exclude_auto_bcc=true, $only_auto_bcc=false) {
562+
public function search($folder, $target='ALL', $terms=array(), $sort=null, $reverse=null, $exclude_deleted=true, $only_auto_bcc=false) {
563563
if (! $this->select_folder($folder)) {
564564
return [];
565565
}
566566
if ($this->is_imap()) {
567567
if ($sort) {
568568
if ($this->connection->is_supported('SORT')) {
569569
// use fast sort extension and search simultanously
570-
$uids = $this->connection->get_message_sort_order($sort, $reverse, $target, $terms, $exclude_deleted, $exclude_auto_bcc, $only_auto_bcc);
570+
$uids = $this->connection->get_message_sort_order($sort, $reverse, $target, $terms, $exclude_deleted, $only_auto_bcc);
571571
} else {
572572
// search first and then sort only the found ones by fetch
573-
$uids = $this->connection->search($target, false, $terms, [], $exclude_deleted, $exclude_auto_bcc, $only_auto_bcc);
573+
$uids = $this->connection->search($target, false, $terms, [], $exclude_deleted, $only_auto_bcc);
574574
if ($uids) {
575575
$uids = $this->connection->sort_by_fetch($sort, $reverse, $target, implode(',', $uids));
576576
}
577577
}
578578
} else {
579579
// just search with default sort order
580-
$uids = $this->connection->search($target, false, $terms, [], $exclude_deleted, $exclude_auto_bcc, $only_auto_bcc);
580+
$uids = $this->connection->search($target, false, $terms, [], $exclude_deleted, $only_auto_bcc);
581581
}
582582
return $uids;
583583
} else {
@@ -587,12 +587,12 @@ public function search($folder, $target='ALL', $terms=array(), $sort=null, $reve
587587
}
588588
}
589589

590-
public function get_message_list($folder, $msg_ids) {
590+
public function get_message_list($folder, $msg_ids, $exclude_auto_bcc = true) {
591591
if (! $this->select_folder($folder)) {
592592
return [];
593593
}
594594
if ($this->is_imap()) {
595-
return $this->connection->get_message_list($msg_ids);
595+
return $this->connection->get_message_list($msg_ids, exclude_auto_bcc: $exclude_auto_bcc);
596596
} else {
597597
return $this->connection->get_message_list($msg_ids);
598598
}

modules/core/js_modules/Hm_MessagesStore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ class Hm_MessagesStore {
312312
} else {
313313
if (this.path == 'tag') {
314314
config.push({ name: "hm_ajax_hook", value: 'ajax_imap_tag_data' });
315-
config.push({ name: "folder", value: getParam('tag_id') });
315+
config.push({ name: "folder", value: getParam('filter') });
316316
configs.push(config);
317317
} else {
318318
let sources = hm_data_sources();

modules/core/navigation/navigation.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ window.addEventListener('popstate', function(event) {
3030
});
3131

3232
window.addEventListener('load', function() {
33+
if (!hm_is_logged()) {
34+
return;
35+
}
36+
3337
const unMountCallback = renderPage(window.location.href);
3438
history.replaceState({ main: $('#cypht-main').prop('outerHTML'), scripts: extractCustomScripts($(document)) }, "");
3539

modules/core/navigation/routes.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ const modulesRoutes = [
8181
{
8282
page: 'shortcuts',
8383
handler: 'applyShortcutsPageHandlers'
84+
},
85+
{
86+
page: 'tags',
87+
handler: 'applyTagsPageHandlers'
8488
}
8589
]
8690

0 commit comments

Comments
 (0)