| | |
| | | var n; |
| | | this.task = this.env.task; |
| | | |
| | | // check browser |
| | | if (this.env.server_error != 409 && (!bw.dom || !bw.xmlhttp_test() || (bw.mz && bw.vendver < 1.9) || (bw.ie && bw.vendver < 7))) { |
| | | // check browser capabilities (never use version checks here) |
| | | if (this.env.server_error != 409 && (!bw.dom || !bw.xmlhttp_test())) { |
| | | this.goto_url('error', '_code=0x199'); |
| | | return; |
| | | } |
| | |
| | | // removes messages that doesn't exists from list selection array |
| | | this.update_selection = function() |
| | | { |
| | | var selected = this.message_list.selection, |
| | | rows = this.message_list.rows, |
| | | var list = this.message_list, |
| | | selected = list.selection, |
| | | rows = list.rows, |
| | | i, selection = []; |
| | | |
| | | for (i in selected) |
| | | if (rows[selected[i]]) |
| | | selection.push(selected[i]); |
| | | |
| | | this.message_list.selection = selection; |
| | | list.selection = selection; |
| | | |
| | | // reset preview frame, if currently previewed message is not selected (has been removed) |
| | | try { |
| | | var win = this.get_frame_window(this.env.contentframe), |
| | | id = win.rcmail.env.uid; |
| | | |
| | | if (id && $.inArray(id, selection) < 0) |
| | | if (id && !list.in_selection(id)) |
| | | this.show_contentframe(false); |
| | | } |
| | | catch (e) {}; |
| | |
| | | var submit_data = function() { |
| | | var multiple = files.length > 1, |
| | | ts = new Date().getTime(), |
| | | content = '<span>' + (multiple ? ref.get_label('uploadingmany') : files[0].name) + '</span>'; |
| | | // jQuery way to escape filename (#1490530) |
| | | content = $('<span>').text(multiple ? ref.get_label('uploadingmany') : files[0].name).html(); |
| | | |
| | | // add to attachments list |
| | | if (!ref.add2attachment_list(ts, { name:'', html:content, classname:'uploading', complete:false })) |