From b3bbb281002386f6cedf5b6f007074ecbfc96f5b Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Sun, 27 Jan 2013 12:52:53 +0100 Subject: 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 a399d106e..eba6a6caf 100644 Binary files a/skins/classic/images/icons/groupactions.gif and b/skins/classic/images/icons/groupactions.gif differ diff --git a/skins/classic/images/icons/groupactions.png b/skins/classic/images/icons/groupactions.png index 43c34a438..f29a36a0e 100644 Binary files a/skins/classic/images/icons/groupactions.png and b/skins/classic/images/icons/groupactions.png differ 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 @@
    -
    - +
    +
    + +
    +
    +
    + + +
    + +
    -
    -
    - - + +
    +
    +
    +
    -
    - - - - - - +
    +
    +
    -- cgit v1.2.3