Changeset 412 in subversion


Ignore:
Timestamp:
Dec 17, 2006 4:28:37 PM (6 years ago)
Author:
thomasb
Message:

Added patch for resizeable preview pane

Location:
trunk/roundcubemail
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r400 r412  
    11CHANGELOG RoundCube Webmail 
    22--------------------------- 
     3 
     42006/12/17 (thomasb) 
     5---------- 
     6- Added patch by Ryan Rittenhouse & David Glick for a resizeable preview pane 
     7 
    38 
    492006/12/06 (thomasb) 
  • trunk/roundcubemail/program/js/app.js

    r400 r412  
    2727  this.gui_objects = new Object(); 
    2828  this.commands = new Object(); 
     29  this.onloads = new Array(); 
    2930 
    3031  // create public reference to myself 
     
    7879    }; 
    7980 
    80  
    8181  // register a specific gui object 
    8282  this.gui_object = function(name, id) 
     
    8484    this.gui_objects[name] = id; 
    8585    }; 
    86  
     86   
     87  // execute the given script on load 
     88  this.add_onload = function(f) 
     89    { 
     90      this.onloads[this.onloads.length] = f; 
     91    }; 
    8792 
    8893  // initialize webmail client 
     
    102107    for (var n in this.gui_objects) 
    103108      this.gui_objects[n] = rcube_find_object(this.gui_objects[n]); 
    104        
     109 
    105110    // tell parent window that this frame is loaded 
    106111    if (this.env.framed && parent.rcmail && parent.rcmail.set_busy) 
     
    294299    // start keep-alive interval 
    295300    this.start_keepalive(); 
     301     
     302     
     303    // execute all foreign onload scripts 
     304    for (var i=0; i<this.onloads.length; i++) 
     305      { 
     306      if (typeof(this.onloads[i]) == 'string') 
     307        eval(this.onloads[i]); 
     308      else if (typeof(this.onloads[i]) == 'function') 
     309        this.onloads[i](); 
     310      } 
    296311    }; 
    297312 
     
    679694        break; 
    680695 
    681           case 'lastmessage': 
     696      case 'lastmessage': 
    682697        if (this.env.last_uid) 
    683698          this.show_message(this.env.last_uid); 
     
    12101225      this.env.current_page = page; 
    12111226      this.message_list.clear_selection(); 
     1227      this.show_messageframe(false); 
    12121228      } 
    12131229     
     
    13251341      { 
    13261342      var selection = this.message_list.get_selection(); 
    1327       var id; 
    1328       for (var n=0; n<selection.length; n++) 
     1343      for (var n=0, id; n<selection.length; n++) 
    13291344        { 
    13301345        id = selection[n]; 
     
    13331348        } 
    13341349 
    1335       this.message_list.select_next(); 
    1336       } 
    1337        
     1350        this.show_messageframe(false); 
     1351      } 
     1352 
    13381353    var lock = false; 
    13391354 
  • trunk/roundcubemail/program/js/common.js

    r354 r412  
    531531  return {x:iX, y:iY}; 
    532532  } 
     533 
     534 
     535/** 
     536 * Return the currently applied value of a css property 
     537 * 
     538 * @param {Object} html_element  Node reference 
     539 * @param {String} css_property  Property name to read in Javascript notation (eg. 'textAlign') 
     540 * @param {String} mozilla_equivalent  Equivalent property name in CSS notation (eg. 'text-align') 
     541 * @return CSS property value 
     542 * @type String 
     543 */ 
     544function get_elements_computed_style(html_element, css_property, mozilla_equivalent) 
     545  { 
     546  if (arguments.length==2) 
     547    mozilla_equivalent = css_property; 
     548 
     549  var el = html_element; 
     550  if (typeof(html_element)=='string') 
     551    el = nex_get_object(html_element); 
     552 
     553  if (el && el.currentStyle) 
     554    return el.currentStyle[css_property]; 
     555  else if (el && document.defaultView && document.defaultView.getComputedStyle) 
     556    return document.defaultView.getComputedStyle(el, null).getPropertyValue(mozilla_equivalent); 
     557  else 
     558    return false; 
     559  } 
    533560   
    534561 
     
    544571  } 
    545572 
     573roundcube_browser.prototype.set_cookie = setCookie; 
     574 
    546575function getCookie(name) 
    547576  { 
     
    562591  } 
    563592 
     593roundcube_browser.prototype.get_cookie = getCookie; 
     594 
    564595 
    565596var bw = new roundcube_browser(); 
  • trunk/roundcubemail/program/js/list.js

    r375 r412  
    273273 
    274274  var last_selected_row = this.rows[this.last_selected]; 
    275   var new_row = last_selected_row && last_selected_row.obj.nextSibling; 
     275  var new_row = last_selected_row ? last_selected_row.obj.nextSibling : null; 
    276276  while (new_row && (new_row.nodeType != 1 || new_row.style.display == 'none')) 
    277277    new_row = new_row.nextSibling; 
     
    286286 
    287287  var last_selected_row = this.rows[this.last_selected]; 
    288   var new_row = last_selected_row && last_selected_row.obj.previousSibling; 
     288  var new_row = last_selected_row ? last_selected_row.obj.previousSibling : null; 
    289289  while (new_row && (new_row.nodeType != 1 || new_row.style.display == 'none')) 
    290290    new_row = new_row.previousSibling; 
  • trunk/roundcubemail/skins/default/addresses.css

    r282 r412  
    7171  overflow: hidden; 
    7272  /* css hack for IE */ 
    73   width: expression((parseInt(document.documentElement.clientWidth)-530)+'px'); 
     73  width: expression((parseInt(document.documentElement.clientWidth)-80-document.getElementById('addresslist').offsetWidth)+'px'); 
    7474  height: expression((parseInt(document.documentElement.clientHeight)-135)+'px'); 
    7575} 
     76 
     77 
     78#addressviewsplitter 
     79{ 
     80  background-position: 6px center; 
     81} 
     82 
     83#addressviewsplitter .splitterLine 
     84{ 
     85  margin-left: 3px; 
     86  width: 9px; 
     87} 
     88 
    7689 
    7790body.iframe, 
  • trunk/roundcubemail/skins/default/common.css

    r354 r412  
    214214} 
    215215 
     216.splitter 
     217{ 
     218  position: absolute; 
     219  padding: 2px; 
     220  background: url(images/dimple.png) center no-repeat; 
     221} 
     222 
     223.splitter-h 
     224{ 
     225  cursor: n-resize; 
     226  background-position: center 2px; 
     227} 
     228 
     229.splitter-v 
     230{ 
     231  cursor: e-resize; 
     232  background-position: 1px center; 
     233} 
     234 
    216235 
    217236/***** common table settings ******/ 
  • trunk/roundcubemail/skins/default/mail.css

    r406 r412  
    124124{ 
    125125  position: absolute; 
    126   top: 300px; 
     126  top: 305px; 
    127127  left: 200px; 
    128128  right: 40px; 
     
    132132  /* css hack for IE */ 
    133133  width: expression((parseInt(document.documentElement.clientWidth)-240)+'px'); 
    134   height: expression((parseInt(document.documentElement.clientHeight)-340)+'px'); 
     134  height: expression((parseInt(document.documentElement.clientHeight)-135-document.getElementById('mailcontframe').offsetHeight)+'px'); 
    135135} 
    136136 
  • trunk/roundcubemail/skins/default/templates/addressbook.html

    r374 r412  
    55<roundcube:include file="/includes/links.html" /> 
    66<link rel="stylesheet" type="text/css" href="/addresses.css" /> 
     7<script type="text/javascript" src="/splitter.js"></script> 
    78</head> 
    89<body> 
     
    3233</div> 
    3334 
     35<script type="text/javascript"> 
     36  var addrviewsplit = new rcube_splitter({id:'addressviewsplitter', p1: 'addresslist', p2: 'contacts-box', orientation: 'v'}); 
     37  rcmail.add_onload('addrviewsplit.init()'); 
     38</script> 
     39 
    3440<div id="contacts-box"> 
    3541<roundcube:object name="addressframe" id="contact-frame" width="100%" height="100%" frameborder="0" src="/watermark.html" /> 
  • trunk/roundcubemail/skins/default/templates/mail.html

    r388 r412  
    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> 
     
    5657 
    5758<roundcube:if condition="config:preview_pane == true" /> 
     59<script type="text/javascript"> 
     60  var mailviewsplit = new rcube_splitter({id:'mailviewsplitter', p1: 'mailcontframe', p2: 'mailpreviewframe', orientation: 'h'}); 
     61  rcmail.add_onload('mailviewsplit.init()'); 
     62</script> 
    5863<div id="mailpreviewframe"> 
    5964<roundcube:object name="messagecontentframe" id="messagecontframe" width="100%" height="100%" frameborder="0" src="/watermark.html" /> 
     
    6368#mailcontframe { 
    6469  bottom: auto; 
    65   height: 210px; 
     70  height: 208px; 
    6671} 
    6772</style> 
Note: See TracChangeset for help on using the changeset viewer.