Changeset 1766 in subversion
- Timestamp:
- Sep 12, 2008 8:13:13 AM (5 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 3 added
- 15 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/rcube_imap.php (modified) (1 diff)
-
program/include/rcube_template.php (modified) (1 diff)
-
program/js/app.js (modified) (5 diffs)
-
program/js/common.js (modified) (5 diffs)
-
program/localization/en_GB/labels.inc (modified) (1 diff)
-
program/localization/en_US/labels.inc (modified) (1 diff)
-
program/steps/mail/func.inc (modified) (2 diffs)
-
program/steps/mail/headers.inc (added)
-
skins/default/addresses.css (modified) (4 diffs)
-
skins/default/common.css (modified) (3 diffs)
-
skins/default/images/icons/down_small.gif (added)
-
skins/default/images/icons/up_small.gif (added)
-
skins/default/mail.css (modified) (8 diffs)
-
skins/default/splitter.js (modified) (13 diffs)
-
skins/default/templates/addressbook.html (modified) (4 diffs)
-
skins/default/templates/mail.html (modified) (6 diffs)
-
skins/default/templates/message.html (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r1765 r1766 1 1 CHANGELOG RoundCube Webmail 2 2 --------------------------- 3 4 2008/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) 3 9 4 10 2008/09/12 (thomasb) -
trunk/roundcubemail/program/include/rcube_imap.php
r1759 r1766 1371 1371 1372 1372 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; 1373 1390 } 1374 1391 -
trunk/roundcubemail/program/include/rcube_template.php
r1750 r1766 321 321 // add debug console 322 322 if ($this->config['debug_level'] & 8) { 323 $this->add_footer('<div style="position:absolute;top:5px;left:5px;width:40 0px;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"> 324 324 <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>' 326 326 ); 327 327 } -
trunk/roundcubemail/program/js/app.js
r1763 r1766 160 160 if (this.env.action=='show' || this.env.action=='preview') 161 161 { 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); 163 163 if (this.env.next_uid) 164 164 { … … 511 511 } 512 512 513 514 513 // process command 515 514 switch (command) … … 552 551 this.enable_command('add', (this.env.address_sources && !this.env.address_sources[props].readonly)); 553 552 } 553 break; 554 555 556 case 'load-headers': 557 this.load_headers(obj); 554 558 break; 555 559 … … 3655 3659 3656 3660 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 3657 3709 3658 3710 /********************************************************/ … … 3761 3813 3762 3814 if (request_obj.__lock) 3763 this.set_busy(false);3815 this.set_busy(false); 3764 3816 3765 3817 console.log(request_obj.get_text()); -
trunk/roundcubemail/program/js/common.js
r1763 r1766 254 254 255 255 obj = document.createElement('DIV'); 256 256 257 with(obj) 257 258 { … … 259 260 with(style) 260 261 { 261 position = 'absolute';262 position = 'absolute'; 262 263 visibility = (vis) ? (vis==2) ? 'inherit' : 'visible' : 'hidden'; 263 264 left = l+'px'; 264 265 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'; 267 270 if(z) zIndex = z; 268 }271 } 269 272 } 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); 273 278 274 279 this.elm = obj; … … 497 502 498 503 // return the absolute position of an object within the document 499 function rcube_get_object_pos(obj )504 function rcube_get_object_pos(obj, relative) 500 505 { 501 506 if(typeof(obj)=='string') … … 507 512 var iY = (bw.layers) ? obj.y : obj.offsetTop; 508 513 509 if( bw.ie || bw.mz)514 if(!relative && (bw.ie || bw.mz)) 510 515 { 511 516 var elm = obj.offsetParent; … … 599 604 { 600 605 box = rcube_find_object('console'); 606 601 607 if (box) 602 if (msg [msg.length-1]=='\n')608 if (msg.charAt(msg.length-1)=='\n') 603 609 box.value += msg+'--------------------------------------\n'; 604 610 else -
trunk/roundcubemail/program/localization/en_GB/labels.inc
r1373 r1766 129 129 $labels['compose'] = 'Compose a message'; 130 130 $labels['savemessage'] = 'Save this draft'; 131 $labels['sendmessage'] = 'Send the messagenow';131 $labels['sendmessage'] = 'Send now'; 132 132 $labels['addattachment'] = 'Attach a file'; 133 133 $labels['charset'] = 'Charset'; -
trunk/roundcubemail/program/localization/en_US/labels.inc
r1741 r1766 165 165 $labels['compose'] = 'Compose a message'; 166 166 $labels['savemessage'] = 'Save this draft'; 167 $labels['sendmessage'] = 'Send the messagenow';167 $labels['sendmessage'] = 'Send now'; 168 168 $labels['addattachment'] = 'Attach a file'; 169 169 $labels['charset'] = 'Charset'; -
trunk/roundcubemail/program/steps/mail/func.inc
r1751 r1766 741 741 // show these headers 742 742 $standard_headers = array('subject', 'from', 'organization', 'to', 'cc', 'bcc', 'replyto', 'date'); 743 743 744 744 foreach ($standard_headers as $hkey) 745 745 { … … 772 772 } 773 773 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 774 782 $out .= "\n</table>\n\n"; 775 783 -
trunk/roundcubemail/skins/default/addresses.css
r1763 r1766 1 1 /***** RoundCube|Mail address book task styles *****/ 2 3 2 4 3 #abooktoolbar … … 19 18 position: absolute; 20 19 bottom: 16px; 21 left: 1 85px;20 left: 190px; 22 21 width: 240px; 23 22 height: 20px; … … 31 30 } 32 31 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 34 45 { 35 46 position: absolute; 36 47 top: 85px; 37 48 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 #directorylist46 {47 49 left: 20px; 48 50 width: 170px; 51 border: 1px solid #999999; 52 background-color: #F9F9F9; 49 53 overflow: hidden; 54 /* css hack for IE */ 55 height: expression((parseInt(document.documentElement.clientHeight)-125)+'px'); 50 56 } 51 57 52 58 #addresslist 53 59 { 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; 55 88 width: 340px; 56 }57 58 #importbox59 {60 left: 20px;61 right: 40px;62 height: auto;63 bottom: auto;64 padding-bottom: 4ex;65 89 } 66 90 … … 130 154 { 131 155 position: absolute; 132 top: 85px;156 top: 0px; 133 157 left: 555px; 134 right: 20px;135 bottom: 40px;158 right: 0px; 159 bottom: 0px; 136 160 border: 1px solid #999999; 137 161 overflow: hidden; 138 162 /* 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 } 155 166 156 167 body.iframe, -
trunk/roundcubemail/skins/default/common.css
r1716 r1766 195 195 z-index: 5000; 196 196 opacity: 0.85; 197 /* IE */ 198 filter: alpha(opacity=85); 197 199 } 198 200 … … 238 240 .splitter 239 241 { 240 position: absolute; 241 padding: 2px; 242 user-select: none; 243 -moz-user-select: none; 244 -khtml-user-select: none; 245 position: absolute; 242 246 background: url(images/dimple.png) center no-repeat; 243 247 } … … 252 256 { 253 257 cursor: e-resize; 254 background-position: 1px center;258 background-position: 2px center; 255 259 } 256 260 -
trunk/roundcubemail/skins/default/mail.css
r1763 r1766 147 147 } 148 148 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 149 173 #messagepartcontainer 150 174 { … … 162 186 { 163 187 position: absolute; 164 top: 85px; 165 left: 200px; 166 right: 20px; 167 bottom: 40px; 188 width: 100%; 189 top: 0px; 190 bottom: 0px; 168 191 border: 1px solid #999999; 169 192 background-color: #F9F9F9; 170 193 overflow: auto; 171 194 /* 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'); 174 196 } 175 197 … … 177 199 { 178 200 position: absolute; 179 top: 305px; 180 left: 200px; 181 right: 20px; 182 bottom: 40px; 201 width: 100%; 202 top: 205px; 203 bottom: 0px; 183 204 border: 1px solid #999999; 184 205 background-color: #F9F9F9; 185 206 /* 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'); 188 208 } 189 209 190 210 #messagecontframe 191 211 { 192 position: absolute;212 position: relative; 193 213 top: 0px; 194 214 left: 0px; 195 215 right: 0px; 196 216 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%; 200 219 } 201 220 … … 254 273 { 255 274 position: absolute; 256 top: 85px;257 left: 20px;258 width: 1 70px;259 bottom: 40px;275 top: 0px; 276 left: 0px; 277 width: 160px; 278 bottom: 0px; 260 279 border: 1px solid #999; 261 280 background-color: #F9F9F9; 262 281 overflow: auto; 263 282 /* css hack for IE */ 264 height: expression( (parseInt(document.documentElement.clientHeight)-125)+'px');283 height: expression(parseInt(this.parentNode.offsetHeight)+'px'); 265 284 } 266 285 … … 600 619 { 601 620 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; 606 625 border: 1px solid #999; 607 626 background-color: #FFF; 608 627 overflow: auto; 609 628 /* css hack for IE */ 610 /* margin-bottom: 10px; */611 629 width: expression((parseInt(document.documentElement.clientWidth)-220)+'px'); 612 630 height: expression((parseInt(document.documentElement.clientHeight)-125)+'px'); … … 642 660 table.headers-table td.header-title 643 661 { 644 width: 8 0px;662 width: 85px; 645 663 color: #666666; 646 664 font-weight: bold; … … 652 670 table.headers-table tr td.subject 653 671 { 654 width: 9 5%;672 width: 90%; 655 673 font-weight: bold; 674 } 675 676 table.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; 656 684 } 657 685 … … 950 978 margin-top: 4px; 951 979 } 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 1019 font.bold 1020 { 1021 font-weight: bold; 1022 } -
trunk/roundcubemail/skins/default/splitter.js
r1643 r1766 12 12 this.orientation = attrib.orientation; 13 13 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; 17 18 18 19 this.init = function() … … 20 21 this.p1 = document.getElementById(this.p1id); 21 22 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); 22 27 23 // create and position the handle for this splitter24 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 else34 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 } 35 40 36 41 this.elm = this.layer.elm; 37 42 this.elm.className = 'splitter '+(this.horizontal ? 'splitter-h' : 'splitter-v'); 43 this.elm.unselectable = 'on'; 38 44 39 45 // add the mouse event listeners 40 46 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'}); 42 49 43 50 // read saved position from cookie … … 46 53 { 47 54 var param = cookie.split(':'); 55 48 56 for (var i=0, p; i<param.length; i++) 49 57 { … … 54 62 this.resize(); 55 63 } 64 else if (this.pos) 65 { 66 this.resize(); 67 this.set_cookie(); 68 } 56 69 }; 57 70 … … 62 75 this.resize = function() 63 76 { 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'; 74 90 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'; 75 93 } 76 94 }; … … 81 99 this.onDragStart = function(e) 82 100 { 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 86 105 // start listening to mousemove events 87 106 rcube_event.add_listener({element:document, event:'mousemove', object:this, method:'onDrag'}); … … 107 126 var id = iframes[n].id; 108 127 this.iframe_events[n] = function(e){ e._rc_pos_offset = rcube_get_object_pos(document.getElementById(id)); return s.onDrag(e); } 128 109 129 if (iframedoc.addEventListener) 110 130 iframedoc.addEventListener('mousemove', this.iframe_events[n], false); … … 125 145 { 126 146 var pos = rcube_event.get_mouse_pos(e); 147 148 if (!this.drag_active) return false; 149 127 150 if (e._rc_pos_offset) 128 151 { … … 131 154 } 132 155 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 133 163 if (this.horizontal) 134 164 { … … 148 178 } 149 179 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); 152 182 return false; 153 183 }; … … 161 191 rcube_event.remove_listener({element:document, event:'mousemove', object:this, method:'onDrag'}); 162 192 rcube_event.remove_listener({element:document, event:'mouseup', object:this, method:'onDragStop'}); 193 this.drag_active = false; 194 163 195 var iframes = document.getElementsByTagName('IFRAME'); 164 196 … … 177 209 if (iframedoc.removeEventListener) 178 210 iframedoc.removeEventListener('mousemove', this.iframe_events[n], false); 179 else if (iframedoc.detachEvent)211 else if (iframedoc.detachEvent) 180 212 iframedoc.detachEvent('onmousemove', this.iframe_events[n]); 181 213 else 182 214 iframedoc['onmousemove'] = null; 183 }215 } 184 216 185 217 rcube_event.remove_listener({element:iframedoc, event:'mouseup', object:this, method:'onDragStop'}); … … 187 219 } 188 220 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 { 189 238 // save state in cookie 190 239 var exp = new Date(); 191 240 exp.setYear(exp.getFullYear() + 1); 192 241 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 } 213 243 214 244 } // end class rcube_splitter -
trunk/roundcubemail/skins/default/templates/addressbook.html
r1737 r1766 25 25 26 26 <roundcube:if condition="config:ldap_public" /> 27 27 28 <div id="directorylist"> 28 29 <div id="groups-title"><roundcube:label name="groups" /></div> … … 31 32 32 33 <roundcube:else /> 34 33 35 <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') } 37 40 </style> 38 41 39 42 <roundcube:endif /> 43 44 <div id="mainscreen"> 40 45 41 46 <div id="addresslist"> … … 44 49 45 50 <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}); 47 52 rcmail.add_onload('addrviewsplit.init()'); 48 53 </script> … … 50 55 <div id="contacts-box"> 51 56 <roundcube:object name="addressframe" id="contact-frame" width="100%" height="100%" frameborder="0" src="/watermark.html" /> 57 </div> 58 52 59 </div> 53 60 -
trunk/roundcubemail/skins/default/templates/mail.html
r1623 r1766 48 48 <roundcube:include file="/includes/header.html" /> 49 49 50 <div id="mainscreen"> 51 50 52 <div id="mailboxlist-container"> 51 53 <h3 id="mailboxlist-header"><roundcube:label name="mailboxlist" /></h3> … … 53 55 </div> 54 56 55 <div id="mailboxcontrols"> 56 <roundcube:label name="folder" />: 57 <roundcube:button command="expunge" label="compact" classAct="active" /> 58 <roundcube:button command="purge" label="empty" classAct="active" /> 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> 60 61 62 <div id="mailrightcontainer"> 61 63 62 64 <div id="mailcontframe"> … … 75 77 76 78 <roundcube:if condition="config:preview_pane == true" /> 79 77 80 <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}); 79 82 rcmail.add_onload('mailviewsplit.init()'); 80 83 </script> 84 81 85 <div id="mailpreviewframe"> 82 86 <roundcube:object name="messagecontentframe" id="messagecontframe" width="100%" height="100%" frameborder="0" src="/watermark.html" /> … … 84 88 85 89 <style type="text/css"> 86 #mailcontframe { 87 bottom: auto; 88 height: 208px; 89 } 90 #mailcontframe { height: 195px; } 90 91 </style> 92 91 93 <roundcube:endif /> 94 95 </div> 96 97 </div> 98 99 <div id="mailboxcontrols"> 100 <roundcube:label name="folder" />: 101 <roundcube:button command="expunge" label="compact" classAct="active" /> 102 <roundcube:button command="purge" label="empty" classAct="active" /> 103 </div> 104 92 105 93 106 <div id="listcontrols"> … … 99 112 <roundcube:label name="quota" />: <roundcube:object name="quotaDisplay" display="image" width="120" id="quotadisplay" /> 100 113 <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 <roundcube:object name="messageCountDisplay" /> 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" /> 101 122 </div> 102 123 … … 125 146 </div> 126 147 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 <roundcube:object name="messageCountDisplay" /> 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 135 148 <script type="text/javascript"> 136 149 -
trunk/roundcubemail/skins/default/templates/message.html
r1739 r1766 5 5 <roundcube:include file="/includes/links.html" /> 6 6 <link rel="stylesheet" type="text/css" href="/mail.css" /> 7 <script type="text/javascript" src="/splitter.js"></script> 7 8 </head> 8 9 <body> … … 31 32 </div> 32 33 34 <div id="mainscreen"> 35 33 36 <div id="mailboxlist-container"> 34 37 <div id="mailboxlist-header"><roundcube:label name="mailboxlist" /></div> … … 46 49 </div> 47 50 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 48 58 </body> 49 59 </html>
Note: See TracChangeset
for help on using the changeset viewer.
