| | |
| | | if (rcmail.env.task == 'mail') { |
| | | rcmail.addEventListener('menu-open', show_listoptions); |
| | | rcmail.addEventListener('menu-save', save_listoptions); |
| | | rcmail.addEventListener('aftertoggle-editor', function(){ window.setTimeout(function(){ layout_composeview() }, 100); }); |
| | | |
| | | var dragmenu = $('#dragmessagemenu'); |
| | | if (dragmenu.length) { |
| | |
| | | |
| | | if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') { |
| | | layout_messageview(); |
| | | $("#all-headers").resizable({ handles: 's', minHeight: 50 }); |
| | | } |
| | | else if (rcmail.env.action == 'compose') { |
| | | rcmail.addEventListener('aftertoggle-editor', function(){ window.setTimeout(function(){ layout_composeview() }, 100); }); |
| | | rcmail.addEventListener('aftersend-attachment', show_uploadform); |
| | | layout_composeview(); |
| | | |
| | |
| | | }).css('cursor', 'pointer'); |
| | | |
| | | new rcube_splitter({ id:'composesplitterv', p1:'#composeview-left', p2:'#composeview-right', |
| | | orientation:'v', relative:true, start:248, min:150, size:12 }).init(); |
| | | orientation:'v', relative:true, start:248, min:170, size:12 }).init(); |
| | | } |
| | | else if (rcmail.env.action == 'list' || !rcmail.env.action) { |
| | | mailviewsplit = new rcube_splitter({ id:'mailviewsplitter', p1:'#mailview-top', p2:'#mailview-bottom', |
| | |
| | | new rcube_splitter({ id:'addressviewsplitter', p1:'#addresslist', p2:'#contacts-box', |
| | | orientation:'v', relative:true, start:296, min:220, size:12 }).init(); |
| | | } |
| | | |
| | | } |
| | | else if (rcmail.env.task == 'login') { |
| | | if (bw.ie && bw.vendver < 9) { |
| | | var popup = $('<div>') |
| | | .addClass('readtext') |
| | | .html("Roundcube will not work well with the crappy browser ya' using. Get yourself a new internet browsing software and don't come back without!<p>Sincerly,<br/>the Roundcube Dev Team</p>") |
| | | .appendTo(document.body) |
| | | .dialog({ |
| | | dialogClass: 'alert', |
| | | closeOnEscape: true, |
| | | title: "No way, are you serious?", |
| | | close: function() { |
| | | popup.dialog('destroy').remove(); |
| | | }, |
| | | width: 450 |
| | | }); |
| | | } |
| | | } |
| | | |
| | | // turn a group of fieldsets into tabs |
| | |
| | | } |
| | | |
| | | // add icons to clone file input field |
| | | if (rcmail.env.action = 'compose' && !$dialog.data('extended')) { |
| | | if (rcmail.env.action == 'compose' && !$dialog.data('extended')) { |
| | | $('<a>') |
| | | .addClass('iconlink add') |
| | | .attr('href', '#add') |
| | |
| | | this.handle.css('top', Math.round(this.pos - this.halfsize + this.offset)+'px'); |
| | | if (bw.ie) { |
| | | var new_height = parseInt(this.p2.parent().outerHeight(), 10) - parseInt(this.p2.css('top'), 10) - (bw.ie8 ? 2 : 0); |
| | | this.p2.css('height') = (new_height > 0 ? new_height : 0) + 'px'; |
| | | this.p2.css('height', (new_height > 0 ? new_height : 0) + 'px'); |
| | | } |
| | | } |
| | | else { |
| | |
| | | |
| | | this.p2.resize(); |
| | | this.p1.resize(); |
| | | |
| | | // also resize iframe covers |
| | | if (this.drag_active) { |
| | | $('iframe').each(function(i, elem) { |
| | | var pos = $(this).offset(); |
| | | $('#iframe-splitter-fix-'+i).css({ top: pos.top+'px', left: pos.left+'px', width:elem.offsetWidth+'px', height: elem.offsetHeight+'px' }); |
| | | }); |
| | | } |
| | | |
| | | if (typeof this.render == 'function') |
| | | this.render(this); |
| | |
| | | $(document).bind('mousemove.'+this.id, onDrag).bind('mouseup.'+this.id, onDragStop); |
| | | |
| | | // enable dragging above iframes |
| | | $('iframe').each(function() { |
| | | $('<div class="iframe-splitter-fix"></div>') |
| | | $('iframe').each(function(i, elem) { |
| | | $('<div>') |
| | | .attr('id', 'iframe-splitter-fix-'+i) |
| | | .addClass('iframe-splitter-fix') |
| | | .css({ background: '#fff', |
| | | width: this.offsetWidth+'px', height: this.offsetHeight+'px', |
| | | width: elem.offsetWidth+'px', height: elem.offsetHeight+'px', |
| | | position: 'absolute', opacity: '0.001', zIndex: 1000 |
| | | }) |
| | | .css($(this).offset()) |
| | |
| | | me.drag_active = false; |
| | | |
| | | // remove temp divs |
| | | $('div.iframe-splitter-fix').each(function(){ this.parentNode.removeChild(this); }); |
| | | $('div.iframe-splitter-fix').remove(); |
| | | |
| | | me.set_cookie(); |
| | | |