| | |
| | | |
| | | if (this.gui_objects.editform) { |
| | | this.enable_command('save', true); |
| | | if (this.env.action == 'add' || this.env.action == 'edit') |
| | | if (this.env.action == 'add' || this.env.action == 'edit' || this.env.action == 'search') |
| | | this.init_contact_form(); |
| | | } |
| | | |
| | |
| | | |
| | | this.enable_command('login', true); |
| | | break; |
| | | } |
| | | |
| | | default: |
| | | break; |
| | | } |
| | | // unset contentframe variable if preview_pane is enabled |
| | | if (this.env.contentframe && !$('#' + this.env.contentframe).is(':visible')) |
| | | this.env.contentframe = null; |
| | | |
| | | // prevent from form submit with Enter key in file input fields |
| | | if (bw.ie) |
| | |
| | | if (uid = this.get_single_uid()) { |
| | | url = {_reply_uid: uid, _mbox: this.env.mailbox}; |
| | | if (command == 'reply-all') |
| | | // do reply-list, when list is detected and popup menu wasn't used |
| | | // do reply-list, when list is detected and popup menu wasn't used |
| | | url._all = (!props && this.commands['reply-list'] ? 'list' : 'all'); |
| | | else if (command == 'reply-list') |
| | | url._all = 'list'; |
| | |
| | | if (this.preview_read_timer) |
| | | clearTimeout(this.preview_read_timer); |
| | | |
| | | var selected = list.get_single_selection() != null; |
| | | var selected = list.get_single_selection(); |
| | | |
| | | this.enable_command(this.env.message_commands, selected); |
| | | this.enable_command(this.env.message_commands, selected != null); |
| | | if (selected) { |
| | | // Hide certain command buttons when Drafts folder is selected |
| | | if (this.env.mailbox == this.env.drafts_mailbox) |
| | | this.enable_command('reply', 'reply-all', 'reply-list', 'forward', 'forward-attachment', 'forward-inline', false); |
| | | // Disable reply-list when List-Post header is not set |
| | | else { |
| | | var msg = this.env.messages[list.get_single_selection()]; |
| | | var msg = this.env.messages[selected]; |
| | | if (!msg.ml) |
| | | this.enable_command('reply-list', false); |
| | | } |
| | |
| | | ac_props; |
| | | |
| | | // close compose step in opener |
| | | if (window.opener && opener.rcmail && opener.rcmail.env.action == 'compose') { |
| | | if (window.opener && !window.opener.closed && opener.rcmail && opener.rcmail.env.action == 'compose') { |
| | | setTimeout(function(){ opener.history.back(); }, 100); |
| | | this.env.opened_extwin = true; |
| | | } |
| | |
| | | { |
| | | this.display_message(msg, type); |
| | | |
| | | if (this.env.extwin && window.opener && opener.rcmail) { |
| | | if (this.env.extwin) { |
| | | this.lock_form(this.gui_objects.messageform); |
| | | opener.rcmail.display_message(msg, type); |
| | | if (window.opener && !window.opener.closed && opener.rcmail) |
| | | opener.rcmail.display_message(msg, type); |
| | | setTimeout(function(){ window.close() }, 1000); |
| | | } |
| | | else { |
| | |
| | | { |
| | | var ref = this, col; |
| | | |
| | | this.set_photo_actions($('#ff_photo').val()); |
| | | |
| | | for (col in this.env.coltypes) |
| | | this.init_edit_field(col, null); |
| | | if (this.env.coltypes) { |
| | | this.set_photo_actions($('#ff_photo').val()); |
| | | for (col in this.env.coltypes) |
| | | this.init_edit_field(col, null); |
| | | } |
| | | |
| | | $('.contactfieldgroup .row a.deletebutton').click(function() { |
| | | ref.delete_edit_field(this); |
| | |
| | | // send request |
| | | this.log('HTTP GET: ' + url); |
| | | |
| | | // reset keep-alive interval |
| | | this.start_keepalive(); |
| | | |
| | | return $.ajax({ |
| | | type: 'GET', url: url, data: { _unlock:(lock?lock:0) }, dataType: 'json', |
| | | success: function(data){ ref.http_response(data); }, |
| | | error: function(o, status, err) { ref.http_error(o, status, err, lock, action); } |
| | | }); |
| | | |
| | | // reset keep-alive interval |
| | | this.start_keepalive(); |
| | | }; |
| | | |
| | | // send a http POST request to the server |
| | |
| | | // send request |
| | | this.log('HTTP POST: ' + url); |
| | | |
| | | // reset keep-alive interval |
| | | this.start_keepalive(); |
| | | |
| | | return $.ajax({ |
| | | type: 'POST', url: url, data: postdata, dataType: 'json', |
| | | success: function(data){ ref.http_response(data); }, |
| | | error: function(o, status, err) { ref.http_error(o, status, err, lock, action); } |
| | | }); |
| | | |
| | | // reset keep-alive interval |
| | | this.start_keepalive(); |
| | | }; |
| | | |
| | | // aborts ajax request |