Changeset 5619 in subversion
- Timestamp:
- Dec 15, 2011 3:32:46 PM (17 months ago)
- Location:
- trunk/roundcubemail/skins/larry
- Files:
-
- 9 edited
-
mail.css (modified) (2 diffs)
-
settings.css (modified) (4 diffs)
-
styles.css (modified) (3 diffs)
-
templates/folders.html (modified) (2 diffs)
-
templates/identities.html (modified) (2 diffs)
-
templates/identityedit.html (modified) (2 diffs)
-
templates/mail.html (modified) (1 diff)
-
templates/settings.html (modified) (2 diffs)
-
ui.js (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/skins/larry/mail.css
r5617 r5619 24 24 position: absolute; 25 25 top: 0; 26 left: 25 0px;26 left: 252px; 27 27 right: 0; 28 28 bottom: 0; … … 43 43 width: 100%; 44 44 height: 26px; 45 } 46 47 #mailviewsplitter { 48 right: 30px; 49 width: 30px; 50 left: auto !important; 45 51 } 46 52 -
trunk/roundcubemail/skins/larry/settings.css
r5617 r5619 21 21 } 22 22 23 #settings-right { 24 position: absolute; 25 top: 0; 26 left: 232px; 27 right: 0; 28 bottom: 0; 29 } 30 23 31 #sectionslist { 24 32 position: absolute; 25 33 top: 0; 26 left: 230px;34 left: 0; 27 35 width: 260px; 28 36 bottom: 0; … … 32 40 position: absolute; 33 41 top: 0; 34 left: 500px;42 left: 270px; 35 43 right: 0; 36 44 bottom: 0; … … 150 158 position: absolute; 151 159 top: 0; 152 left: 230px;160 left: 0; 153 161 width: 300px; 154 162 bottom: 0; … … 159 167 position: absolute; 160 168 top: 0; 161 left: 540px;169 left: 310px; 162 170 right: 0; 163 171 bottom: 0; -
trunk/roundcubemail/skins/larry/styles.css
r5617 r5619 270 270 text-indent: -1000px; 271 271 background: url(images/buttons.png) -1000px 0 no-repeat; 272 } 273 274 a.iconbutton.disabled { 275 opacity: 0.4; 276 cursor: default; 272 277 } 273 278 … … 541 546 text-shadow: 1px 1px 1px #fff; 542 547 border-bottom: 1px solid #bbd3da; 548 white-space: nowrap; 543 549 } 544 550 … … 1041 1047 } 1042 1048 1049 .splitter { 1050 user-select: none; 1051 -moz-user-select: none; 1052 -khtml-user-select: none; 1053 position: absolute; 1054 background: url(images/splitter.png) center no-repeat; 1055 } 1056 1057 .splitter-h { 1058 height: 10px; 1059 width: 100%; 1060 cursor: n-resize; 1061 cursor: row-resize; 1062 background-position: center 0; 1063 } 1064 1065 .splitter-v { 1066 width: 10px; 1067 height: 100%; 1068 cursor: e-resize; 1069 cursor: col-resize; 1070 background-position: 0 center; 1071 } 1043 1072 1044 1073 #rcmdraglayer { -
trunk/roundcubemail/skins/larry/templates/folders.html
r5617 r5619 12 12 13 13 <roundcube:include file="/includes/settingstabs.html" /> 14 15 <div id="settings-right"> 14 16 15 17 <div id="folderslist" class="uibox listbox"> … … 30 32 </div> 31 33 34 </div> 35 32 36 <div id="mailboxmenu" class="popupmenu"> 33 37 <ul class="toolbarmenu" id="mailboxoptionsmenu"> -
trunk/roundcubemail/skins/larry/templates/identities.html
r5605 r5619 13 13 <roundcube:include file="/includes/settingstabs.html" /> 14 14 15 <div id="settings-right"> 16 15 17 <div id="identitieslist" class="uibox listbox"> 16 18 <h2 class="boxtitle"><roundcube:label name="identities" /></h2> … … 29 31 </div> 30 32 33 </div> 34 31 35 <roundcube:include file="/includes/footer.html" /> 32 36 -
trunk/roundcubemail/skins/larry/templates/identityedit.html
r5617 r5619 12 12 13 13 <roundcube:include file="/includes/settingstabs.html" /> 14 15 <div id="settings-right"> 14 16 15 17 <div id="identitieslist" class="uibox listbox"> … … 40 42 </div> 41 43 44 </div> 45 42 46 <roundcube:include file="/includes/footer.html" /> 43 47 -
trunk/roundcubemail/skins/larry/templates/mail.html
r5617 r5619 65 65 <div id="messagelistfooter"> 66 66 <div id="listcontrols"> 67 <a href="#list" class="iconbutton listmode" id="maillistmode" title="<roundcube:label name='list' />">List</a> 68 <a href="#threads" class="iconbutton threadmode" id="mailthreadmode" title="<roundcube:label name='threads' />">Threads</a> 67 <roundcube:if condition="env:threads" /> 68 <a href="#list" class="iconbutton listmode" id="maillistmode" title="<roundcube:label name='list' />">List</a> 69 <a href="#threads" class="iconbutton threadmode" id="mailthreadmode" title="<roundcube:label name='threads' />">Threads</a> 70 <roundcube:else /> 71 <a href="#list" class="iconbutton listmode selected" title="<roundcube:label name='list' />" onclick="return false">List</a> 72 <a href="#threads" class="iconbutton threadmode disabled" title="<roundcube:label name='threads' />" onclick="return false">Threads</a> 73 <roundcube:endif /> 69 74 </div> 70 75 -
trunk/roundcubemail/skins/larry/templates/settings.html
r5595 r5619 13 13 <roundcube:include file="/includes/settingstabs.html" /> 14 14 15 <div id="settings-right"> 16 15 17 <div id="sectionslist" class="uibox listbox"> 16 18 <div class="scroller"> … … 26 28 </div> 27 29 30 </div> 31 28 32 <roundcube:include file="/includes/footer.html" /> 29 33 -
trunk/roundcubemail/skins/larry/ui.js
r5617 r5619 21 21 22 22 var me = this; 23 var mailviewsplit; 23 24 24 25 // export public methods … … 33 34 { 34 35 if (rcmail.env.task == 'mail') { 36 rcmail.gui_object('message_dragmenu', 'dragmessagemenu'); 35 37 rcmail.addEventListener('menu-open', function(){ show_popup('listoptions'); }); 36 38 rcmail.addEventListener('menu-save', save_listoptions); 37 39 // rcmail.addEventListener('aftersend-attachment', 'uploadmenu', rcmail_ui); 38 40 // rcmail.addEventListener('aftertoggle-editor', 'resize_compose_body_ev', rcmail_ui); 39 rcmail.gui_object('message_dragmenu', 'dragmessagemenu'); 40 $('#mailpreviewtoggle').addClass($('#mailpreviewframe').is(':visible') ? 'enabled' : 'closed').click(function(e){ toggle_preview_pane(e); return false }); 41 42 var previewframe = $('#mailpreviewframe').is(':visible'); 43 $('#mailpreviewtoggle').addClass(previewframe ? 'enabled' : 'closed').click(function(e){ toggle_preview_pane(e); return false }); 41 44 $('#maillistmode').addClass(rcmail.env.threading ? '' : 'selected').click(function(e){ switch_view_mode('list'); return false }); 42 45 $('#mailthreadmode').addClass(rcmail.env.threading ? 'selected' : '').click(function(e){ switch_view_mode('thread'); return false }); 43 46 44 47 if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') { 45 48 layout_messageview(); 49 } 50 else if (rcmail.env.action == 'list' || !rcmail.env.action) { 51 mailviewsplit = new rcube_splitter({ id:'mailviewsplitter', p1:'#mailview-top', p2:'#mailview-bottom', 52 orientation:'h', relative:true, start:310, min:150, size:0, offset:-22 }); 53 if (previewframe) 54 mailviewsplit.init(); 55 } 56 57 if ($('#mailview-left').length) { 58 new rcube_splitter({ id:'mailviewsplitterv', p1:'#mailview-left', p2:'#mailview-right', 59 orientation:'v', relative:true, start:248, min:150, size:12, callback:render_mailboxlist, render:resize_leftcol }).init(); 46 60 } 47 61 } … … 53 67 $(tab).addClass('selected') 54 68 .children().first().removeAttr('onclick').click(function() { return false; }); 69 70 if (rcmail.env.action == 'folders') { 71 new rcube_splitter({ id:'folderviewsplitter', p1:'#folderslist', p2:'#folder-details', 72 orientation:'v', relative:true, start:305, min:150, size:12 }).init(); 73 } 74 else if (rcmail.env.action.indexOf('identit') >= 0) { 75 new rcube_splitter({ id:'identviewsplitter', p1:'#identitieslist', p2:'#identity-details', 76 orientation:'v', relative:true, start:305, min:150, size:12 }).init(); 77 } 55 78 } 56 79 … … 107 130 } 108 131 132 133 function render_mailboxlist(splitter) 134 { 135 } 136 137 138 function resize_leftcol(splitter) 139 { 140 if (splitter) 141 $('#quicksearchbar input').css('width', (splitter.pos - 70) + 'px'); 142 } 143 144 109 145 /** 110 146 * Trigger for popup menus … … 188 224 189 225 226 /** 227 * Show/hide the preview pane 228 */ 190 229 function toggle_preview_pane(e) 191 230 { … … 193 232 frame = $('#mailpreviewframe'), 194 233 visible = !frame.is(':visible'), 195 splitter = parseInt(bw.get_cookie('mailviewsplitter') || 320),234 splitter = mailviewsplit.pos || parseInt(bw.get_cookie('mailviewsplitter') || 320), 196 235 topstyles, bottomstyles, uid; 197 236 … … 200 239 201 240 if (visible) { 202 topstyles = { height:(splitter-38)+'px', bottom:'auto' }; 203 bottomstyles = { top:(splitter+5)+'px', height:'auto' }; 241 $('#mailview-top').css({ bottom:'auto' }); 242 $('#mailview-bottom').css({ height:'auto' }); 243 204 244 rcmail.env.contentframe = 'messagecontframe'; 205 245 if (uid = rcmail.message_list.get_single_selection()) 206 246 rcmail.show_message(uid, false, true); 247 248 // let the splitter set the correct size and position 249 if (mailviewsplit.handle) { 250 mailviewsplit.handle.show(); 251 mailviewsplit.resize(); 252 } 253 else 254 mailviewsplit.init(); 207 255 } 208 256 else { 209 topstyles = { height:'auto', bottom:'28px' };210 bottomstyles = { top:'auto', height:'26px' };211 257 rcmail.env.contentframe = null; 212 258 rcmail.show_contentframe(false); 213 } 214 215 $('#mailview-top').css(topstyles); 216 $('#mailview-bottom').css(bottomstyles); 259 260 $('#mailview-top').css({ height:'auto', bottom:'28px' }); 261 $('#mailview-bottom').css({ top:'auto', height:'26px' }); 262 263 if (mailviewsplit.handle) 264 mailviewsplit.handle.hide(); 265 } 217 266 218 267 if (visible && uid && rcmail.message_list) … … 223 272 224 273 274 /** 275 * 276 */ 225 277 function switch_view_mode(mode) 226 278 { … … 266 318 267 319 320 /** 321 * 322 */ 268 323 function save_listoptions() 269 324 { … … 280 335 281 336 337 /** 338 * 339 */ 282 340 function set_searchmod(elem) 283 341 { … … 326 384 } 327 385 386 387 388 /** 389 * Roundcube splitter GUI class 390 * 391 * @constructor 392 */ 393 function rcube_splitter(p) 394 { 395 this.p = p; 396 this.id = p.id; 397 this.horizontal = (p.orientation == 'horizontal' || p.orientation == 'h'); 398 this.halfsize = (p.size !== undefined ? p.size : 10) / 2; 399 this.pos = p.start || 0; 400 this.min = p.min || 20; 401 this.offset = p.offset || 0; 402 this.relative = p.relative ? true : false; 403 this.drag_active = false; 404 this.render = p.render; 405 this.callback = p.callback; 406 407 var me = this; 408 409 this.init = function() 410 { 411 this.p1 = $(this.p.p1); 412 this.p2 = $(this.p.p2); 413 414 // create and position the handle for this splitter 415 this.p1pos = this.relative ? this.p1.position() : this.p1.offset(); 416 this.p2pos = this.relative ? this.p2.position() : this.p2.offset(); 417 this.handle = $('<div>') 418 .attr('id', this.id) 419 .attr('unselectable', 'on') 420 .addClass('splitter ' + (this.horizontal ? 'splitter-h' : 'splitter-v')) 421 .appendTo(this.p1.parent()) 422 .bind('mousedown', onDragStart); 423 424 if (this.horizontal) { 425 var top = this.p1pos.top + this.p1.outerHeight(); 426 this.handle.css({ left:'0px', top:top+'px' }); 427 } 428 else { 429 var left = this.p1pos.left + this.p1.outerWidth(); 430 this.handle.css({ left:left+'px', top:'0px' }); 431 } 432 433 this.elm = this.handle.get(0); 434 435 // listen to window resize on IE 436 if (bw.ie) 437 $(window).resize(function(e){ onResize(e) }); 438 439 // read saved position from cookie 440 var cookie = bw.get_cookie(this.id); 441 if (cookie && !isNaN(cookie)) { 442 this.pos = parseFloat(cookie); 443 this.resize(); 444 } 445 else if (this.pos) { 446 this.resize(); 447 this.set_cookie(); 448 } 449 }; 450 451 /** 452 * Set size and position of all DOM objects 453 * according to the saved splitter position 454 */ 455 this.resize = function() 456 { 457 if (this.horizontal) { 458 this.p1.css('height', Math.floor(this.pos - this.p1pos.top - this.halfsize) + 'px'); 459 this.p2.css('top', Math.ceil(this.pos + this.halfsize + 2) + 'px'); 460 this.handle.css('top', Math.round(this.pos - this.halfsize + this.offset)+'px'); 461 if (bw.ie) { 462 var new_height = parseInt(this.p2.parent().outerHeight(), 10) - parseInt(this.p2.css('top'), 10) - (bw.ie8 ? 2 : 0); 463 this.p2.css('height') = (new_height > 0 ? new_height : 0) + 'px'; 464 } 465 } 466 else { 467 this.p1.css('width', Math.floor(this.pos - this.p1pos.left - this.halfsize) + 'px'); 468 this.p2.css('left', Math.ceil(this.pos + this.halfsize) + 'px'); 469 this.handle.css('left', Math.round(this.pos - this.halfsize + this.offset + 3)+'px'); 470 if (bw.ie) { 471 var new_width = parseInt(this.p2.parent().outerWidth(), 10) - parseInt(this.p2.css('left'), 10) ; 472 this.p2.css('width', (new_width > 0 ? new_width : 0) + 'px'); 473 } 474 } 475 476 this.p2.resize(); 477 this.p1.resize(); 478 479 if (typeof this.render == 'function') 480 this.render(this); 481 }; 482 483 /** 484 * Handler for mousedown events 485 */ 486 function onDragStart(e) 487 { 488 // disable text selection while dragging the splitter 489 if (bw.konq || bw.chrome || bw.safari) 490 document.body.style.webkitUserSelect = 'none'; 491 492 me.p1pos = me.relative ? me.p1.position() : me.p1.offset(); 493 me.p2pos = me.relative ? me.p2.position() : me.p2.offset(); 494 me.drag_active = true; 495 496 // start listening to mousemove events 497 $(document).bind('mousemove.'+this.id, onDrag).bind('mouseup.'+this.id, onDragStop); 498 499 // enable dragging above iframes 500 $('iframe').each(function() { 501 $('<div class="iframe-splitter-fix"></div>') 502 .css({ background: '#fff', 503 width: this.offsetWidth+'px', height: this.offsetHeight+'px', 504 position: 'absolute', opacity: '0.001', zIndex: 1000 505 }) 506 .css($(this).offset()) 507 .appendTo('body'); 508 }); 509 }; 510 511 /** 512 * Handler for mousemove events 513 */ 514 function onDrag(e) 515 { 516 if (!me.drag_active) 517 return false; 518 519 var pos = rcube_event.get_mouse_pos(e); 520 521 if (me.relative) { 522 var parent = me.p1.parent().offset(); 523 pos.x -= parent.left; 524 pos.y -= parent.top; 525 } 526 527 if (me.horizontal) { 528 if (((pos.y - me.halfsize) > me.p1pos.top) && ((pos.y + me.halfsize) < (me.p2pos.top + me.p2.outerHeight()))) { 529 me.pos = Math.max(me.min, pos.y - me.offset); 530 me.resize(); 531 } 532 } 533 else { 534 if (((pos.x - me.halfsize) > me.p1pos.left) && ((pos.x + me.halfsize) < (me.p2pos.left + me.p2.outerWidth()))) { 535 me.pos = Math.max(me.min, pos.x - me.offset); 536 me.resize(); 537 } 538 } 539 540 me.p1pos = me.relative ? me.p1.position() : me.p1.offset(); 541 me.p2pos = me.relative ? me.p2.position() : me.p2.offset(); 542 return false; 543 }; 544 545 /** 546 * Handler for mouseup events 547 */ 548 function onDragStop(e) 549 { 550 // resume the ability to highlight text 551 if (bw.konq || bw.chrome || bw.safari) 552 document.body.style.webkitUserSelect = 'auto'; 553 554 // cancel the listening for drag events 555 $(document).unbind('.'+me.id); 556 me.drag_active = false; 557 558 // remove temp divs 559 $('div.iframe-splitter-fix').each(function(){ this.parentNode.removeChild(this); }); 560 561 me.set_cookie(); 562 563 if (typeof me.callback == 'function') 564 me.callback(me); 565 566 return bw.safari ? true : rcube_event.cancel(e); 567 }; 568 569 /** 570 * Handler for window resize events 571 */ 572 function onResize(e) 573 { 574 if (me.horizontal) { 575 var new_height = parseInt(me.p2.parent().outerHeight(), 10) - parseInt(me.p2[0].style.top, 10) - (bw.ie8 ? 2 : 0); 576 me.p2.css('height', (new_height > 0 ? new_height : 0) +'px'); 577 } 578 else { 579 var new_width = parseInt(me.p2.parent().outerWidth(), 10) - parseInt(me.p2[0].style.left, 10); 580 me.p2.css('width', (new_width > 0 ? new_width : 0) + 'px'); 581 } 582 }; 583 584 /** 585 * Saves splitter position in cookie 586 */ 587 this.set_cookie = function() 588 { 589 var exp = new Date(); 590 exp.setYear(exp.getFullYear() + 1); 591 bw.set_cookie(this.id, this.pos, exp); 592 }; 593 594 } // end class rcube_splitter 595 596
Note: See TracChangeset
for help on using the changeset viewer.
