From c7dcb30025c184c1e02a2e859b2f10f874c479f6 Mon Sep 17 00:00:00 2001 From: thomascube Date: Mon, 12 Dec 2011 17:23:19 +0000 Subject: More from Larry... --- bin/exportgettext.sh | 42 ++++- program/steps/mail/func.inc | 8 +- skins/larry/images/addcontact.png | Bin 0 -> 1204 bytes skins/larry/images/buttons.png | Bin 25191 -> 24695 bytes skins/larry/images/favicon.ico | Bin 0 -> 1150 bytes skins/larry/images/filetypes.png | Bin 0 -> 5258 bytes skins/larry/images/listicons.png | Bin 16444 -> 16672 bytes skins/larry/images/messages.png | Bin 2975 -> 2696 bytes skins/larry/includes/footer.html | 10 ++ skins/larry/includes/links.html | 1 + skins/larry/includes/mailtoolbar.html | 45 ++--- skins/larry/mail.css | 305 ++++++++++++++++++++++++++++++-- skins/larry/print.css | 126 +++++++++++++ skins/larry/styles.css | 168 ++++++++++++++++-- skins/larry/templates/mail.html | 44 ++++- skins/larry/templates/message.html | 72 ++++++++ skins/larry/templates/messagepart.html | 36 ++++ skins/larry/templates/messageprint.html | 19 ++ skins/larry/templates/settings.html | 2 + skins/larry/templates/settingsedit.html | 2 + skins/larry/ui.js | 271 ++++++++++++++++++++++++++++ 21 files changed, 1083 insertions(+), 68 deletions(-) create mode 100644 skins/larry/images/addcontact.png create mode 100644 skins/larry/images/favicon.ico create mode 100644 skins/larry/images/filetypes.png create mode 100644 skins/larry/includes/footer.html create mode 100644 skins/larry/print.css create mode 100644 skins/larry/templates/message.html create mode 100644 skins/larry/templates/messagepart.html create mode 100644 skins/larry/templates/messageprint.html create mode 100644 skins/larry/ui.js diff --git a/bin/exportgettext.sh b/bin/exportgettext.sh index 8845f8920..b1649ef0d 100755 --- a/bin/exportgettext.sh +++ b/bin/exportgettext.sh @@ -29,6 +29,39 @@ if ($argc < 2) { $srcdir = unslashify(realpath($argv[1])); $destdir = unslashify($argv[2]); $layout = 'launchpad'; # or 'narro'; +$langcode_map = array( + 'hy_AM' => 'am', + 'ar_SA' => 'ar', + 'az_AZ' => 'az', + 'bg_BG' => 'bg', + 'bs_BA' => 'bs', + 'ca_ES' => 'ca', + 'cs_CZ' => 'cz', + 'cy_GB' => 'cy', + 'da_DK' => 'da', + 'et_EE' => 'et', + 'el_GR' => 'el', + 'eu_ES' => 'eu', + 'ga_IE' => 'ga', + 'ka_GE' => 'ge', + 'gl_ES' => 'gl', + 'he_IL' => 'he', + 'hi_IN' => 'hi', + 'hr_HR' => 'hr', + 'ja_JP' => 'ja', + 'ko_KR' => 'ko', + 'km_KH' => 'km', + 'ms_MY' => 'ms', + 'mr_IN' => 'mr', + 'pl_PL' => 'pl', + 'si_LK' => 'si', + 'sl_SI' => 'sl', + 'sq_AL' => 'sq', + 'sr_CS' => 'sr', + 'sv_SE' => 'sv', + 'uk_UA' => 'uk', + 'vi_VN' => 'vi', +); // converting roundcube localization dir @@ -113,7 +146,7 @@ function convert_dir($indir, $outdir) */ function convert_file($fn, $outfn) { - global $layout; + global $layout, $langcode_map; $basename = basename($fn); $srcname = str_replace(INSTALL_PATH, '', $fn); @@ -134,8 +167,11 @@ function convert_file($fn, $outfn) $is_pot = true; } // launchpad is very picky about file names - else if ($layout == 'launchpad' && preg_match($regex = '!/([a-z]{2})_([A-Z]{2})!', $outfn, $m) && $m[1] == strtolower($m[2])) { - $outfn = preg_replace($regex, '/\1', $outfn); + else if ($layout == 'launchpad' && preg_match($regex = '!/([a-z]{2})_([A-Z]{2})!', $outfn, $m)) { + if ($shortlang = $langcode_map[$lang]) + $outfn = preg_replace($regex, '/'.$shortlang, $outfn); + else if ($m[1] == strtolower($m[2])) + $outfn = preg_replace($regex, '/\1', $outfn); } include($fn); diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 2bc0091cb..5f36da9a9 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1391,7 +1391,7 @@ function rcmail_draftinfo_decode($str) } -function rcmail_message_part_controls() +function rcmail_message_part_controls($attrib) { global $MESSAGE; @@ -1404,13 +1404,13 @@ function rcmail_message_part_controls() if (!empty($part->filename)) { $table->add('title', Q(rcube_label('filename'))); - $table->add(null, Q($part->filename)); - $table->add(null, '[' . html::a('?'.str_replace('_frame=', '_download=', $_SERVER['QUERY_STRING']), Q(rcube_label('download'))) . ']'); + $table->add('header', Q($part->filename)); + $table->add('download-link', html::a(array('href' => './?'.str_replace('_frame=', '_download=', $_SERVER['QUERY_STRING'])), Q(rcube_label('download')))); } if (!empty($part->size)) { $table->add('title', Q(rcube_label('filesize'))); - $table->add(null, Q(show_bytes($part->size))); + $table->add('header', Q(show_bytes($part->size))); } return $table->show($attrib); diff --git a/skins/larry/images/addcontact.png b/skins/larry/images/addcontact.png new file mode 100644 index 000000000..1d9c0a1d4 Binary files /dev/null and b/skins/larry/images/addcontact.png differ diff --git a/skins/larry/images/buttons.png b/skins/larry/images/buttons.png index c86f211f2..54ebc8378 100644 Binary files a/skins/larry/images/buttons.png and b/skins/larry/images/buttons.png differ diff --git a/skins/larry/images/favicon.ico b/skins/larry/images/favicon.ico new file mode 100644 index 000000000..b3bd18c12 Binary files /dev/null and b/skins/larry/images/favicon.ico differ diff --git a/skins/larry/images/filetypes.png b/skins/larry/images/filetypes.png new file mode 100644 index 000000000..1ea4599f0 Binary files /dev/null and b/skins/larry/images/filetypes.png differ diff --git a/skins/larry/images/listicons.png b/skins/larry/images/listicons.png index 08c098fe0..dcd214fc5 100644 Binary files a/skins/larry/images/listicons.png and b/skins/larry/images/listicons.png differ diff --git a/skins/larry/images/messages.png b/skins/larry/images/messages.png index 07672a620..a5b1eb1d0 100644 Binary files a/skins/larry/images/messages.png and b/skins/larry/images/messages.png differ diff --git a/skins/larry/includes/footer.html b/skins/larry/includes/footer.html new file mode 100644 index 000000000..f884bdf82 --- /dev/null +++ b/skins/larry/includes/footer.html @@ -0,0 +1,10 @@ + + diff --git a/skins/larry/includes/links.html b/skins/larry/includes/links.html index 1dba9f1cd..d2426aee4 100644 --- a/skins/larry/includes/links.html +++ b/skins/larry/includes/links.html @@ -5,3 +5,4 @@ + \ No newline at end of file diff --git a/skins/larry/includes/mailtoolbar.html b/skins/larry/includes/mailtoolbar.html index e97e135f5..09a6f81c1 100644 --- a/skins/larry/includes/mailtoolbar.html +++ b/skins/larry/includes/mailtoolbar.html @@ -1,66 +1,57 @@
- + - + - + - + - - - - - + +
    -
  • - - -
  • -
  • - - -
  • +
  • +
-
    -
  • -
  • +
      +
    • +
-
    -
  • -
  • -
  • -
  • -
  • +
      +
    • +
    • +
    • +
    • +
-
    +
    • diff --git a/skins/larry/mail.css b/skins/larry/mail.css index 8097a95ef..247873539 100644 --- a/skins/larry/mail.css +++ b/skins/larry/mail.css @@ -68,6 +68,10 @@ padding: 2px; } +#messagelistfooter.rightalign { + text-align: right; +} + #messagelistfooter #countcontrols { display: inline-block; } @@ -160,22 +164,22 @@ #mailboxlist li.mailbox div.collapsed, #mailboxlist li.mailbox div.expanded { position: absolute; - top: 15px; - left: 21px; - width: 10px; - height: 10px; - background: url(images/listicons.png) -5px -146px no-repeat; + top: 14px; + left: 20px; + width: 14px; + height: 14px; + background: url(images/listicons.png) -3px -144px no-repeat; cursor: pointer; } #mailboxlist li.mailbox div.expanded { - background-position: -5px -170px; + background-position: -3px -168px; } #mailboxlist li.mailbox ul li div.collapsed, #mailboxlist li.mailbox ul li div.expanded { - left: 46px; - top: 16px; + left: 45px; + top: 15px; } #mailboxlist li.mailbox .unreadcount { @@ -185,11 +189,11 @@ width: 2.8em; padding: 2px; background: #82acb5; - background: -moz-linear-gradient(left, #82acb5 0%, #6a939f 100%); - background: -webkit-gradient(linear, left top, right top, color-stop(0%,#82acb5), color-stop(100%,#6a939f)); - background: -o-linear-gradient(left, #82acb5 0%, #6a939f 100%); - background: -ms-linear-gradient(left, #82acb5 0%, #6a939f 100%); - background: linear-gradient(left, #82acb5 0%, #6a939f 100%); + background: -moz-linear-gradient(top, #82acb5 0%, #6a939f 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#82acb5), color-stop(100%,#6a939f)); + background: -o-linear-gradient(top, #82acb5 0%, #6a939f 100%); + background: -ms-linear-gradient(top, #82acb5 0%, #6a939f 100%); + background: linear-gradient(top, #82acb5 0%, #6a939f 100%); box-shadow: inset 0 1px 1px 0 #536d72; -o-box-shadow: inset 0 1px 1px 0 #536d72; -webkit-box-shadow: inset 0 1px 1px 0 #536d72; @@ -203,11 +207,11 @@ #mailboxlist li.mailbox.selected .unreadcount { background: #005d76; - background: -moz-linear-gradient(left, #005d76 0%, #004558 100%); - background: -webkit-gradient(linear, left top, right top, color-stop(0%,#005d76), color-stop(100%,#004558)); - background: -o-linear-gradient(left, #005d76 0%, #004558 100%); - background: -ms-linear-gradient(left, #005d76 0%, #004558 100%); - background: linear-gradient(left, #005d76 0%, #004558 100%); + background: -moz-linear-gradient(top, #005d76 0%, #004558 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#005d76), color-stop(100%,#004558)); + background: -o-linear-gradient(top, #005d76 0%, #004558 100%); + background: -ms-linear-gradient(top, #005d76 0%, #004558 100%); + background: linear-gradient(top, #005d76 0%, #004558 100%); box-shadow: inset 0 1px 1px 0 #003645; -o-box-shadow: inset 0 1px 1px 0 #003645; -webkit-box-shadow: inset 0 1px 1px 0 #003645; @@ -218,15 +222,42 @@ width: 16em; } +#mailview-left select.mailboxlist { + position: relative; + top: 10px; + width: 100%; +} + #messagetoolbar { position: absolute; top: -6px; right: 0; left: 15em; height: 40px; +} + +#messagetoolbar.fullwidth { + left: 0; +} + +#mailtoolbar { text-align: right; } +#mailpreviewtoggle { + display: block; + position: absolute; + top: 4px; + right: 2px; + width: 20px; + height: 18px; + background: url(images/buttons.png) -5px -318px no-repeat; +} + +#mailpreviewtoggle.enabled { + background-position: -28px -318px; +} + /*** message list ***/ @@ -563,3 +594,241 @@ html.chrome #messagelist tr td.threads { width: 15px; /* background: url(images/tree.gif) 0px 0px no-repeat; */ } + + +/**** message view ****/ + +#messagecontent { + position: absolute; + top: 140px; + left: 0; + width: 100%; + bottom: 32px; + overflow: auto; +} + +#messageheader, +#partheader { + padding: 3px 0; + background: #fff; + background: -moz-linear-gradient(top, #fff 0%, #f0f0f0 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fff), color-stop(100%,#f0f0f0)); + background: -o-linear-gradient(top, #fff 0%, #f0f0f0 100%); + background: -ms-linear-gradient(top, #fff 0%, #f0f0f0 100%); + background: linear-gradient(top, #fff 0%, #f0f0f0 100%); +} + +.headers-table td { + color: #666; + padding: 2px 8px; + font-size: 11px; +} + +.headers-table td.header { + font-weight: bold; +} + +.headers-table td.header a { + color: #666; + text-decoration: none; +} + +.headers-table td.header a:hover { + text-decoration: underline; +} + +.headers-table td.subject { + color: #333; + font-size: 110%; + font-weight: bold; +} + +.rcmaddcontact { + position: relative; + top: 1px; + margin-left: 0.5em; +} + +#messagecontent .leftcol { + margin-right: 250px; +} + +#messagecontent .rightcol { + float: right; +/* + position: absolute; + top: 10px; + right: 10px; + height: 90%; +*/ + width: 230px; + margin: 8px; + min-height: 200px; + background: #f0f0f0; + padding: 8px; +} + + +#messagebody { + margin: 8px; +} + +#message-objects div, +#messagebody span.part-notice { + margin: 8px; +} + +#message-objects div.notice { + color: #960; + border: 1px solid #ffdf0e; + background-color: #fef893; + background-position: 5px -24px; + padding: 6px 12px 4px 30px; +} + +#message-objects div a.button, +#messagebody span.part-notice a.button { + font-size: 11px; + margin-left: 10px; + border: 1px solid #ccc; + box-shadow: 0 1px 1px 0 #e8e386; + -o-box-shadow: 0 1px 1px 0 #e8e386; + -webkit-box-shadow: 0 1px 1px 0 #e8e386; + -moz-box-shadow: 0 1px 1px 0 #e8e386; +} + +div.message-part, +div.message-htmlpart { + padding: 10px 8px; + border-top: 1px solid #ccc; +} + +#messagebody div:first-child { + border-top: 0; +} + +div.message-part a, +div.message-htmlpart a { + color: #0000CC; +} + +div.message-part pre, +div.message-htmlpart pre, +div.message-part div.pre { + margin: 0px; + padding: 0px; + font-family: monospace; + white-space: -moz-pre-wrap !important; + white-space: pre-wrap !important; + white-space: pre; +} + +div.message-part span.sig { + color: #666666; +} + +div.message-part blockquote { + color: blue; + border-left: 2px solid blue; + border-right: 2px solid blue; + background-color: #F6F6F6; + margin: 2px 0px 2px 0px; + padding: 1px 8px 1px 10px; +} + +div.message-part blockquote blockquote { + color: green; + border-left: 2px solid green; + border-right: 2px solid green; +} + +div.message-part blockquote blockquote blockquote { + color: #990000; + border-left: 2px solid #bb0000; + border-right: 2px solid #bb0000; +} + +#messagebody > hr { + color: #fff; + background: #fff; + border: 0; + border-bottom: 2px dotted #ccc; +} + +#messagebody > p > img { + max-width: 80%; +} + +#attachment-list { + list-style: none; + margin: 0; + padding: 0; + overflow: hidden; + text-overflow: ellipsis; +} + +#attachment-list li { + display: block; + background: url(images/filetypes.png) 0 0 no-repeat; + margin-bottom: 1px; +} + +#attachment-list li.pdf { + background-position: 0 -26px; +} + +#attachment-list li.doc, +#attachment-list li.msword { + background-position: 0 -52px; +} + +#attachment-list li.xls, +#attachment-list li.msexcel { + background-position: 0 -78px; +} + +#attachment-list li.zip, +#attachment-list li.gz { + background-position: 0 -104px; +} + +#attachment-list li.image { + background-position: 0 -130px; +} + +#attachment-list li.audio { + background-position: 0 -156px; +} + +#attachment-list li.video { + background-position: 0 -182px; +} + + +#attachment-list li a { + display: block; + color: #333; + font-size: 11px; + font-weight: bold; + padding: 8px 4px 3px 30px; + text-shadow: 1px 1px 1px #fff; + text-decoration: none; + white-space: nowrap; +} + +#attachment-list li a:hover { + text-decoration: underline; +} + +#messagepartcontainer { + position: absolute; + top: 60px; + left: 0px; + right: 0px; + bottom: 0px; +} + + +#messagepartframe { + border: 0; +} \ No newline at end of file diff --git a/skins/larry/print.css b/skins/larry/print.css new file mode 100644 index 000000000..97545a557 --- /dev/null +++ b/skins/larry/print.css @@ -0,0 +1,126 @@ +/** + * Roundcube webmail styles for message printing + * + * Copyright (c) 2011, The Roundcube Dev Team + * + * The contents are subject to the Creative Commons Attribution-ShareAlike + * License. It is allowed to copy, distribute, transmit and to adapt the work + * by keeping credits to the original autors in the README file. + * See http://creativecommons.org/licenses/by-sa/3.0/ for details. + * + * $Id$ + */ +body { + font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; + background-color: #fff; + color: #000; + margin: 2mm; +} + +body, td, th, span, div, p { + font-size: 9pt; + color: #000; +} + +h3 { + font-size: 18px; + color: #000; +} + +a, a:active, a:visited { + color: #000; +} + +#header { + float: right; + margin: 0 5mm 3mm 5mm; +} + +table.headers-table { + table-layout: fixed; + margin-top: 14px; +} + +table.headers-table tr td { + font-size: 9pt; +} + +table.headers-table td.header-title { + color: #666; + font-size: 85%; + padding-right: 4mm; + white-space: nowrap; +} + +table.headers-table tr td.subject { + width: 90%; + font-weight: bold; + font-size: 120%; +} + +#attachment-list { + margin-top: 3mm; + padding-top: 3mm; + border-top: 1pt solid #ccc; +} + +#attachment-list li { + font-size: 9pt; +} + +#attachment-list li a { + text-decoration: none; +} + +#attachment-list li a:hover { + text-decoration: underline; +} + +#messagebody { + margin-top: 5mm; + border-top: none; +} + +div.message-part { + padding: 2mm; + margin-top: 5mm; + margin-bottom: 5mm; + border-top: 1pt solid #ccc; +} + +div.message-part a { + color: #00c; +} + +div.message-part pre, +div.message-htmlpart pre, +div.message-part div.pre { + margin: 0; + padding: 0; + font-family: monospace; + white-space: -moz-pre-wrap !important; + white-space: pre-wrap !important; + white-space: pre; + word-wrap: break-word; /* IE (and Safari) */ +} + +div.message-part blockquote { + color: blue; + border-left: 2px solid blue; + border-right: 2px solid blue; + background-color: #F6F6F6; + margin: 0.5em 0em 0.5em 0em; + padding: 0.25em 1em 0.25em 1em; +} + +div.message-part blockquote blockquote { + color: green; + border-left: 2px solid green; + border-right: 2px solid green; +} + +div.message-part blockquote blockquote blockquote { + color: #900; + border-left: 2px solid #b00; + border-right: 2px solid #b00; +} diff --git a/skins/larry/styles.css b/skins/larry/styles.css index d251adb8e..ebfe63e04 100644 --- a/skins/larry/styles.css +++ b/skins/larry/styles.css @@ -157,7 +157,8 @@ a.button.disabled span.inner { opacity: 0.4; } -a.button.pressed { +a.button.pressed, +a.button:active { background: #e6e6e6; background: -moz-linear-gradient(top, #e6e6e6 0%, #f9f9f9 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e6e6e6), color-stop(100%,#f9f9f9)); @@ -190,7 +191,8 @@ a.button.pressed { display: inline-block; width: 12px; height: 12px; - text-indent: -1000px; + text-indent: 1000px; + overflow: hidden; background: url(images/buttons.png) -8px -211px no-repeat; } @@ -209,6 +211,7 @@ a.button.pressed { .pagenav .countdisplay { display: inline-block; padding:0 0.5em; + font-size: 11px; text-shadow: 1px 1px 1px #fff; min-width: 20em; } @@ -222,11 +225,11 @@ a.iconbutton { } a.iconbutton.searchoptions { - background-position: -2px -304px; + background-position: -2px -337px; } a.iconbutton.reset { - background-position: -25px -303px; + background-position: -25px -337px; } @@ -236,7 +239,8 @@ a.iconbutton.reset { #message div.warning, #message div.error, #message div.notice, -#message div.confirmation { +#message div.confirmation, +#message-objects div.notice { color: #555; font-weight: bold; padding: 6px 40px 6px 25px; @@ -312,6 +316,11 @@ a.iconbutton.reset { text-decoration: none; } +#topline a:hover, +#topnav a:hover { + text-decoration: underline; +} + #toplogo { padding-top: 2px; } @@ -324,6 +333,11 @@ a.iconbutton.reset { float: right; } +.closelink { + display: inline-block; + padding: 2px 10px 2px 20px; +} + #topline span.username { padding-right: 1em; } @@ -340,6 +354,7 @@ a.iconbutton.reset { color: #fff; } + /*** taskbar ***/ #taskbar a { @@ -437,6 +452,10 @@ a.iconbutton.reset { overflow: auto; } +.listbox .scroller.wfooter { + bottom: 42px; +} + .listbox .boxtitle + .scroller { top: 34px; } @@ -499,6 +518,41 @@ table.listing { border-spacing: 0; } +.listbox .boxfooter { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + height: 42px; + border-top: 1px solid #ccdde4; + background: #d9ecf4; + -webkit-box-shadow: inset 0 1px 0 0 #fff; + -moz-box-shadow: inset 0 1px 0 0 #fff; + box-shadow: inset 0 1px 0 0 #fff; +} + +.boxfooter .listbutton { + display: inline-block; + text-decoration: none; + width: 48px; + border-right: 1px solid #fff; + background: #c7e3ef; + padding: 3px 0; + margin-top: 1px; +} + +.boxfooter .listbutton .inner { + display: inline-block; + width: 48px; + height: 35px; + text-indent: -1000px; + background: url(images/buttons.png) -1000px 0 no-repeat; +} + +.boxfooter .listbutton.groupactions .inner { + background-position: 4px -1212px; +} + .errobox h3 { font-size: 16px; margin-top: 0; @@ -714,40 +768,130 @@ table.propform td.title { opacity: 0.5; } +.dropbutton { + display: inline-block; + position: relative; +} + +.dropbutton .dropbuttontip { + display: block; + position: absolute; + right: 2px; + top: 0; + height: 42px; + width: 18px; + background: url(images/buttons.png) -24px -1049px no-repeat; + cursor: pointer; +} + +.dropbutton .dropbuttontip:hover { + background-position: 0 -1049px; +} + +.toolbar a.button.back { + background-position: 0 -370px; +} + .toolbar a.button.checkmail { - background-position: center -370px; + background-position: center -410px; } .toolbar a.button.compose { - background-position: center -410px; + background-position: center -450px; } .toolbar a.button.reply { - background-position: center -450px; + background-position: center -490px; } .toolbar a.button.reply-all { - background-position: center -490px; + background-position: center -530px; } .toolbar a.button.forward { - background-position: center -530px; + background-position: center -570px; } .toolbar a.button.delete { - background-position: center -570px; + background-position: center -610px; } .toolbar a.button.markmessage, .toolbar a.button.more { - background-position: center -730px; + background-position: center -770px; } /*** popup menus ***/ .popupmenu { display: none; + position: absolute; + top: 32px; + left: 90px; + width: auto; + background: #444; + border: 1px solid #999; + z-index: 240; + border-radius: 4px; + box-shadow: 0 2px 6px 0 #333; + -moz-box-shadow: 0 2px 6px 0 #333; + -webkit-box-shadow: 0 2px 6px 0 #333; + -o-box-shadow: 0 2px 6px 0 #333; +} + +ul.toolbarmenu { + margin: 0; + padding: 0; + list-style: none; +} + +ul.toolbarmenu li { + color: #fff; + font-size: 11px; + white-space: nowrap; + min-width: 130px; + margin: 0; + border-top: 1px solid #5a5a5a; + border-bottom: 1px solid #333; } +ul.toolbarmenu li:first-child { + border-top: 0; +} +ul.toolbarmenu li:last-child { + border-bottom: 0; +} +ul.toolbarmenu li a { + display: block; + color: #666; + text-shadow: 1px 1px 1px #333; + text-decoration: none; + min-height: 14px; + padding: 6px 10px 6px 10px; +} + +ul.toolbarmenu li a.active { + color: #fff; +} + +ul.toolbarmenu li a.active:hover { + background-color: #00aad6; + background: -moz-linear-gradient(top, #00aad6 0%, #008fc9 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#00aad6), color-stop(100%,#008fc9)); + background: -o-linear-gradient(top, #00aad6 0%, #008fc9 100%); + background: -ms-linear-gradient(top, #00aad6 0%, #008fc9 100%); + background: linear-gradient(top, #00aad6 0%, #008fc9 100%); +} + +ul.toolbarmenu.iconized li a { + padding-left: 28px; +} + +ul.toolbarmenu li label { + display: block; + color: #fff; + padding: 4px 8px; + text-shadow: 1px 1px 1px #333; +} diff --git a/skins/larry/templates/mail.html b/skins/larry/templates/mail.html index 6a1164002..b6f333983 100644 --- a/skins/larry/templates/mail.html +++ b/skins/larry/templates/mail.html @@ -15,17 +15,17 @@
      - +
      -
      - +
      +
      - +
      @@ -66,12 +66,15 @@
      + +
