summaryrefslogtreecommitdiff
path: root/plugins/managesieve/managesieve.js
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/managesieve/managesieve.js')
-rw-r--r--plugins/managesieve/managesieve.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/managesieve/managesieve.js b/plugins/managesieve/managesieve.js
index 6b36127d3..7fcd9d9c6 100644
--- a/plugins/managesieve/managesieve.js
+++ b/plugins/managesieve/managesieve.js
@@ -50,6 +50,18 @@ if (window.rcmail) {
$('textarea[data-type="list"]', rcmail.gui_objects.sieveform).each(function() {
smart_field_init(this);
});
+
+ // enable date pickers on date fields
+ if ($.datepicker && rcmail.env.date_format) {
+ $.datepicker.setDefaults({
+ dateFormat: rcmail.env.date_format,
+ changeMonth: true,
+ showOtherMonths: true,
+ selectOtherMonths: true,
+ onSelect: function(dateText) { $(this).focus().val(dateText) }
+ });
+ $('input.datepicker').datepicker();
+ }
}
else {
rcmail.enable_command('plugin.managesieve-add', 'plugin.managesieve-setadd', !rcmail.env.sieveconnerror);
@@ -443,6 +455,12 @@ rcube_webmail.prototype.managesieve_unfocus_filter = function(row)
// Form submition
rcube_webmail.prototype.managesieve_save = function()
{
+ if (this.env.action == 'plugin.managesieve-vacation') {
+ var data = $(this.gui_objects.sieveform).serialize();
+ this.http_post('plugin.managesieve-vacation', data, this.display_message(this.get_label('managesieve.vacation.saving'), 'loading'));
+ return;
+ }
+
if (parent.rcmail && parent.rcmail.filters_list && this.gui_objects.sieveform.name != 'filtersetform') {
var id = parent.rcmail.filters_list.get_single_selection();
if (id != null)