Changeset 1766 in subversion


Ignore:
Timestamp:
Sep 12, 2008 8:13:13 AM (5 years ago)
Author:
alec
Message:
  • Added vertical splitter for folders list resizing
  • Added possibility to view all headers in message view
  • Fixed splitter drag/resize on Opera (#1485170)
  • debug console css fixes for IE
Location:
trunk/roundcubemail
Files:
3 added
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r1765 r1766  
    11CHANGELOG RoundCube Webmail 
    22--------------------------- 
     3 
     42008/09/12 (alec) 
     5---------- 
     6- Added vertical splitter for folders list resizing 
     7- Added possibility to view all headers in message view 
     8- Fixed splitter drag/resize on Opera (#1485170) 
    39 
    4102008/09/12 (thomasb) 
  • trunk/roundcubemail/program/include/rcube_imap.php

    r1759 r1766  
    13711371 
    13721372    return $body;     
     1373    } 
     1374 
     1375 
     1376  /** 
     1377   * Returns the message headers as string 
     1378   * 
     1379   * @param int  Message UID 
     1380   * @return string Message headers string 
     1381   */ 
     1382  function &get_raw_headers($uid) 
     1383    { 
     1384    if (!($msg_id = $this->_uid2id($uid))) 
     1385      return FALSE; 
     1386 
     1387    $headers = iil_C_FetchPartHeader($this->conn, $this->mailbox, $msg_id, NULL); 
     1388 
     1389    return $headers;     
    13731390    } 
    13741391     
  • trunk/roundcubemail/program/include/rcube_template.php

    r1750 r1766  
    321321        // add debug console 
    322322        if ($this->config['debug_level'] & 8) { 
    323             $this->add_footer('<div style="position:absolute;top:5px;left:5px;width:400px;padding:0.2em;background:white;opacity:0.8;z-index:9000"> 
     323            $this->add_footer('<div style="position:absolute;top:5px;left:5px;width:405px;padding:2px;background:white;opacity:0.8;filter:alpha(opacity=80);z-index:9000"> 
    324324                <a href="#toggle" onclick="con=document.getElementById(\'dbgconsole\');con.style.display=(con.style.display==\'none\'?\'block\':\'none\');return false">console</a> 
    325                 <form action="/" name="debugform"><textarea name="console" id="dbgconsole" rows="20" cols="40" wrap="off" style="display:none;width:400px;border:none;font-size:x-small"></textarea></form></div>' 
     325                <form action="/" name="debugform" style="display:inline"><textarea name="console" id="dbgconsole" rows="20" cols="40" wrap="off" style="display:none;width:400px;border:none;font-size:x-small"></textarea></form></div>' 
    326326            ); 
    327327        } 
  • trunk/roundcubemail/program/js/app.js

    r1763 r1766  
    160160        if (this.env.action=='show' || this.env.action=='preview') 
    161161          { 
    162           this.enable_command('show', 'reply', 'reply-all', 'forward', 'moveto', 'delete', 'mark', 'viewsource', 'print', 'load-attachment', true); 
     162          this.enable_command('show', 'reply', 'reply-all', 'forward', 'moveto', 'delete', 'mark', 'viewsource', 'print', 'load-attachment', 'load-headers', true); 
    163163          if (this.env.next_uid) 
    164164            { 
     
    511511     } 
    512512 
    513  
    514513    // process command 
    515514    switch (command) 
     
    552551          this.enable_command('add', (this.env.address_sources && !this.env.address_sources[props].readonly)); 
    553552          } 
     553        break; 
     554 
     555 
     556      case 'load-headers': 
     557        this.load_headers(obj); 
    554558        break; 
    555559 
     
    36553659 
    36563660 
     3661  // display fetched raw headers 
     3662  this.set_headers = function(content) 
     3663    { 
     3664    if (this.gui_objects.all_headers_row && this.gui_objects.all_headers_box && content) 
     3665      { 
     3666      var box = this.gui_objects.all_headers_box; 
     3667      box.innerHTML = content; 
     3668      box.style.display = 'block'; 
     3669 
     3670      if (this.env.framed && parent.rcmail) 
     3671        parent.rcmail.set_busy(false); 
     3672      else 
     3673        this.set_busy(false); 
     3674      } 
     3675    }; 
     3676 
     3677  // display all-headers row and fetch raw message headers 
     3678  this.load_headers = function(elem) 
     3679    { 
     3680    if (!this.gui_objects.all_headers_row || !this.gui_objects.all_headers_box || !this.env.uid) 
     3681      return; 
     3682     
     3683    this.set_classname(elem, 'show-headers', false); 
     3684    this.set_classname(elem, 'hide-headers', true); 
     3685    this.gui_objects.all_headers_row.style.display = bw.ie ? 'block' : 'table-row'; 
     3686    elem.onclick = function() { rcmail.hide_headers(elem); } 
     3687 
     3688    // fetch headers only once 
     3689    if (!this.gui_objects.all_headers_box.innerHTML) 
     3690      { 
     3691      this.set_busy(true, 'loading'); 
     3692      this.http_post('headers', '_uid='+this.env.uid); 
     3693      } 
     3694    } 
     3695 
     3696 
     3697  // hide all-headers row 
     3698  this.hide_headers = function(elem) 
     3699    { 
     3700    if (!this.gui_objects.all_headers_row || !this.gui_objects.all_headers_box) 
     3701      return; 
     3702 
     3703    this.set_classname(elem, 'hide-headers', false); 
     3704    this.set_classname(elem, 'show-headers', true); 
     3705    this.gui_objects.all_headers_row.style.display = 'none'; 
     3706    elem.onclick = function() { rcmail.load_headers(elem); } 
     3707    } 
     3708 
    36573709 
    36583710  /********************************************************/ 
     
    37613813 
    37623814    if (request_obj.__lock) 
    3763         this.set_busy(false); 
     3815      this.set_busy(false); 
    37643816 
    37653817    console.log(request_obj.get_text()); 
  • trunk/roundcubemail/program/js/common.js

    r1763 r1766  
    254254 
    255255    obj = document.createElement('DIV'); 
     256 
    256257    with(obj) 
    257258      { 
     
    259260      with(style) 
    260261        { 
    261         position = 'absolute'; 
     262        position = 'absolute'; 
    262263        visibility = (vis) ? (vis==2) ? 'inherit' : 'visible' : 'hidden'; 
    263264        left = l+'px'; 
    264265        top = t+'px'; 
    265         if(w) width = w+'px'; 
    266         if(h) height = h+'px'; 
     266        if (w) 
     267          width = w.toString().match(/\%$/) ? w : w+'px'; 
     268        if (h) 
     269          height = h.toString().match(/\%$/) ? h : h+'px'; 
    267270        if(z) zIndex = z; 
    268         } 
     271        } 
    269272      } 
    270        
    271     if(parent) parent.appendChild(obj); 
    272     else document.body.appendChild(obj); 
     273 
     274    if (parent) 
     275      parent.appendChild(obj); 
     276    else 
     277      document.body.appendChild(obj); 
    273278 
    274279    this.elm = obj; 
     
    497502 
    498503// return the absolute position of an object within the document 
    499 function rcube_get_object_pos(obj) 
     504function rcube_get_object_pos(obj, relative) 
    500505  { 
    501506  if(typeof(obj)=='string') 
     
    507512  var iY = (bw.layers) ? obj.y : obj.offsetTop; 
    508513 
    509   if(bw.ie || bw.mz) 
     514  if(!relative && (bw.ie || bw.mz)) 
    510515    { 
    511516    var elm = obj.offsetParent; 
     
    599604  { 
    600605    box = rcube_find_object('console'); 
     606 
    601607    if (box) 
    602       if (msg[msg.length-1]=='\n') 
     608      if (msg.charAt(msg.length-1)=='\n') 
    603609        box.value += msg+'--------------------------------------\n'; 
    604610      else 
  • trunk/roundcubemail/program/localization/en_GB/labels.inc

    r1373 r1766  
    129129$labels['compose'] = 'Compose a message'; 
    130130$labels['savemessage'] = 'Save this draft'; 
    131 $labels['sendmessage'] = 'Send the message now'; 
     131$labels['sendmessage'] = 'Send now'; 
    132132$labels['addattachment'] = 'Attach a file'; 
    133133$labels['charset'] = 'Charset'; 
  • trunk/roundcubemail/program/localization/en_US/labels.inc

    r1741 r1766  
    165165$labels['compose']        = 'Compose a message'; 
    166166$labels['savemessage']    = 'Save this draft'; 
    167 $labels['sendmessage']    = 'Send the message now'; 
     167$labels['sendmessage']    = 'Send now'; 
    168168$labels['addattachment']  = 'Attach a file'; 
    169169$labels['charset']        = 'Charset'; 
  • trunk/roundcubemail/program/steps/mail/func.inc

    r1751 r1766  
    741741  // show these headers 
    742742  $standard_headers = array('subject', 'from', 'organization', 'to', 'cc', 'bcc', 'replyto', 'date'); 
    743    
     743 
    744744  foreach ($standard_headers as $hkey) 
    745745    { 
     
    772772    } 
    773773 
     774  // all headers division 
     775  $out .= "\n".'<tr><td colspan="2" class="more-headers show-headers" 
     776        onclick="return '.JS_OBJECT_NAME.'.command(\'load-headers\', \'\', this)"></td></tr>'; 
     777  $out .= "\n".'<tr id="all-headers"><td colspan="2" class="all"><div id="headers-source"></div></td></tr>'; 
     778 
     779  $OUTPUT->add_gui_object('all_headers_row', 'all-headers'); 
     780  $OUTPUT->add_gui_object('all_headers_box', 'headers-source'); 
     781 
    774782  $out .= "\n</table>\n\n"; 
    775783 
  • trunk/roundcubemail/skins/default/addresses.css

    r1763 r1766  
    11/***** RoundCube|Mail address book task styles *****/ 
    2  
    32 
    43#abooktoolbar 
     
    1918  position: absolute; 
    2019  bottom: 16px; 
    21   left: 185px; 
     20  left: 190px; 
    2221  width: 240px; 
    2322  height: 20px; 
     
    3130} 
    3231 
    33 #directorylist, #addresslist, #importbox 
     32#mainscreen 
     33{ 
     34  position: absolute; 
     35  top: 85px; 
     36  right: 20px; 
     37  bottom: 40px; 
     38  left: 200px; 
     39  /* css hack for IE */ 
     40  width: expression((parseInt(document.documentElement.clientWidth)-220)+'px'); 
     41  height: expression((parseInt(document.documentElement.clientHeight)-125)+'px'); 
     42} 
     43 
     44#directorylist 
    3445{ 
    3546  position: absolute; 
    3647  top: 85px; 
    3748  bottom: 40px; 
    38   border: 1px solid #999999; 
    39   background-color: #F9F9F9; 
    40   overflow: auto; 
    41   /* css hack for IE */ 
    42   height: expression((parseInt(document.documentElement.clientHeight)-135)+'px');   
    43 } 
    44  
    45 #directorylist 
    46 { 
    4749  left: 20px; 
    4850  width: 170px; 
     51  border: 1px solid #999999; 
     52  background-color: #F9F9F9; 
    4953  overflow: hidden; 
     54  /* css hack for IE */ 
     55  height: expression((parseInt(document.documentElement.clientHeight)-125)+'px');   
    5056} 
    5157 
    5258#addresslist 
    5359{ 
    54   left: 200px; 
     60  position: absolute; 
     61  top: 0px; 
     62  bottom: 0px; 
     63  border: 1px solid #999999; 
     64  background-color: #F9F9F9; 
     65  overflow: auto; 
     66  /* css hack for IE */ 
     67  height: expression(parseInt(this.parentNode.offsetHeight)+'px'); 
     68} 
     69 
     70#importbox 
     71{ 
     72  position: absolute; 
     73  top: 85px; 
     74  bottom: 40px; 
     75  left: 20px; 
     76  right: 20px; 
     77  border: 1px solid #999999; 
     78  background-color: #F9F9F9; 
     79  padding-bottom: 4ex; 
     80  overflow: auto; 
     81  /* css hack for IE */ 
     82  height: expression((parseInt(document.documentElement.clientHeight)-135)+'px');   
     83} 
     84 
     85#addresslist 
     86{ 
     87  left: 0px; 
    5588  width: 340px; 
    56 } 
    57  
    58 #importbox 
    59 { 
    60   left: 20px; 
    61   right: 40px; 
    62   height: auto; 
    63   bottom: auto; 
    64   padding-bottom: 4ex; 
    6589} 
    6690 
     
    130154{ 
    131155  position: absolute; 
    132   top: 85px; 
     156  top: 0px; 
    133157  left: 555px; 
    134   right: 20px; 
    135   bottom: 40px; 
     158  right: 0px; 
     159  bottom: 0px; 
    136160  border: 1px solid #999999; 
    137161  overflow: hidden; 
    138162  /* css hack for IE */ 
    139   width: expression((parseInt(document.documentElement.clientWidth)-45-document.getElementById('addresslist').offsetLeft-document.getElementById('addresslist').offsetWidth)+'px'); 
    140   height: expression((parseInt(document.documentElement.clientHeight)-135)+'px'); 
    141 } 
    142  
    143  
    144 #addressviewsplitter 
    145 { 
    146   background-position: 4px center; 
    147 } 
    148  
    149 #addressviewsplitter .splitterLine 
    150 { 
    151   margin-left: 3px; 
    152   width: 6px; 
    153 } 
    154  
     163  height: expression(parseInt(this.parentNode.offsetHeight)+'px'); 
     164  width: expression((parseInt(this.parentNode.offsetWidth)-555)+'px'); 
     165} 
    155166 
    156167body.iframe, 
  • trunk/roundcubemail/skins/default/common.css

    r1716 r1766  
    195195  z-index: 5000; 
    196196  opacity: 0.85; 
     197  /* IE */ 
     198  filter: alpha(opacity=85); 
    197199} 
    198200 
     
    238240.splitter 
    239241{ 
    240   position: absolute; 
    241   padding: 2px; 
     242  user-select: none; 
     243  -moz-user-select: none; 
     244  -khtml-user-select: none; 
     245  position: absolute; 
    242246  background: url(images/dimple.png) center no-repeat; 
    243247} 
     
    252256{ 
    253257  cursor: e-resize; 
    254   background-position: 1px center; 
     258  background-position: 2px center; 
    255259} 
    256260 
  • trunk/roundcubemail/skins/default/mail.css

    r1763 r1766  
    147147} 
    148148 
     149#mainscreen  
     150{ 
     151  position: absolute; 
     152  top: 85px; 
     153  right: 20px; 
     154  bottom: 40px; 
     155  left: 20px; 
     156  /* css hack for IE */ 
     157  width: expression((parseInt(document.documentElement.clientWidth)-40)+'px'); 
     158  height: expression((parseInt(document.documentElement.clientHeight)-125)+'px'); 
     159} 
     160 
     161#mailrightcontainer 
     162{ 
     163  position: absolute; 
     164  top: 0px; 
     165  left: 170px; 
     166  bottom: 0px; 
     167  right: 0px; 
     168  /* css hack for IE */ 
     169  width: expression((parseInt(this.parentNode.offsetWidth)-170)+'px'); 
     170  height: expression(parseInt(this.parentNode.offsetHeight)+'px'); 
     171} 
     172           
    149173#messagepartcontainer 
    150174{ 
     
    162186{ 
    163187  position: absolute; 
    164   top: 85px; 
    165   left: 200px; 
    166   right: 20px; 
    167   bottom: 40px; 
     188  width: 100%; 
     189  top: 0px; 
     190  bottom: 0px; 
    168191  border: 1px solid #999999; 
    169192  background-color: #F9F9F9; 
    170193  overflow: auto; 
    171194  /* css hack for IE */ 
    172   width: expression((parseInt(document.documentElement.clientWidth)-220)+'px'); 
    173   height: expression((parseInt(document.documentElement.clientHeight)-125)+'px'); 
     195  height: expression(parseInt(this.parentNode.offsetHeight)+'px'); 
    174196} 
    175197 
     
    177199{ 
    178200  position: absolute; 
    179   top: 305px; 
    180   left: 200px; 
    181   right: 20px; 
    182   bottom: 40px; 
     201  width: 100%; 
     202  top: 205px; 
     203  bottom: 0px; 
    183204  border: 1px solid #999999; 
    184205  background-color: #F9F9F9; 
    185206  /* css hack for IE */ 
    186   width: expression((parseInt(document.documentElement.clientWidth)-220)+'px'); 
    187   height: expression((parseInt(document.documentElement.clientHeight)-135-document.getElementById('mailcontframe').offsetHeight)+'px'); 
     207  height: expression((parseInt(this.parentNode.offsetHeight)-205)+'px'); 
    188208} 
    189209 
    190210#messagecontframe 
    191211{ 
    192   position: absolute; 
     212  position: relative; 
    193213  top: 0px; 
    194214  left: 0px; 
    195215  right: 0px; 
    196216  bottom: 0px; 
    197   /* css hack for IE */ 
    198   width: expression((parseInt(document.documentElement.clientWidth)-220)+'px'); 
    199   height: expression((parseInt(document.documentElement.clientHeight)-135-document.getElementById('mailcontframe').offsetHeight)+'px'); 
     217  width: 100%; 
     218  height: 100%; 
    200219} 
    201220 
     
    254273{ 
    255274  position: absolute; 
    256   top: 85px; 
    257   left: 20px; 
    258   width: 170px; 
    259   bottom: 40px; 
     275  top: 0px; 
     276  left: 0px; 
     277  width: 160px; 
     278  bottom: 0px; 
    260279  border: 1px solid #999; 
    261280  background-color: #F9F9F9; 
    262281  overflow: auto; 
    263282  /* css hack for IE */ 
    264   height: expression((parseInt(document.documentElement.clientHeight)-125)+'px'); 
     283  height: expression(parseInt(this.parentNode.offsetHeight)+'px'); 
    265284} 
    266285 
     
    600619{ 
    601620  position: absolute; 
    602   top: 85px; 
    603   left: 200px; 
    604   right: 20px; 
    605   bottom: 40px; 
     621  top: 0px; 
     622  left: 0px; 
     623  right: 0px; 
     624  bottom: 0px; 
    606625  border: 1px solid #999; 
    607626  background-color: #FFF; 
    608627  overflow: auto; 
    609628  /* css hack for IE */ 
    610   /* margin-bottom: 10px; */ 
    611629  width: expression((parseInt(document.documentElement.clientWidth)-220)+'px'); 
    612630  height: expression((parseInt(document.documentElement.clientHeight)-125)+'px'); 
     
    642660table.headers-table td.header-title 
    643661{ 
    644   width: 80px; 
     662  width: 85px; 
    645663  color: #666666; 
    646664  font-weight: bold; 
     
    652670table.headers-table tr td.subject 
    653671{ 
    654   width: 95%; 
     672  width: 90%; 
    655673  font-weight: bold; 
     674} 
     675 
     676table.headers-table tr td.all 
     677{ 
     678  width: 100%; 
     679  color: #666666; 
     680  text-align: left; 
     681  padding-right: 10px; 
     682  vertical-align: center; 
     683  text-align: center; 
    656684} 
    657685 
     
    950978  margin-top: 4px; 
    951979} 
     980 
     981.more-headers 
     982{ 
     983  cursor: pointer; 
     984  width: 100%; 
     985  height: 6px; 
     986} 
     987 
     988.show-headers 
     989{ 
     990  background: url(images/icons/down_small.gif) no-repeat center; 
     991} 
     992 
     993.hide-headers 
     994{ 
     995  background: url(images/icons/up_small.gif) no-repeat center; 
     996} 
     997 
     998#all-headers 
     999{ 
     1000  height: 150px; 
     1001  display: none; 
     1002} 
     1003 
     1004#headers-source 
     1005{ 
     1006  margin: 0 5px; 
     1007  width: 100%; 
     1008  height: 145px; 
     1009  background: white; 
     1010  overflow: auto; 
     1011  font-size: 11px; 
     1012  white-space: nowrap; 
     1013  border: 1px solid #999999; 
     1014  display: none; 
     1015  text-align: left; 
     1016  color: #666666; 
     1017} 
     1018 
     1019font.bold 
     1020{ 
     1021  font-weight: bold; 
     1022} 
  • trunk/roundcubemail/skins/default/splitter.js

    r1643 r1766  
    1212  this.orientation = attrib.orientation; 
    1313  this.horizontal = (this.orientation == 'horizontal' || this.orientation == 'h'); 
    14   this.offset_1 = bw.ie ? 0 : -1; 
    15   this.offset_2 = bw.ie ? -2 : 1; 
    16   this.pos = 0; 
     14  this.offset = bw.ie6 ? 2 : 0; 
     15  this.pos = attrib.start ? attrib.start * 1 : 0; 
     16  this.relative = attrib.relative ? true : false; 
     17  this.drag_active = false; 
    1718 
    1819  this.init = function() 
     
    2021    this.p1 = document.getElementById(this.p1id); 
    2122    this.p2 = document.getElementById(this.p2id); 
     23 
     24    // create and position the handle for this splitter 
     25    this.p1pos = rcube_get_object_pos(this.p1, this.relative); 
     26    this.p2pos = rcube_get_object_pos(this.p2, this.relative); 
    2227     
    23     // create and position the handle for this splitter 
    24     this.p1pos = rcube_get_object_pos(this.p1); 
    25     this.p2pos = rcube_get_object_pos(this.p2); 
    26     var top = this.p1pos.y + this.p1.offsetHeight; 
    27     var height = this.p2pos.y - this.p1pos.y - this.p1.offsetHeight; 
    28     var left = this.p1pos.x + this.p1.offsetWidth; 
    29     var width = this.p2pos.x - this.p1pos.x - this.p1.offsetWidth; 
    30      
    31     if (this.horizontal) 
    32       this.layer = new rcube_layer(this.id, {x: this.p1pos.x, y: top, height: height, width: this.p1.offsetWidth, vis: 1}); 
    33     else 
    34       this.layer = new rcube_layer(this.id, {x: left, y: this.p1pos.y, width: width, height: this.p1.offsetHeight, vis: 1}); 
     28    if (this.horizontal) 
     29      { 
     30      var top = this.p1pos.y + this.p1.offsetHeight; 
     31      this.layer = new rcube_layer(this.id, {x: 0, y: top, height: 10,  
     32            width: '100%', vis: 1, parent: this.p1.parentNode}); 
     33      } 
     34    else 
     35      { 
     36      var left = this.p1pos.x + this.p1.offsetWidth; 
     37      this.layer = new rcube_layer(this.id, {x: left, y: 0, width: 10,  
     38            height: '100%', vis: 1,  parent: this.p1.parentNode}); 
     39      } 
    3540 
    3641    this.elm = this.layer.elm; 
    3742    this.elm.className = 'splitter '+(this.horizontal ? 'splitter-h' : 'splitter-v'); 
     43    this.elm.unselectable = 'on'; 
    3844 
    3945    // add the mouse event listeners 
    4046    rcube_event.add_listener({element: this.elm, event:'mousedown', object:this, method:'onDragStart'}); 
    41     rcube_event.add_listener({element: window, event:'resize', object:this, method:'onResize'}); 
     47    if (bw.ie) 
     48      rcube_event.add_listener({element: window, event:'resize', object:this, method:'onResize'}); 
    4249 
    4350    // read saved position from cookie 
     
    4653      { 
    4754      var param = cookie.split(':'); 
     55 
    4856      for (var i=0, p; i<param.length; i++) 
    4957        { 
     
    5462      this.resize(); 
    5563      } 
     64    else if (this.pos) 
     65      { 
     66      this.resize(); 
     67      this.set_cookie(); 
     68      } 
    5669    }; 
    5770 
     
    6275  this.resize = function() 
    6376    { 
    64      if (this.horizontal) 
    65       { 
    66       this.p1.style.height = Math.floor(this.pos - this.p1pos.y - this.layer.height / 2 + this.offset_1) + 'px'; 
    67       this.p2.style.top = Math.ceil(this.pos + (this.layer.height / 2 + this.offset_2)) + 'px'; 
    68       this.layer.move(this.layer.x, Math.round(this.pos - this.layer.height / 2 + 1)); 
    69       } 
    70     else 
    71       { 
    72       this.p1.style.width = Math.floor(this.pos - this.p1pos.x - this.layer.width / 2 + this.offset_1) + 'px'; 
    73       this.p2.style.left = Math.ceil(this.pos + this.layer.width / 2 + this.offset_2) + 'px'; 
     77    if (this.horizontal) 
     78      { 
     79      var lh = this.layer.height - this.offset * 2; 
     80      this.p1.style.height = Math.floor(this.pos - this.p1pos.y - lh / 2) + 'px'; 
     81      this.p2.style.top = Math.ceil(this.pos + lh / 2) + 'px'; 
     82      this.layer.move(this.layer.x, Math.round(this.pos - lh / 2 + 1));       
     83      if (bw.ie) 
     84        this.p2.style.height = (parseInt(this.p2.parentNode.offsetHeight) - parseInt(this.p2.style.top))+'px'; 
     85      } 
     86    else 
     87      { 
     88      this.p1.style.width = Math.floor(this.pos - this.p1pos.x - this.layer.width / 2) + 'px'; 
     89      this.p2.style.left = Math.ceil(this.pos + this.layer.width / 2) + 'px'; 
    7490      this.layer.move(Math.round(this.pos - this.layer.width / 2 + 1), this.layer.y); 
     91      if (bw.ie) 
     92        this.p2.style.width = (parseInt(this.p2.parentNode.offsetWidth) - parseInt(this.p2.style.left))+'px'; 
    7593      } 
    7694    }; 
     
    8199  this.onDragStart = function(e) 
    82100    { 
    83     this.p1pos = rcube_get_object_pos(this.p1); 
    84     this.p2pos = rcube_get_object_pos(this.p2); 
    85  
     101    this.p1pos = rcube_get_object_pos(this.p1, this.relative); 
     102    this.p2pos = rcube_get_object_pos(this.p2, this.relative); 
     103    this.drag_active = true; 
     104     
    86105    // start listening to mousemove events 
    87106    rcube_event.add_listener({element:document, event:'mousemove', object:this, method:'onDrag'}); 
     
    107126        var id = iframes[n].id; 
    108127        this.iframe_events[n] = function(e){ e._rc_pos_offset = rcube_get_object_pos(document.getElementById(id)); return s.onDrag(e); } 
     128 
    109129        if (iframedoc.addEventListener) 
    110130          iframedoc.addEventListener('mousemove', this.iframe_events[n], false); 
     
    125145    { 
    126146    var pos = rcube_event.get_mouse_pos(e); 
     147 
     148    if (!this.drag_active) return false; 
     149 
    127150    if (e._rc_pos_offset) 
    128151      { 
     
    131154      } 
    132155 
     156    if (this.relative) 
     157      { 
     158      var parent = rcube_get_object_pos(this.p1.parentNode); 
     159      pos.x -= parent.x; 
     160      pos.y -= parent.y; 
     161      } 
     162 
    133163    if (this.horizontal) 
    134164      { 
     
    148178      } 
    149179 
    150     this.p1pos = rcube_get_object_pos(this.p1); 
    151     this.p2pos = rcube_get_object_pos(this.p2); 
     180    this.p1pos = rcube_get_object_pos(this.p1, this.relative); 
     181    this.p2pos = rcube_get_object_pos(this.p2, this.relative); 
    152182    return false; 
    153183    }; 
     
    161191    rcube_event.remove_listener({element:document, event:'mousemove', object:this, method:'onDrag'}); 
    162192    rcube_event.remove_listener({element:document, event:'mouseup', object:this, method:'onDragStop'}); 
     193    this.drag_active = false; 
     194 
    163195    var iframes = document.getElementsByTagName('IFRAME'); 
    164196 
     
    177209          if (iframedoc.removeEventListener) 
    178210            iframedoc.removeEventListener('mousemove', this.iframe_events[n], false); 
    179           else if (iframedoc.detachEvent) 
     211          else if (iframedoc.detachEvent) 
    180212            iframedoc.detachEvent('onmousemove', this.iframe_events[n]); 
    181213          else 
    182214            iframedoc['onmousemove'] = null; 
    183         } 
     215          } 
    184216 
    185217        rcube_event.remove_listener({element:iframedoc, event:'mouseup', object:this, method:'onDragStop'}); 
     
    187219      } 
    188220 
     221    this.set_cookie(); 
     222 
     223    return bw.safari ? true : rcube_event.cancel(e); 
     224    }; 
     225  /** 
     226   * Handler for window resize events 
     227   */ 
     228  this.onResize = function(e) 
     229    { 
     230    if (this.horizontal) 
     231      this.p2.style.height = (parseInt(this.p2.parentNode.offsetHeight) - parseInt(this.p2.style.top))+'px'; 
     232    else 
     233      this.p2.style.width = (parseInt(this.p2.parentNode.offsetWidth) - parseInt(this.p2.style.left))+'px'; 
     234    }; 
     235 
     236  this.set_cookie = function() 
     237    { 
    189238    // save state in cookie 
    190239    var exp = new Date(); 
    191240    exp.setYear(exp.getFullYear() + 1); 
    192241    bw.set_cookie(this.id, 'pos='+this.pos, exp); 
    193  
    194     // Firefox 3 will initiate its built in drag-and-drop on the divider  
    195     // widget if it already has focus when a second drag event starts  
    196     this.p1.focus(); 
    197     this.p1.blur(); 
    198  
    199     return bw.safari ? true : rcube_event.cancel(e); 
    200     }; 
    201  
    202   /** 
    203    * Handler for window resize events 
    204    */ 
    205   this.onResize = function(e) 
    206     { 
    207     this.p1pos = rcube_get_object_pos(this.p1); 
    208     this.p2pos = rcube_get_object_pos(this.p2); 
    209     var height = this.horizontal ? this.p2pos.y - this.p1pos.y - this.p1.offsetHeight : this.p1.offsetHeight; 
    210     var width = this.horizontal ? this.p1.offsetWidth : this.p2pos.x - this.p1pos.x - this.p1.offsetWidth; 
    211     this.layer.resize(width, height); 
    212     }; 
     242    } 
    213243 
    214244  }  // end class rcube_splitter 
  • trunk/roundcubemail/skins/default/templates/addressbook.html

    r1737 r1766  
    2525 
    2626<roundcube:if condition="config:ldap_public" /> 
     27 
    2728<div id="directorylist"> 
    2829<div id="groups-title"><roundcube:label name="groups" /></div> 
     
    3132 
    3233<roundcube:else /> 
     34 
    3335<style type="text/css"> 
    34 #addresslist { left:20px; width:440px } 
    35 #contacts-box { left:475px } 
    36 #abookcountbar { left:20px } 
     36#abookcountbar { left: 20px;} 
     37#mainscreen { left:20px; /* IE hack */ width:expression((parseInt(document.documentElement.clientWidth)-40)+'px') } 
     38#addresslist { width:245px } 
     39#contacts-box { left:255px; /* IE hack */ width:expression((parseInt(mainscreen.offsetWidth)-255)+'px') } 
    3740</style> 
    3841 
    3942<roundcube:endif /> 
     43 
     44<div id="mainscreen"> 
    4045 
    4146<div id="addresslist"> 
     
    4449 
    4550<script type="text/javascript"> 
    46   var addrviewsplit = new rcube_splitter({id:'addressviewsplitter', p1: 'addresslist', p2: 'contacts-box', orientation: 'v'}); 
     51  var addrviewsplit = new rcube_splitter({id:'addressviewsplitter', p1: 'addresslist', p2: 'contacts-box', orientation: 'v', relative: true, start: 250}); 
    4752  rcmail.add_onload('addrviewsplit.init()'); 
    4853</script> 
     
    5055<div id="contacts-box"> 
    5156<roundcube:object name="addressframe" id="contact-frame" width="100%" height="100%" frameborder="0" src="/watermark.html" /> 
     57</div> 
     58 
    5259</div> 
    5360 
  • trunk/roundcubemail/skins/default/templates/mail.html

    r1623 r1766  
    4848<roundcube:include file="/includes/header.html" /> 
    4949 
     50<div id="mainscreen"> 
     51 
    5052<div id="mailboxlist-container"> 
    5153<h3 id="mailboxlist-header"><roundcube:label name="mailboxlist" /></h3> 
     
    5355</div> 
    5456 
    55 <div id="mailboxcontrols"> 
    56 <roundcube:label name="folder" />:&nbsp; 
    57 <roundcube:button command="expunge" label="compact" classAct="active" />&nbsp; 
    58 <roundcube:button command="purge" label="empty" classAct="active" />&nbsp; 
    59 </div> 
     57<script type="text/javascript"> 
     58  var mailviewsplitv = new rcube_splitter({id:'mailviewsplitterv', p1: 'mailboxlist-container', p2: 'mailrightcontainer', orientation: 'v', relative: true, start: 165}); 
     59  rcmail.add_onload('mailviewsplitv.init()'); 
     60</script> 
    6061 
     62<div id="mailrightcontainer"> 
    6163 
    6264<div id="mailcontframe"> 
     
    7577 
    7678<roundcube:if condition="config:preview_pane == true" /> 
     79 
    7780<script type="text/javascript"> 
    78   var mailviewsplit = new rcube_splitter({id:'mailviewsplitter', p1: 'mailcontframe', p2: 'mailpreviewframe', orientation: 'h'}); 
     81  var mailviewsplit = new rcube_splitter({id:'mailviewsplitter', p1: 'mailcontframe', p2: 'mailpreviewframe', orientation: 'h', relative: true, start: 200}); 
    7982  rcmail.add_onload('mailviewsplit.init()'); 
    8083</script> 
     84 
    8185<div id="mailpreviewframe"> 
    8286<roundcube:object name="messagecontentframe" id="messagecontframe" width="100%" height="100%" frameborder="0" src="/watermark.html" /> 
     
    8488 
    8589<style type="text/css"> 
    86 #mailcontframe { 
    87   bottom: auto; 
    88   height: 208px; 
    89 } 
     90#mailcontframe { height: 195px; } 
    9091</style> 
     92 
    9193<roundcube:endif /> 
     94 
     95</div> 
     96 
     97</div> 
     98 
     99<div id="mailboxcontrols"> 
     100<roundcube:label name="folder" />:&nbsp; 
     101<roundcube:button command="expunge" label="compact" classAct="active" />&nbsp; 
     102<roundcube:button command="purge" label="empty" classAct="active" />&nbsp; 
     103</div> 
     104 
    92105 
    93106<div id="listcontrols"> 
     
    99112<roundcube:label name="quota" />: <roundcube:object name="quotaDisplay" display="image" width="120" id="quotadisplay" /> 
    100113<roundcube:endif /> 
     114</div> 
     115 
     116<div id="messagecountbar"> 
     117<roundcube:button command="firstpage" imageSel="/images/buttons/first_sel.png" imageAct="/images/buttons/first_act.png" imagePas="/images/buttons/first_pas.png" width="11" height="11" title="firstmessages" /> 
     118<roundcube:button command="previouspage" imageSel="/images/buttons/previous_sel.png" imageAct="/images/buttons/previous_act.png" imagePas="/images/buttons/previous_pas.png" width="11" height="11" title="previousmessages" /> 
     119&nbsp;<roundcube:object name="messageCountDisplay" />&nbsp; 
     120<roundcube:button command="nextpage" imageSel="/images/buttons/next_sel.png" imageAct="/images/buttons/next_act.png" imagePas="/images/buttons/next_pas.png" width="11" height="11" title="nextmessages" /> 
     121<roundcube:button command="lastpage" imageSel="/images/buttons/last_sel.png" imageAct="/images/buttons/last_act.png" imagePas="/images/buttons/last_pas.png" width="11" height="11" title="lastmessages" /> 
    101122</div> 
    102123 
     
    125146</div> 
    126147 
    127 <div id="messagecountbar"> 
    128 <roundcube:button command="firstpage" imageSel="/images/buttons/first_sel.png" imageAct="/images/buttons/first_act.png" imagePas="/images/buttons/first_pas.png" width="11" height="11" title="firstmessages" /> 
    129 <roundcube:button command="previouspage" imageSel="/images/buttons/previous_sel.png" imageAct="/images/buttons/previous_act.png" imagePas="/images/buttons/previous_pas.png" width="11" height="11" title="previousmessages" /> 
    130 &nbsp;<roundcube:object name="messageCountDisplay" />&nbsp; 
    131 <roundcube:button command="nextpage" imageSel="/images/buttons/next_sel.png" imageAct="/images/buttons/next_act.png" imagePas="/images/buttons/next_pas.png" width="11" height="11" title="nextmessages" /> 
    132 <roundcube:button command="lastpage" imageSel="/images/buttons/last_sel.png" imageAct="/images/buttons/last_act.png" imagePas="/images/buttons/last_pas.png" width="11" height="11" title="lastmessages" /> 
    133 </div> 
    134  
    135148<script type="text/javascript"> 
    136149 
  • trunk/roundcubemail/skins/default/templates/message.html

    r1739 r1766  
    55<roundcube:include file="/includes/links.html" /> 
    66<link rel="stylesheet" type="text/css" href="/mail.css" /> 
     7<script type="text/javascript" src="/splitter.js"></script> 
    78</head> 
    89<body> 
     
    3132</div> 
    3233 
     34<div id="mainscreen"> 
     35 
    3336<div id="mailboxlist-container"> 
    3437<div id="mailboxlist-header"><roundcube:label name="mailboxlist" /></div> 
     
    4649</div> 
    4750 
     51</div> 
     52 
     53<script type="text/javascript"> 
     54    var mailviewsplitv = new rcube_splitter({id:'mailviewsplitterv', p1: 'mailboxlist-container', p2: 'messageframe', orientation: 'v', relative: true, start: 165}); 
     55    rcmail.add_onload('mailviewsplitv.init()'); 
     56</script> 
     57 
    4858</body> 
    4959</html> 
Note: See TracChangeset for help on using the changeset viewer.