diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-03-14 13:36:43 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-04-03 18:00:25 +0200 |
commit | 390eacc2afbd51960562ae0245f26ba6208298ff (patch) | |
tree | 5e1c7eb18666652c06c2a7f6c30645ecf189defa /plugins/managesieve/managesieve.js | |
parent | 2f43fe94cb02edcb124ce30f29d165ea09478a18 (diff) |
Added optional separate interface for out-of-office management (#1488266)
Diffstat (limited to 'plugins/managesieve/managesieve.js')
-rw-r--r-- | plugins/managesieve/managesieve.js | 18 |
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) |