| | |
| | | this.task = this.env.task; |
| | | |
| | | // check browser |
| | | if (!bw.dom || !bw.xmlhttp_test() || (bw.mz && bw.vendver < 1.9)) { |
| | | if (!bw.dom || !bw.xmlhttp_test() || (bw.mz && bw.vendver < 1.9) || (bw.ie && bw.vendver < 7)) { |
| | | this.goto_url('error', '_code=0x199'); |
| | | return; |
| | | } |
| | |
| | | $('#rcmloginpwd').focus(); |
| | | |
| | | // detect client timezone |
| | | if (window.jstz && !bw.ie6) { |
| | | if (window.jstz) { |
| | | var timezone = jstz.determine(); |
| | | if (timezone.name()) |
| | | $('#rcmlogintz').val(timezone.name()); |
| | |
| | | // add each submitted col |
| | | for (n in this.env.listcols) { |
| | | c = this.env.listcols[n]; |
| | | col = { className: String(c).toLowerCase() }; |
| | | col = {className: String(c).toLowerCase(), events:{}}; |
| | | |
| | | if (this.env.coltypes[c] && this.env.coltypes[c].hidden) { |
| | | col.className += ' hidden'; |
| | |
| | | html = '<span id="flagicn'+row.id+'" class="'+css_class+'"> </span>'; |
| | | } |
| | | else if (c == 'attachment') { |
| | | if (/application\/|multipart\/(m|signed)/.test(flags.ctype)) |
| | | if (flags.attachmentClass) |
| | | html = '<span class="'+flags.attachmentClass+'"> </span>'; |
| | | else if (/application\/|multipart\/(m|signed)/.test(flags.ctype)) |
| | | html = '<span class="attachment"> </span>'; |
| | | else if (/multipart\/report/.test(flags.ctype)) |
| | | html = '<span class="report"> </span>'; |
| | |
| | | else if (c == 'threads') |
| | | html = expando; |
| | | else if (c == 'subject') { |
| | | if (bw.ie) { |
| | | col.onmouseover = function() { rcube_webmail.long_subject_title_ex(this, message.depth+1); }; |
| | | if (bw.ie8) |
| | | tree = '<span></span>' + tree; // #1487821 |
| | | } |
| | | if (bw.ie) |
| | | col.events.mouseover = function() { rcube_webmail.long_subject_title_ex(this); }; |
| | | html = tree + cols[c]; |
| | | } |
| | | else if (c == 'priority') { |
| | |
| | | var lock = this.set_busy(true, 'checkingmail'), |
| | | params = this.check_recent_params(); |
| | | |
| | | this.http_request('check-recent', params, lock); |
| | | this.http_post('check-recent', params, lock); |
| | | }; |
| | | |
| | | // list messages of a specific mailbox using filter |
| | |
| | | $("input[name='_draft_saveid']").val(id); |
| | | |
| | | // reset history of hidden iframe used for saving draft (#1489643) |
| | | if (window.frames['savetarget'] && window.frames['savetarget'].history) { |
| | | // but don't do this on timer-triggered draft-autosaving (#1489789) |
| | | if (window.frames['savetarget'] && window.frames['savetarget'].history && !this.draft_autosave_submit) { |
| | | window.frames['savetarget'].history.back(); |
| | | } |
| | | |
| | | this.draft_autosave_submit = false; |
| | | } |
| | | |
| | | // always remove local copy upon saving as draft |
| | |
| | | this.auto_save_start = function() |
| | | { |
| | | if (this.env.draft_autosave) |
| | | this.save_timer = setTimeout(function(){ ref.command("savedraft"); }, this.env.draft_autosave * 1000); |
| | | this.draft_autosave_submit = false; |
| | | this.save_timer = setTimeout(function(){ |
| | | ref.draft_autosave_submit = true; // set auto-saved flag (#1489789) |
| | | ref.command("savedraft"); |
| | | }, this.env.draft_autosave * 1000); |
| | | |
| | | // save compose form content to local storage every 5 seconds |
| | | if (!this.local_save_timer && window.localStorage) { |
| | |
| | | li.attr('id', name) |
| | | .addClass(att.classname) |
| | | .html(att.html) |
| | | .on('mouseover', function() { rcube_webmail.long_subject_title_ex(this, 0); }); |
| | | .on('mouseover', function() { rcube_webmail.long_subject_title_ex(this); }); |
| | | |
| | | // replace indicator's li |
| | | if (upload_id && (indicator = document.getElementById(upload_id))) { |
| | |
| | | |
| | | if (action) |
| | | query._action = action; |
| | | else |
| | | else if (this.env.action) |
| | | query._action = this.env.action; |
| | | |
| | | var base = this.env.comm_path, k, param = {}; |
| | | |
| | | // overwrite task name |
| | | if (query._action.match(/([a-z0-9_-]+)\/([a-z0-9-_.]+)/)) { |
| | | if (action && action.match(/([a-z0-9_-]+)\/([a-z0-9-_.]+)/)) { |
| | | query._action = RegExp.$2; |
| | | base = base.replace(/\_task=[a-z0-9_-]+/, '_task='+RegExp.$1); |
| | | } |
| | |
| | | this.env.lastrefresh = new Date(); |
| | | |
| | | // plugins should bind to 'requestrefresh' event to add own params |
| | | this.http_request('refresh', params, lock); |
| | | this.http_post('refresh', params, lock); |
| | | }; |
| | | |
| | | // returns check-recent request parameters |
| | |
| | | } |
| | | }; |
| | | |
| | | rcube_webmail.long_subject_title_ex = function(elem, indent) |
| | | rcube_webmail.long_subject_title_ex = function(elem) |
| | | { |
| | | if (!elem.title) { |
| | | var $elem = $(elem), |
| | |
| | | w = tmp.width(); |
| | | |
| | | tmp.remove(); |
| | | if (w + indent * 15 > $elem.width()) |
| | | if (w + $('span.branch', $elem).width() * 15 > $elem.width()) |
| | | elem.title = txt; |
| | | } |
| | | }; |