diff options
author | Aleksander Machniak <alec@alec.pl> | 2014-03-14 13:36:43 +0100 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2014-03-14 13:36:43 +0100 |
commit | 50a57e9b755e80885c7a608924e6e860b28be541 (patch) | |
tree | ddc3ee86be643c58103263b45bad56b6b3b60b09 /plugins/managesieve/managesieve.js | |
parent | 5ce23011850e095476a6b35abaf45bcd4d42c062 (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) |