From b3bbb281002386f6cedf5b6f007074ecbfc96f5b Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sun, 27 Jan 2013 12:52:53 +0100 Subject: [PATCH] Add addressbook widget on compose page in classic skin --- CHANGELOG | 1 + skins/classic/addressbook.css | 2 +- skins/classic/functions.js | 20 ++- skins/classic/googiespell.css | 1 - skins/classic/ie6hacks.css | 16 ++- skins/classic/iehacks.css | 10 +- skins/classic/images/icons/groupactions.gif | Bin 567 -> 496 bytes skins/classic/images/icons/groupactions.png | Bin 591 -> 1092 bytes skins/classic/mail.css | 147 ++++++++++++++++++-- skins/classic/splitter.js | 9 +- skins/classic/templates/compose.html | 82 +++++++---- 11 files changed, 223 insertions(+), 65 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index e2c61e4a6..16d628501 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Add addressbook widget on compose page in classic skin - Add search box to compose address book widget (#1488381) - Fix login in case when default_host is an array with one element (#1488928) - Use LDAP fallback hosts on connect + bind instead of ldap_connect() only. diff --git a/skins/classic/addressbook.css b/skins/classic/addressbook.css index a398325b4..39d5e5ac9 100644 --- a/skins/classic/addressbook.css +++ b/skins/classic/addressbook.css @@ -21,7 +21,7 @@ width: 32px; height: 32px; padding: 0; - margin-right: 10px; + margin: 0 5px; overflow: hidden; background: url(images/abook_toolbar.png) 0 0 no-repeat transparent; opacity: 0.99; /* this is needed to make buttons appear correctly in Chrome */ diff --git a/skins/classic/functions.js b/skins/classic/functions.js index 1742150f3..cb3e29376 100644 --- a/skins/classic/functions.js +++ b/skins/classic/functions.js @@ -355,7 +355,7 @@ spellmenu: function(show) for (i in rcmail.env.spell_langs) { li = $('
  • '); - link = $('').text(rcmail.env.spell_langs[i]) + link = $('').text(rcmail.env.spell_langs[i]) .addClass('active').data('lang', i) .click(function() { rcmail.spellcheck_lang_set($(this).data('lang')); @@ -491,17 +491,23 @@ init_compose_form: function() div.style.top = (parseInt(headers_div.offsetHeight, 10) + 3) + 'px'; $(window).resize(); + + // contacts search submit + $('#quicksearchbox').keydown(function(e) { + if (rcube_event.get_keycode(e) == 13) + rcmail.command('search'); + }); }, resize_compose_body: function() { - var div = $('#compose-div .boxlistcontent'), w = div.width(), h = div.height(); - w -= 8; // 2 x 3px padding + 2 x 1px border - h -= 4; + var div = $('#compose-div .boxlistcontent'), + w = div.width() - 2, h = div.height(), + x = bw.ie ? 4 : 0; - $('#compose-body_tbl').width((w+6)+'px').height(''); - $('#compose-body_ifr').width((w+6)+'px').height((h-54)+'px'); - $('#compose-body').width(w+'px').height(h+'px'); + $('#compose-body_tbl').width((w+3)+'px').height(''); + $('#compose-body_ifr').width((w+3)+'px').height((h-54)+'px'); + $('#compose-body').width((w-x)+'px').height(h+'px'); $('#googie_edit_layer').height(h+'px'); }, diff --git a/skins/classic/googiespell.css b/skins/classic/googiespell.css index 8adadc256..b4fab5bdb 100644 --- a/skins/classic/googiespell.css +++ b/skins/classic/googiespell.css @@ -12,7 +12,6 @@ padding: 0 4px; font-size: 9pt; font-family: monospace; - border: 1px solid #999; } .googie_edit_layer span { diff --git a/skins/classic/ie6hacks.css b/skins/classic/ie6hacks.css index ac953867a..a431ee45e 100644 --- a/skins/classic/ie6hacks.css +++ b/skins/classic/ie6hacks.css @@ -3,6 +3,7 @@ #taskbar { background: url(images/taskbar.gif) top right no-repeat; + width: expression((parseInt(document.documentElement.clientWidth)-250)+'px'); } img @@ -38,11 +39,6 @@ body > #message div.confirmation, background-image: url(images/icons/folders.gif); } -#attachment-list -{ - height: expression(Math.min(16, parseInt(document.documentElement.clientHeight))+'px'); -} - #messagetoolbar a { display: block; @@ -124,6 +120,11 @@ ul.toolbarmenu li.separator_below height: expression((parseInt(this.parentNode.offsetHeight)-23-parseInt(this.style.top?this.style.top:21))+'px'); } +#compose-body-div +{ + height: expression(parseInt(this.parentNode.offsetHeight)+'px'); +} + #folder-manager { height: expression((parseInt(document.documentElement.clientHeight)-105)+'px'); @@ -176,3 +177,8 @@ body.iframe .boxtitle { zoom: 1; } + +#abookactions a +{ + background-image: url("images/icons/groupactions.gif"); +} diff --git a/skins/classic/iehacks.css b/skins/classic/iehacks.css index c8b9b3740..18555809d 100644 --- a/skins/classic/iehacks.css +++ b/skins/classic/iehacks.css @@ -116,6 +116,7 @@ body.iframe div.messageheaderbox #mailrightcontainer, #compose-container, #compose-attachments, +#compose-contacts, #mailcontframe, #mailboxlist-container, #mailrightcontent, @@ -201,11 +202,6 @@ div.message-part div.pre width: expression((parseInt(document.documentElement.clientWidth)-245)+'px'); } -#contacts-table -{ - width: expression(document.getElementById('addresslist').clientWidth); -} - #contacts-box, #prefs-box, #folder-box @@ -288,8 +284,8 @@ table.records-table thead tr td .contactfieldgroup legend { - padding: 0 0 0.5em 0; - margin-left: -4px; + padding: 0 0 0.5em 0; + margin-left: -4px; } /* fix "jumping" login form in IE7 */ diff --git a/skins/classic/images/icons/groupactions.gif b/skins/classic/images/icons/groupactions.gif index a399d106ea28171ebe08500939cc3e3290fd0815..eba6a6caf1827d65ca2d0719d244ccfcd11c39c5 100644 GIT binary patch delta 474 zcmdna@`1VD-P6s&GEs>kfuTi$0SH`OUEST?y}Z19e0+R;eM3V-!^6X)qod>E;*ye* zl9QA3^71-6JG;BPXU?2CckbLJOO~uyvEtsnd#_)={`Be7moHy_{`~nL2T=UU!pOxS z&!7Xc31laOIqSa%>U}Ah^PYTNkQ2Qs@64g1x$DaOo`02NXPkYWRpe31(R&}oLxdVH ztjNyjikiLo>B~cV8Fo*fcwDKzt-Pb8tEk7O&#I<*k`nW@{u*Xhc|K-7c~<6PHEw1W zc4l@KX70tRqFmE9afzxhY-do*W@h7L77!6&=44x>ykl48CT3xI;nUl8p41Q$+Q=c# z!OV44^-{Hlgvh?roFWowH4C{mzL~X7g_lQ6kXcZShxdcB#MZgcyxI-w1P*L`>>w`d%(a4fk}_w%ZXU}_9YG^i`6{N~!VRt3EZS)t^4EMe7ErNgyc z`|G}}Dh#~omd+pbM`4@x(QSFx4wdelCY5{3qx89$>g?}%&O7T4DqUGEQgHupgEIqz FH2@N;&87eV delta 545 zcmV++0^a@b1GfZ!M@dFFIbk9INC5O70P^$mf`fx$VPWa(>yVL=_V@R0Z*Q8Ln}~{v zQBhGvMMX+VN~fr(;^X67TwKh~&Q4EHNJvQD;NY{gw3nEe#>mLn+S;h7sG_2xXlZHl z^z_x&*GET3@bU4PnVIP7>LLFNSWQqML}7GcSWQp?KL8;}`2+<303QG>00000A^=DL z00sZxCyr!ko+RL*Y+I^s%))Y=u69o6^&Tqrw9vnOY)g3qV3(hUQww1;8(<3193}$Eelvg*|U0CSdGy5($=p1S|C-*)G1V{ jEeQP-ij%0(6E$z<+!>N&X4lkUi<2z^5p6#nLI40eAokTh diff --git a/skins/classic/images/icons/groupactions.png b/skins/classic/images/icons/groupactions.png index 43c34a43838c4b202b92a482b219af985ef745ff..f29a36a0ef1a7b75e7bfb5eee47d4d0c37707103 100644 GIT binary patch delta 1084 zcmV-C1jGB!1jGoC7k^*~1^@s6c-Nq%00001b5ch_0Itp)=>Px#24YJ`L;(K){{a7> zy{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*Z069^*|Zrw=$00YEHL_t(& z-tC!9Xd6cqfIt1zEfs3yqJz}*(1R{11On~NBKk3ip(Bz~HGlY!;(!FsEf@;U$yf%T z0>wp#f_g|Ss88*o4U$-VX>2IH$WREl*B%li=z<&;LFH<@J#-Sb!f_-^vPC-&hFLwm z$9{VA_RX7>$8j9aQ;v>~%3E7oOJ1f#G>8V7C`cxgaWa{Vqa*U42JsJ@6NBh?c6L1f zkBC&O)vw*3vwzv_(sBBUgUrm#-0o8?y+p5{nzPN3SLMvPfs7+JbdG2c4WdEDAfagi z=}ZgApE^f0$XG$7lp!@2rIe18vgp>I35b;PfzRjLlTwCKsZmFmVtm zWhferUbAicve)Z<+-Nke05lqnD_*bnv2ELzqtWQKQGX-z$_}kot6^Ez)8*ymw_B~& zyOw1EU|H4$;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+GrRjJ R^>hFL002ovPDHLkV1jjp54ivU diff --git a/skins/classic/mail.css b/skins/classic/mail.css index 98325d9d2..4d1f7fdc0 100644 --- a/skins/classic/mail.css +++ b/skins/classic/mail.css @@ -1392,7 +1392,7 @@ div.hide-headers { position: absolute; top: 0; - left: 185px; + left: 205px; right: 0; bottom: 0; margin: 0; @@ -1402,16 +1402,20 @@ div.hide-headers { position: absolute; top: 85px; + right: 0; + left: 0; bottom: 0; margin: 0; - width: 100%; } -#compose-div .boxfooter +#compose-body-div { - height: 22px; - background: none; - border-top: 0; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 175px; + border: 1px solid #999; } #compose-div .boxlistcontent @@ -1429,15 +1433,12 @@ div.hide-headers margin: 0; font-size: 9pt; font-family: monospace; - border: 1px solid #999; resize: none; + border: none; + outline: none; } -#compose-body_tbl -{ - border: 1px solid #999; -} - +#compose-body_tbl, #compose-body_tbl td { border: none; @@ -1504,9 +1505,10 @@ input.from_address #compose-editorfooter { position: absolute; - right: 0; + right: 5px; bottom: 0; text-align: right; + line-height: 20px; } #compose-editorfooter label @@ -1519,9 +1521,20 @@ input.from_address #compose-buttons { position: absolute; + left: 5px; + bottom: 1px; + width: auto; +} + +#compose-contacts +{ + position: absolute; + top: 0; left: 0; bottom: 0; - width: auto; + width: 195px; + border: 1px solid #999; + background-color: #F9F9F9; } #compose-attachments @@ -1529,8 +1542,8 @@ input.from_address position: absolute; top: 0; left: 0; + right: 0; bottom: 0; - width: 175px; border: 1px solid #999; background-color: #F9F9F9; } @@ -1622,3 +1635,107 @@ input.from_address right: 6px; z-index: 101; } + +/* addressbook in compose - copy from addressbook.css */ + +#directorylist +{ + list-style: none; + margin: 0; + padding: 0; + background-color: #FFFFFF; +} + +#directorylist li +{ + display: block; + font-size: 11px; + background: url(images/icons/folders.png) 5px -108px no-repeat; + border-bottom: 1px solid #EBEBEB; + white-space: nowrap; +} + +#directorylist li a +{ + cursor: default; + display: block; + padding-left: 25px; + padding-top: 2px; + padding-bottom: 2px; + text-decoration: none; + white-space: nowrap; + height: 15px; +} + +#directorylist li.selected +{ + background-color: #929292; + border-bottom: 1px solid #898989; +} + +#directorylist li.selected a +{ + color: #FFF; + font-weight: bold; +} + +#contacts-table +{ + width: 100%; + table-layout: fixed; +} + +#contacts-table tbody td +{ + cursor: default; + text-overflow: ellipsis; + -o-text-overflow: ellipsis; +} + +#abookcountbar +{ + margin-top: 4px; + margin-left: 4px; + position: absolute; + margin-right: 5px; + right: 0; +} + +#abookactions +{ + position: absolute; + text-underline: none; +} + +#abookactions a +{ + font-weight: bold; + line-height: 22px; + height: 22px; + width: auto; + margin: 0; + padding-left: 5px; + padding-right: 5px; + text-shadow: 1px 1px white; + background: url("images/icons/groupactions.png") no-repeat right -70px; +} + +#compose-contacts #quicksearchbar +{ + top: 2px; + left: 7px; +} + +#compose-contacts #directorylist +{ + width: 100%; + top: 23px; + position: absolute; + border-top: 1px solid #eee; +} + +#compose-contacts #contacts-table +{ + top: 45px; + position: absolute; +} diff --git a/skins/classic/splitter.js b/skins/classic/splitter.js index 3f1c97302..72ada5719 100644 --- a/skins/classic/splitter.js +++ b/skins/classic/splitter.js @@ -28,13 +28,13 @@ function rcube_splitter(attrib) if (this.horizontal) { var top = this.p1pos.top + this.p1.offsetHeight; - this.layer = new rcube_layer(this.id, {x: 0, y: top, height: 10, - width: '100%', vis: 1, parent: this.p1.parentNode}); + this.layer = new rcube_layer(this.id, {x: 0, y: top, height: 10, + width: '100%', vis: 1, parent: this.p1.parentNode}); } else { var left = this.p1pos.left + this.p1.offsetWidth; - this.layer = new rcube_layer(this.id, {x: left, y: 0, width: 10, - height: '100%', vis: 1, parent: this.p1.parentNode}); + this.layer = new rcube_layer(this.id, {x: left, y: 0, width: 10, + height: '100%', vis: 1, parent: this.p1.parentNode}); } this.elm = this.layer.elm; @@ -147,6 +147,7 @@ function rcube_splitter(attrib) this.p1pos = this.relative ? $(this.p1).position() : $(this.p1).offset(); this.p2pos = this.relative ? $(this.p2).position() : $(this.p2).offset(); + return false; }; diff --git a/skins/classic/templates/compose.html b/skins/classic/templates/compose.html index f764d6bb8..6ca5e2cb5 100644 --- a/skins/classic/templates/compose.html +++ b/skins/classic/templates/compose.html @@ -9,9 +9,9 @@ @@ -24,8 +24,6 @@ -
    -
    @@ -46,22 +44,40 @@
    + +
    -
    -
    +
    +
    - +
    + + + +
    + +
    - + +
    -
    @@ -119,23 +135,39 @@
    -
    - +
    +
    + +
    +
    +
    + + +
    + +
    -
    -
    - - + +
    +
    +
    +
    -
    - - - - - - +
    +
    +