thomascube
2012-01-02 7c2a9310c4104f51fcf56379dcc3511fa5bfae2d
skins/larry/ui.js
@@ -61,7 +61,6 @@
    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) {
@@ -76,8 +75,10 @@
      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();
@@ -89,7 +90,7 @@
        }).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',
@@ -119,7 +120,7 @@
        new rcube_splitter({ id:'folderviewsplitter', p1:'#folderslist', p2:'#folder-details',
          orientation:'v', relative:true, start:305, min:150, size:12 }).init();
      }
      else if (rcmail.env.action.indexOf('identit') >= 0) {
      else if (rcmail.env.action == 'identities') {
        new rcube_splitter({ id:'identviewsplitter', p1:'#identitieslist', p2:'#identity-details',
          orientation:'v', relative:true, start:305, min:150, size:12 }).init();
      }
@@ -802,6 +803,14 @@
    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);
  };
@@ -823,10 +832,12 @@
    $(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())
@@ -882,7 +893,7 @@
    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();