-
Notifications
You must be signed in to change notification settings - Fork 37
/
vacation.js
28 lines (27 loc) · 1.11 KB
/
vacation.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
+-----------------------------------------------------------------------+
| Vacation Module for RoundCube |
| |
| Copyright (C) 2009 Boris HUISGEN <[email protected]> |
| Licensed under the GNU GPL |
+-----------------------------------------------------------------------+
*/
if (window.rcmail) {
rcmail.addEventListener('init', function(evt) {
var tab = $('<span>').attr('id', 'settingstabpluginvacation').addClass(
'tablink');
var button = $('<a>').attr('href',
rcmail.env.comm_path + '&_action=plugin.vacation').html(
rcmail.gettext('vacation', 'vacation')).appendTo(tab);
button.bind('click', function(e) {
return rcmail.command('plugin.vacation', this);
});
rcmail.add_element(tab, 'tabs');
rcmail.register_command('plugin.vacation', function() {
rcmail.goto_url('plugin.vacation')
}, true);
rcmail.register_command('plugin.vacation-save', function() {
rcmail.gui_objects.vacationform.submit();
}, true);
})
}