-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENH]add Cypht-delay-send-later-scheduled-sending
- Loading branch information
1 parent
87e4eb9
commit 693fca3
Showing
10 changed files
with
230 additions
and
507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
function handleNexterDateAction(e) { | ||
let reload_and_redirect = function () { | ||
Hm_Folders.reload_folders(true); | ||
let path = hm_list_parent() ? hm_list_parent() : hm_list_path(); | ||
window.location.replace('?page=message_list&list_path=' + path); | ||
}; | ||
|
||
setupNexterDate(function () { | ||
let ids = []; | ||
$('input[type=checkbox]').each(function () { | ||
if (this.checked && this.id.search('imap') !== -1) { | ||
let parts = this.id.split('_'); | ||
ids.push(parts[1] + '_' + parts[2] + '_' + parts[3]); | ||
} | ||
}); | ||
|
||
if (ids.length === 0) { | ||
return; | ||
} | ||
|
||
if ($(this).parent().parent().is('.snooze_dropdown')) { | ||
Hm_Ajax.request( | ||
[ | ||
{ 'name': 'hm_ajax_hook', 'value': 'ajax_imap_snooze' }, | ||
{ 'name': 'imap_snooze_ids', 'value': ids }, | ||
{ 'name': 'imap_snooze_until', 'value': $(this).val() } | ||
], | ||
function (res) { | ||
if (res.snoozed_messages > 0) { | ||
reload_and_redirect(); | ||
} | ||
} | ||
); | ||
} | ||
if ($(this).parent().parent().is('.schedule_dropdown')) { | ||
Hm_Ajax.request( | ||
[ | ||
{ 'name': 'hm_ajax_hook', 'value': 'ajax_re_schedule_message_sending' }, | ||
{ 'name': 'scheduled_msg_ids', 'value': ids }, | ||
{ 'name': 'schedule_date', 'value': $(this).val() } | ||
], | ||
function (res) { | ||
if (res.scheduled_msg_count > 0) { | ||
reload_and_redirect(); | ||
} | ||
} | ||
); | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.