| | |
| | | { |
| | | var ret, uid, cid, url, flag, aborted = false; |
| | | |
| | | if (obj && obj.blur && !(event || rcube_event.is_keyboard(event))) |
| | | if (obj && obj.blur && !(event && rcube_event.is_keyboard(event))) |
| | | obj.blur(); |
| | | |
| | | // do nothing if interface is locked by other command (with exception for searching reset) |
| | |
| | | if (upload_id) |
| | | this.triggerEvent('fileuploaded', {name: name, attachment: att, id: upload_id}); |
| | | |
| | | if (!this.env.attachments) |
| | | this.env.attachments = {}; |
| | | |
| | | if (upload_id && this.env.attachments[upload_id]) |
| | | delete this.env.attachments[upload_id]; |
| | | |
| | | this.env.attachments[name] = att; |
| | | |
| | | if (!this.gui_objects.attachmentlist) |
| | | return false; |
| | | |
| | |
| | | // set tabindex attribute |
| | | var tabindex = $(this.gui_objects.attachmentlist).attr('data-tabindex') || '0'; |
| | | li.find('a').attr('tabindex', tabindex); |
| | | |
| | | if (upload_id && this.env.attachments[upload_id]) |
| | | delete this.env.attachments[upload_id]; |
| | | |
| | | this.env.attachments[name] = att; |
| | | |
| | | return true; |
| | | }; |
| | |
| | | |
| | | $(form).attr({ |
| | | target: frame_name, |
| | | action: this.url(action, { _id:this.env.compose_id||'', _uploadid:ts }), |
| | | action: this.url(action, {_id: this.env.compose_id || '', _uploadid: ts, _from: this.env.action}), |
| | | method: 'POST'}) |
| | | .attr(form.encoding ? 'encoding' : 'enctype', 'multipart/form-data') |
| | | .submit(); |