| | |
| | | form._draft.value = draft ? '1' : ''; |
| | | form.action = this.add_url(form.action, '_unlock', msgid); |
| | | form.action = this.add_url(form.action, '_lang', lang); |
| | | |
| | | // register timer to notify about connection timeout |
| | | this.submit_timer = setTimeout(function(){ |
| | | ref.set_busy(false, null, msgid); |
| | | ref.display_message(ref.get_label('requesttimedout'), 'error'); |
| | | }, this.env.request_timeout * 1000); |
| | | |
| | | form.submit(); |
| | | }; |
| | | |
| | |
| | | this.group_member_change('add', cid, dest, to.id); |
| | | else { |
| | | var lock = this.display_message(this.get_label('copyingcontact'), 'loading'), |
| | | post_data = {_cid: cid, _source: source, _to: dest, _togid: to.id, _gid: group}; |
| | | post_data = {_cid: cid, _source: this.env.source, _to: dest, _togid: to.id, _gid: group}; |
| | | |
| | | this.http_post('copy', post_data, lock); |
| | | } |
| | |
| | | // target is an addressbook |
| | | else if (to.id != source) { |
| | | var lock = this.display_message(this.get_label('copyingcontact'), 'loading'), |
| | | post_data = {_cid: cid, _source: source, _to: to.id, _gid: group}; |
| | | post_data = {_cid: cid, _source: this.env.source, _to: to.id, _gid: group}; |
| | | |
| | | this.http_post('copy', post_data, lock); |
| | | } |
| | |
| | | |
| | | // redirect to url specified in location header if not empty |
| | | var location_url = request.getResponseHeader("Location"); |
| | | if (location_url) |
| | | if (location_url && this.env.action != 'compose') // don't redirect on compose screen, contents might get lost (#1488926) |
| | | this.redirect(location_url); |
| | | |
| | | // re-send keep-alive requests after 30 seconds |
| | |
| | | setTimeout(function(){ ref.keep_alive(); ref.start_keepalive(); }, 30000); |
| | | }; |
| | | |
| | | // callback when an iframe finished loading |
| | | this.iframe_loaded = function(unlock) |
| | | { |
| | | this.set_busy(false, null, unlock); |
| | | |
| | | if (this.submit_timer) |
| | | clearTimeout(this.submit_timer); |
| | | }; |
| | | |
| | | // post the given form to a hidden iframe |
| | | this.async_upload_form = function(form, action, onload) |
| | | { |