+
@@ -82,6 +85,39 @@
+
+
    +
  • +
  • +
  • +
  • +
  • +
  • +
+
+ +
+
    +
  • +
  • +
+
+ +
+
    +
  • +
  • +
  • + +
+
+ + +
+ +
+ + diff --git a/skins/larry/templates/message.html b/skins/larry/templates/message.html new file mode 100644 index 000000000..9cb5928c2 --- /dev/null +++ b/skins/larry/templates/message.html @@ -0,0 +1,72 @@ + + + +<roundcube:object name="pagetitle" /> + + + + + + +
+ +
+ + + +
+
+ +
+
+ +
+ +
+ + +
+ +
+ +
+
+ + +
+ +
+
+ +
+
+ + +
+
+ + +
+ +
+ +
+ +
+ +
+ +
+ +
+ + + + + diff --git a/skins/larry/templates/messagepart.html b/skins/larry/templates/messagepart.html new file mode 100644 index 000000000..db078296f --- /dev/null +++ b/skins/larry/templates/messagepart.html @@ -0,0 +1,36 @@ + + + +<roundcube:object name="pagetitle" /> + + + + + + +
+ +
+ +
+ +
+ +
+ +
+ + + diff --git a/skins/larry/templates/messageprint.html b/skins/larry/templates/messageprint.html new file mode 100644 index 000000000..d01c70bcd --- /dev/null +++ b/skins/larry/templates/messageprint.html @@ -0,0 +1,19 @@ + + + +<roundcube:object name="pagetitle" /> + + + + + + + +
+ + + +
+ + + diff --git a/skins/larry/templates/settings.html b/skins/larry/templates/settings.html index 83cfe1341..bd90ae38e 100644 --- a/skins/larry/templates/settings.html +++ b/skins/larry/templates/settings.html @@ -25,5 +25,7 @@ + + diff --git a/skins/larry/templates/settingsedit.html b/skins/larry/templates/settingsedit.html index e058ec6be..9311af788 100644 --- a/skins/larry/templates/settingsedit.html +++ b/skins/larry/templates/settingsedit.html @@ -18,5 +18,7 @@ + + diff --git a/skins/larry/ui.js b/skins/larry/ui.js new file mode 100644 index 000000000..274b71b78 --- /dev/null +++ b/skins/larry/ui.js @@ -0,0 +1,271 @@ +/** + * Roundcube functions for default skin interface + */ + + +function rcube_mail_ui() +{ + var popups = {}; + var popupconfig = { + forwardmenu: { editable:1 }, + searchmenu: { editable:1, callback:searchmenu }, + listoptions: { editable:1 }, + dragmessagemenu: { sticky:1 }, + groupmenu: { above:1 }, + mailboxmenu: { above:1 }, + composeoptionsmenu: { editable:1, overlap:1 }, + // toggle: #1486823, #1486930 + 'attachment-form': { editable:1, above:1, toggle:!bw.ie&&!bw.linux }, + 'upload-form': { editable:1, toggle:!bw.ie&&!bw.linux } + }; + + var me = this; + + // export public methods + this.init = init; + this.show_popup = show_popup; + this.set_searchmod = set_searchmod; + + /** + * + */ + function init() + { + if (rcmail.env.task == 'mail') { + rcmail.addEventListener('menu-open', function(){ show_popup('listoptions'); }); + rcmail.addEventListener('menu-save', save_listoptions); +// rcmail.addEventListener('aftersend-attachment', 'uploadmenu', rcmail_ui); +// rcmail.addEventListener('aftertoggle-editor', 'resize_compose_body_ev', rcmail_ui); + rcmail.gui_object('message_dragmenu', 'dragmessagemenu'); + $('#mailpreviewtoggle').click(function(e){ toggle_preview_pane(e); return false }); + + if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') { + init_messageview(); + } + } + + $(document.body).bind('mouseup', function(e){ + var config, obj, target = e.target; + for (var id in popups) { + obj = popups[id]; + config = popupconfig[id]; + if (obj.is(':visible') + && target.id != id+'link' + && !config.toggle + && (!config.editable || !target_overlaps(target, obj.get(0))) + && (!config.sticky || !rcube_mouse_is_over(e, obj.get(0))) + ) { + var myid = id+''; + window.setTimeout(function(){ show_popupmenu(myid, false) }, 10); + } + } + }) + .bind('keyup', function(e){ + if (e.keyCode == 27) { + for (var id in popups) { + if (popups[id].is(':visible')) + show_popup(id, false); + } + } + }); + } + + /** + * Adjust UI objects of the mail view screen + */ + function init_messageview() + { + $('#messagecontent').css('top', ($('#messageheader').outerHeight() + 10) + 'px'); + $('#message-objects div a').addClass('button'); + + if (!$('#attachment-list li').length) { + $('#messagecontent div.rightcol').hide(); + $('#messagecontent .leftcol').css('margin-right', '0'); + } + } + + /** + * Trigger for popup menus + */ + function show_popup(popup, show, config) + { + // auto-register menu object + if (config || !popupconfig[popup]) + popupconfig[popup] = $.extend(popupconfig[popup] || {}, config); + + var visible = show_popupmenu(popup, show), + config = popupconfig[popup]; + if (typeof config.callback == 'function') + config.callback(visible); + } + + /** + * Show/hide a specific popup menu + */ + function show_popupmenu(popup, show) + { + var obj = popups[popup], + config = popupconfig[popup], + ref = $('#'+popup+'link'), + above = config.above; + + if (!obj) { + obj = popups[popup] = $('#'+popup); + obj.appendTo(document.body); // move them to top for proper absolute positioning + } + + if (!obj || !obj.length) + return false; + + if (typeof show == 'undefined') + show = obj.is(':visible') ? false : true; + else if (config.toggle && show && obj.is(':visible')) + show = false; + + if (show && ref) { + var parent = ref.parent(), + win = $(window), + pos; + + if (parent.hasClass('dropbutton')) + ref = parent; + + pos = ref.offset(); + ref.offsetHeight = ref.outerHeight(); + if (!above && pos.top + ref.offsetHeight + obj.height() > win.height()) + above = true; + if (pos.left + obj.width() > win.width()) + pos.left = win.width() - obj.width() - 12; + + obj.css({ left:pos.left, top:(pos.top + (above ? -obj.height() : ref.offsetHeight)) }); + } + + obj[show?'show':'hide'](); + + // hide drop-down elements on buggy browsers + if (bw.ie6 && config.overlap) { + $('select').css('visibility', show?'hidden':'inherit'); + $('select', obj).css('visibility', 'inherit'); + } + + return show; + } + + /** + * + */ + function target_overlaps(target, elem) + { + while (target.parentNode) { + if (target.parentNode == elem) + return true; + target = target.parentNode; + } + return false; + } + + + function toggle_preview_pane(e) + { + var button = $(e.target); + var visible = !button.hasClass('enabled'); + + button.removeClass().addClass(visible ? 'enabled' : 'closed'); + +// rcmail.command('save-pref', { name:'preview_pane', value:(visible?1:0) }); + } + + + /**** popup callbacks ****/ + + function searchmenu(show) + { + if (show && rcmail.env.search_mods) { + var n, all, + obj = popups['searchmenu'], + list = $('input:checkbox[name="s_mods[]"]', obj), + mbox = rcmail.env.mailbox, + mods = rcmail.env.search_mods; + + if (rcmail.env.task == 'mail') { + mods = mods[mbox] ? mods[mbox] : mods['*']; + all = 'text'; + } + else { + all = '*'; + } + + if (mods[all]) + list.map(function() { + this.checked = true; + this.disabled = this.value != all; + }); + else { + list.prop('disabled', false).prop('checked', false); + for (n in mods) + $('#s_mod_' + n).prop('checked', true); + } + } + } + + + function save_listoptions() + { + show_popupmenu('listoptions', false); + + var sort = $('input[name="sort_col"]:checked').val(), + ord = $('input[name="sort_ord"]:checked').val(), + thread = $('input[name="view"]:checked').val(), + cols = $('input[name="list_col[]"]:checked') + .map(function(){ return this.value; }).get(); + + rcmail.set_list_options(cols, sort, ord, thread == 'thread' ? 1 : 0); + } + + + function set_searchmod(elem) + { + var all, m, task = rcmail.env.task, + mods = rcmail.env.search_mods, + mbox = rcmail.env.mailbox; + + if (!mods) + mods = {}; + + if (task == 'mail') { + if (!mods[mbox]) + mods[mbox] = rcube_clone_object(mods['*']); + m = mods[mbox]; + all = 'text'; + } + else { //addressbook + m = mods; + all = '*'; + } + + if (!elem.checked) + delete(m[elem.value]); + else + m[elem.value] = 1; + + // mark all fields + if (elem.value != all) + return; + + $('input:checkbox[name="s_mods[]"]').map(function() { + if (this == elem) + return; + + this.checked = true; + if (elem.checked) { + this.disabled = true; + delete m[this.value]; + } + else { + this.disabled = false; + m[this.value] = 1; + } + }); + } +} + -- cgit v1.2.3