Browse files

Merge https://github.com/roundcube/roundcubemail into crypt_hash_branch

  • Loading branch information...
2 parents 5c603c4 + e263994 commit 921408eba600a7dc51271c35480e9114cac5ecec @defa defa committed Sep 5, 2012
Showing with 625 additions and 684 deletions.
  1. +8 −0 CHANGELOG
  2. +1 −2 plugins/acl/acl.php
  3. +4 −0 plugins/acl/skins/larry/acl.css
  4. +4 −4 plugins/acl/skins/larry/templates/table.html
  5. +0 −7 plugins/managesieve/tests/Makefile
  6. +54 −0 plugins/managesieve/tests/Parser.php
  7. +33 −0 plugins/managesieve/tests/Tokenizer.php
  8. +0 −120 plugins/managesieve/tests/parser.phpt
  9. +0 −49 plugins/managesieve/tests/parser_body.phpt
  10. +0 −28 plugins/managesieve/tests/parser_imapflags.phpt
  11. +0 −30 plugins/managesieve/tests/parser_include.phpt
  12. +0 −19 plugins/managesieve/tests/parser_kep14.phpt
  13. +0 −25 plugins/managesieve/tests/parser_prefix.phpt
  14. +0 −25 plugins/managesieve/tests/parser_relational.phpt
  15. +0 −39 plugins/managesieve/tests/parser_vacation.phpt
  16. +0 −39 plugins/managesieve/tests/parser_variables.phpt
  17. +0 −38 plugins/managesieve/tests/parset_subaddress.phpt
  18. +52 −0 plugins/managesieve/tests/src/parser
  19. +52 −0 plugins/managesieve/tests/src/parser.out
  20. +17 −0 plugins/managesieve/tests/src/parser_body
  21. +7 −0 plugins/managesieve/tests/src/parser_imapflags
  22. +7 −0 plugins/managesieve/tests/src/parser_include
  23. +2 −0 plugins/managesieve/tests/src/parser_kep14
  24. +3 −0 plugins/managesieve/tests/src/parser_kep14.out
  25. +5 −0 plugins/managesieve/tests/src/parser_prefix
  26. +6 −0 plugins/managesieve/tests/src/parser_relational
  27. +11 −0 plugins/managesieve/tests/src/parser_subaddress
  28. +12 −0 plugins/managesieve/tests/src/parser_vacation
  29. +12 −0 plugins/managesieve/tests/src/parser_variables
  30. +0 −66 plugins/managesieve/tests/tokenize.phpt
  31. +4 −0 plugins/password/drivers/virtualmin.php
  32. +6 −0 program/include/rcube_charset.php
  33. +4 −0 program/include/rcube_imap.php
  34. +3 −2 program/include/rcube_imap_generic.php
  35. +19 −7 program/include/rcube_message.php
  36. +30 −1 program/include/rcube_output_html.php
  37. +0 −2 program/include/rcube_shared.inc
  38. +1 −1 program/include/rcube_storage.php
  39. +57 −38 program/js/app.js
  40. +2 −2 program/js/list.js
  41. +10 −3 program/steps/mail/func.inc
  42. +2 −1 program/steps/mail/headers.inc
  43. +3 −1 program/steps/settings/folders.inc
  44. +4 −1 program/steps/settings/save_folder.inc
  45. +2 −13 skins/classic/templates/message.html
  46. +2 −13 skins/classic/templates/messageerror.html
  47. +0 −1 skins/larry/addressbook.css
  48. +3 −3 skins/larry/ie7hacks.css
  49. +1 −1 skins/larry/iehacks.css
  50. BIN skins/larry/images/contactpic_32px.png
  51. BIN skins/larry/images/contactpic_48px.png
  52. +40 −50 skins/larry/mail.css
  53. +4 −2 skins/larry/styles.css
  54. +2 −0 skins/larry/svggradient.php
  55. +1 −1 skins/larry/svggradients.css
  56. +38 −23 skins/larry/templates/message.html
  57. +4 −6 skins/larry/templates/messageerror.html
  58. +3 −2 skins/larry/templates/messagepreview.html
  59. +40 −16 skins/larry/ui.js
  60. +43 −0 tests/Framework/Shared.php
  61. +2 −2 tests/HtmlToText.php
  62. +1 −1 tests/MailFunc.php
  63. +4 −0 tests/phpunit.xml
View
8 CHANGELOG
@@ -1,6 +1,14 @@
CHANGELOG Roundcube Webmail
===========================
+- Fix focus issue in IE when selecting message row (#1488620)
+- Remove (too big) min-width on mail screen
+- Add full headers view in message preview window (#1488538)
+- Fix message display page issues - unified with message preview (#1488590, #1488642)
+- Fix displaying all headers when they contain malformed characters (#1488666)
+- Fix decoding of HTML messages with UTF-16 charset specified (#1488654)
+- Fix quota capability detection so it can be overwritten by a plugin (#1488655)
+- Added template object 'frame'
- Fix identity selection on reply (#1488101)
- Add option to enable HTML editor on forwarding (#1488517)
- Add option to not include original message on reply, rename option top_posting to reply_mode (#1485149)
View
3 plugins/acl/acl.php
@@ -233,8 +233,7 @@ function templ_rights($attrib)
// Advanced rights
$attrib['id'] = 'advancedrights';
- foreach ($supported as $val) {
- $id = "acl$val";
+ foreach ($supported as $idx => $val) {
$ul .= html::tag('li', null,
$input->show('', array(
'name' => "acl[$val]", 'value' => $val, 'id' => $id))
View
4 plugins/acl/skins/larry/acl.css
@@ -123,3 +123,7 @@
{
margin-left: 0.5em;
}
+
+ul.toolbarmenu li span.delete {
+ background-position: 0 -1509px;
+}
View
8 plugins/acl/skins/larry/templates/table.html
@@ -3,14 +3,14 @@
<roundcube:object name="acltable" id="acltable" class="records-table" />
</div>
<div id="acllist-footer" class="boxfooter">
- <roundcube:button command="acl-create" id="aclcreatelink" type="link" title="acl.newuser" class="listbutton add disabled" classAct="listbutton add" innerClass="inner" content="+" /><roundcube:button name="aclmenulink" id="aclmenulink" type="link" title="acl.actions" class="listbutton groupactions"onclick="UI.show_popup('aclmenu');return false" innerClass="inner" content="&#9881;" />
+ <roundcube:button command="acl-create" id="aclcreatelink" type="link" title="acl.newuser" class="listbutton add disabled" classAct="listbutton add" innerClass="inner" content="+" /><roundcube:button name="aclmenulink" id="aclmenulink" type="link" title="acl.actions" class="listbutton groupactions"onclick="UI.show_popup('aclmenu', undefined, {above:1});return false" innerClass="inner" content="&#9881;" />
</div>
</div>
<div id="aclmenu" class="popupmenu">
- <ul class="toolbarmenu selectable">
- <li><roundcube:button command="acl-edit" label="edit" classAct="active" /></li>
- <li><roundcube:button command="acl-delete" label="delete" classAct="active" /></li>
+ <ul class="toolbarmenu selectable iconized">
+ <li><roundcube:button command="acl-edit" label="edit" class="icon" classAct="icon active" innerclass="icon edit" /></li>
+ <li><roundcube:button command="acl-delete" label="delete" class="icon" classAct="icon active" innerclass="icon delete" /></li>
<roundcube:if condition="!in_array('acl_advanced_mode', (array)config:dont_override)" />
<li><roundcube:button name="acl-switch" id="acl-switch" label="acl.advanced" onclick="rcmail.command('acl-mode-switch')" class="active" /></li>
<roundcube:endif />
View
7 plugins/managesieve/tests/Makefile
@@ -1,7 +0,0 @@
-
-clean:
- rm -f *.log *.php *.diff *.exp *.out
-
-
-test:
- pear run-tests *.phpt
View
54 plugins/managesieve/tests/Parser.php
@@ -0,0 +1,54 @@
+<?php
+
+class Parser extends PHPUnit_Framework_TestCase
+{
+
+ function setUp()
+ {
+ include_once dirname(__FILE__) . '/../lib/rcube_sieve_script.php';
+ }
+
+ /**
+ * Sieve script parsing
+ *
+ * @dataProvider data_parser
+ */
+ function test_parser($input, $output, $message)
+ {
+ $script = new rcube_sieve_script($input);
+ $result = $script->as_text();
+
+ $this->assertEquals(trim($result), trim($output), $message);
+ }
+
+ /**
+ * Data provider for test_parser()
+ */
+ function data_parser()
+ {
+ $dir_path = realpath(dirname(__FILE__) . '/src');
+ $dir = opendir($dir_path);
+ $result = array();
+
+ while ($file = readdir($dir)) {
+ if (preg_match('/^[a-z0-9_]+$/', $file)) {
+ $input = file_get_contents($dir_path . '/' . $file);
+
+ if (file_exists($dir_path . '/' . $file . '.out')) {
+ $output = file_get_contents($dir_path . '/' . $file . '.out');
+ }
+ else {
+ $output = $input;
+ }
+
+ $result[] = array(
+ 'input' => $input,
+ 'output' => $output,
+ 'message' => "Error in parsing '$file' file",
+ );
+ }
+ }
+
+ return $result;
+ }
+}
View
33 plugins/managesieve/tests/Tokenizer.php
@@ -0,0 +1,33 @@
+<?php
+
+class Tokenizer extends PHPUnit_Framework_TestCase
+{
+
+ function setUp()
+ {
+ include_once dirname(__FILE__) . '/../lib/rcube_sieve_script.php';
+ }
+
+ function data_tokenizer()
+ {
+ return array(
+ array(1, "text: #test\nThis is test ; message;\nMulti line\n.\n;\n", '"This is test ; message;\nMulti line"'),
+ array(0, '["test1","test2"]', '[["test1","test2"]]'),
+ array(1, '["test"]', '["test"]'),
+ array(1, '"te\\"st"', '"te\\"st"'),
+ array(0, 'test #comment', '["test"]'),
+ array(0, "text:\ntest\n.\ntext:\ntest\n.\n", '["test","test"]'),
+ array(1, '"\\a\\\\\\"a"', '"a\\\\\\"a"'),
+ );
+ }
+
+ /**
+ * @dataProvider data_tokenizer
+ */
+ function test_tokenizer($num, $input, $output)
+ {
+ $res = json_encode(rcube_sieve_script::tokenize($input, $num));
+
+ $this->assertEquals(trim($res), trim($output));
+ }
+}
View
120 plugins/managesieve/tests/parser.phpt
@@ -1,120 +0,0 @@
---TEST--
-Main test of script parser
---SKIPIF--
---FILE--
-<?php
-include '../lib/rcube_sieve_script.php';
-
-$txt = '
-require ["fileinto","reject","envelope"];
-# rule:[spam]
-if anyof (header :contains "X-DSPAM-Result" "Spam")
-{
- fileinto "Spam";
- stop;
-}
-# rule:[test1]
-if anyof (header :comparator "i;ascii-casemap" :contains ["From","To"] "test@domain.tld")
-{
- discard;
- stop;
-}
-# rule:[test2]
-if anyof (not header :comparator "i;octet" :contains ["Subject"] "[test]", header :contains "Subject" "[test2]")
-{
- fileinto "test";
- stop;
-}
-# rule:[comments]
-if anyof (true) /* comment
- * "comment" #comment */ {
- /* comment */ stop;
-# comment
-}
-# rule:[reject]
-if size :over 5000K {
- reject "Message over 5MB size limit. Please contact me before sending this.";
-}
-# rule:[false]
-if false # size :over 5000K
-{
- stop; /* rule disabled */
-}
-# rule:[true]
-if true
-{
- stop;
-}
-fileinto "Test";
-# rule:[address test]
-if address :all :is "From" "nagios@domain.tld"
-{
- fileinto "domain.tld";
- stop;
-}
-# rule:[envelope test]
-if envelope :domain :is "From" "domain.tld"
-{
- fileinto "domain.tld";
- stop;
-}
-';
-
-$s = new rcube_sieve_script($txt);
-echo $s->as_text();
-
-// -------------------------------------------------------------------------------
-?>
---EXPECT--
-require ["fileinto","reject","envelope"];
-# rule:[spam]
-if header :contains "X-DSPAM-Result" "Spam"
-{
- fileinto "Spam";
- stop;
-}
-# rule:[test1]
-if header :contains ["From","To"] "test@domain.tld"
-{
- discard;
- stop;
-}
-# rule:[test2]
-if anyof (not header :comparator "i;octet" :contains "Subject" "[test]", header :contains "Subject" "[test2]")
-{
- fileinto "test";
- stop;
-}
-# rule:[comments]
-if true
-{
- stop;
-}
-# rule:[reject]
-if size :over 5000K
-{
- reject "Message over 5MB size limit. Please contact me before sending this.";
-}
-# rule:[false]
-if false # size :over 5000K
-{
- stop;
-}
-# rule:[true]
-if true
-{
- stop;
-}
-fileinto "Test";
-# rule:[address test]
-if address :all :is "From" "nagios@domain.tld"
-{
- fileinto "domain.tld";
- stop;
-}
-# rule:[envelope test]
-if envelope :domain :is "From" "domain.tld"
-{
- fileinto "domain.tld";
- stop;
-}
View
49 plugins/managesieve/tests/parser_body.phpt
@@ -1,49 +0,0 @@
---TEST--
-Test of Sieve body extension (RFC5173)
---SKIPIF--
---FILE--
-<?php
-include '../lib/rcube_sieve_script.php';
-
-$txt = '
-require ["body","fileinto"];
-if body :raw :contains "MAKE MONEY FAST"
-{
- stop;
-}
-if body :content "text" :contains ["missile","coordinates"]
-{
- fileinto "secrets";
-}
-if body :content "audio/mp3" :contains ""
-{
- fileinto "jukebox";
-}
-if body :text :contains "project schedule"
-{
- fileinto "project/schedule";
-}
-';
-
-$s = new rcube_sieve_script($txt);
-echo $s->as_text();
-
-?>
---EXPECT--
-require ["body","fileinto"];
-if body :raw :contains "MAKE MONEY FAST"
-{
- stop;
-}
-if body :content "text" :contains ["missile","coordinates"]
-{
- fileinto "secrets";
-}
-if body :content "audio/mp3" :contains ""
-{
- fileinto "jukebox";
-}
-if body :text :contains "project schedule"
-{
- fileinto "project/schedule";
-}
View
28 plugins/managesieve/tests/parser_imapflags.phpt
@@ -1,28 +0,0 @@
---TEST--
-Test of Sieve vacation extension (RFC5232)
---SKIPIF--
---FILE--
-<?php
-include '../lib/rcube_sieve_script.php';
-
-$txt = '
-require ["imapflags"];
-# rule:[imapflags]
-if header :matches "Subject" "^Test$" {
- setflag "\\\\Seen";
- addflag ["\\\\Answered","\\\\Deleted"];
-}
-';
-
-$s = new rcube_sieve_script($txt, array('imapflags'));
-echo $s->as_text();
-
-?>
---EXPECT--
-require ["imapflags"];
-# rule:[imapflags]
-if header :matches "Subject" "^Test$"
-{
- setflag "\\Seen";
- addflag ["\\Answered","\\Deleted"];
-}
View
30 plugins/managesieve/tests/parser_include.phpt
@@ -1,30 +0,0 @@
---TEST--
-Test of Sieve include extension
---SKIPIF--
---FILE--
-<?php
-include '../lib/rcube_sieve_script.php';
-
-$txt = '
-require ["include"];
-
-include "script.sieve";
-# rule:[two]
-if true
-{
- include :optional "second.sieve";
-}
-';
-
-$s = new rcube_sieve_script($txt, array(), array('variables'));
-echo $s->as_text();
-
-?>
---EXPECT--
-require ["include"];
-include "script.sieve";
-# rule:[two]
-if true
-{
- include :optional "second.sieve";
-}
View
19 plugins/managesieve/tests/parser_kep14.phpt
@@ -1,19 +0,0 @@
---TEST--
-Test of Kolab's KEP:14 implementation
---SKIPIF--
---FILE--
-<?php
-include '../lib/rcube_sieve_script.php';
-
-$txt = '
-# EDITOR Roundcube
-# EDITOR_VERSION 123
-';
-
-$s = new rcube_sieve_script($txt, array('body'));
-echo $s->as_text();
-
-?>
---EXPECT--
-# EDITOR Roundcube
-# EDITOR_VERSION 123
View
25 plugins/managesieve/tests/parser_prefix.phpt
@@ -1,25 +0,0 @@
---TEST--
-Test of prefix comments handling
---SKIPIF--
---FILE--
-<?php
-include '../lib/rcube_sieve_script.php';
-
-$txt = '
-# this is a comment
-# and the second line
-
-require ["variables"];
-set "b" "c";
-';
-
-$s = new rcube_sieve_script($txt, array(), array('variables'));
-echo $s->as_text();
-
-?>
---EXPECT--
-# this is a comment
-# and the second line
-
-require ["variables"];
-set "b" "c";
View
25 plugins/managesieve/tests/parser_relational.phpt
@@ -1,25 +0,0 @@
---TEST--
-Test of Sieve relational extension (RFC5231)
---SKIPIF--
---FILE--
-<?php
-include '../lib/rcube_sieve_script.php';
-
-$txt = '
-require ["relational","comparator-i;ascii-numeric"];
-# rule:[redirect]
-if header :value "ge" :comparator "i;ascii-numeric"
- ["X-Spam-score"] ["14"] {redirect "test@test.tld";}
-';
-
-$s = new rcube_sieve_script($txt);
-echo $s->as_text();
-
-?>
---EXPECT--
-require ["relational","comparator-i;ascii-numeric"];
-# rule:[redirect]
-if header :value "ge" :comparator "i;ascii-numeric" "X-Spam-score" "14"
-{
- redirect "test@test.tld";
-}
View
39 plugins/managesieve/tests/parser_vacation.phpt
@@ -1,39 +0,0 @@
---TEST--
-Test of Sieve vacation extension (RFC5230)
---SKIPIF--
---FILE--
-<?php
-include '../lib/rcube_sieve_script.php';
-
-$txt = '
-require ["vacation"];
-# rule:[test-vacation]
-if anyof (header :contains "Subject" "vacation")
-{
- vacation :days 1 text:
-# test
-test test /* test */
-test
-.
-;
- stop;
-}
-';
-
-$s = new rcube_sieve_script($txt);
-echo $s->as_text();
-
-?>
---EXPECT--
-require ["vacation"];
-# rule:[test-vacation]
-if header :contains "Subject" "vacation"
-{
- vacation :days 1 text:
-# test
-test test /* test */
-test
-.
-;
- stop;
-}
View
39 plugins/managesieve/tests/parser_variables.phpt
@@ -1,39 +0,0 @@
---TEST--
-Test of Sieve variables extension
---SKIPIF--
---FILE--
-<?php
-include '../lib/rcube_sieve_script.php';
-
-$txt = '
-require ["variables"];
-set "honorific" "Mr";
-set "vacation" text:
-Dear ${HONORIFIC} ${last_name},
-I am out, please leave a message after the meep.
-.
-;
-set :length "b" "${a}";
-set :lower "b" "${a}";
-set :upperfirst "b" "${a}";
-set :upperfirst :lower "b" "${a}";
-set :quotewildcard "b" "Rock*";
-';
-
-$s = new rcube_sieve_script($txt, array(), array('variables'));
-echo $s->as_text();
-
-?>
---EXPECT--
-require ["variables"];
-set "honorific" "Mr";
-set "vacation" text:
-Dear ${HONORIFIC} ${last_name},
-I am out, please leave a message after the meep.
-.
-;
-set :length "b" "${a}";
-set :lower "b" "${a}";
-set :upperfirst "b" "${a}";
-set :upperfirst :lower "b" "${a}";
-set :quotewildcard "b" "Rock*";
View
38 plugins/managesieve/tests/parset_subaddress.phpt
@@ -1,38 +0,0 @@
---TEST--
-Test of Sieve subaddress extension (RFC5233)
---SKIPIF--
---FILE--
-<?php
-include '../lib/rcube_sieve_script.php';
-
-$txt = '
-require ["envelope","subaddress","fileinto"];
-if envelope :user "To" "postmaster"
-{
- fileinto "postmaster";
- stop;
-}
-if envelope :detail :is "To" "mta-filters"
-{
- fileinto "mta-filters";
- stop;
-}
-';
-
-$s = new rcube_sieve_script($txt);
-echo $s->as_text();
-
-// -------------------------------------------------------------------------------
-?>
---EXPECT--
-require ["envelope","subaddress","fileinto"];
-if envelope :user "To" "postmaster"
-{
- fileinto "postmaster";
- stop;
-}
-if envelope :detail :is "To" "mta-filters"
-{
- fileinto "mta-filters";
- stop;
-}
View
52 plugins/managesieve/tests/src/parser
@@ -0,0 +1,52 @@
+require ["fileinto","reject","envelope"];
+# rule:[spam]
+if anyof (header :contains "X-DSPAM-Result" "Spam")
+{
+ fileinto "Spam";
+ stop;
+}
+# rule:[test1]
+if anyof (header :comparator "i;ascii-casemap" :contains ["From","To"] "test@domain.tld")
+{
+ discard;
+ stop;
+}
+# rule:[test2]
+if anyof (not header :comparator "i;octet" :contains ["Subject"] "[test]", header :contains "Subject" "[test2]")
+{
+ fileinto "test";
+ stop;
+}
+# rule:[comments]
+if anyof (true) /* comment
+ * "comment" #comment */ {
+ /* comment */ stop;
+# comment
+}
+# rule:[reject]
+if size :over 5000K {
+ reject "Message over 5MB size limit. Please contact me before sending this.";
+}
+# rule:[false]
+if false # size :over 5000K
+{
+ stop; /* rule disabled */
+}
+# rule:[true]
+if true
+{
+ stop;
+}
+fileinto "Test";
+# rule:[address test]
+if address :all :is "From" "nagios@domain.tld"
+{
+ fileinto "domain.tld";
+ stop;
+}
+# rule:[envelope test]
+if envelope :domain :is "From" "domain.tld"
+{
+ fileinto "domain.tld";
+ stop;
+}
View
52 plugins/managesieve/tests/src/parser.out
@@ -0,0 +1,52 @@
+require ["fileinto","reject","envelope"];
+# rule:[spam]
+if header :contains "X-DSPAM-Result" "Spam"
+{
+ fileinto "Spam";
+ stop;
+}
+# rule:[test1]
+if header :contains ["From","To"] "test@domain.tld"
+{
+ discard;
+ stop;
+}
+# rule:[test2]
+if anyof (not header :comparator "i;octet" :contains "Subject" "[test]", header :contains "Subject" "[test2]")
+{
+ fileinto "test";
+ stop;
+}
+# rule:[comments]
+if true
+{
+ stop;
+}
+# rule:[reject]
+if size :over 5000K
+{
+ reject "Message over 5MB size limit. Please contact me before sending this.";
+}
+# rule:[false]
+if false # size :over 5000K
+{
+ stop;
+}
+# rule:[true]
+if true
+{
+ stop;
+}
+fileinto "Test";
+# rule:[address test]
+if address :all :is "From" "nagios@domain.tld"
+{
+ fileinto "domain.tld";
+ stop;
+}
+# rule:[envelope test]
+if envelope :domain :is "From" "domain.tld"
+{
+ fileinto "domain.tld";
+ stop;
+}
View
17 plugins/managesieve/tests/src/parser_body
@@ -0,0 +1,17 @@
+require ["body","fileinto"];
+if body :raw :contains "MAKE MONEY FAST"
+{
+ stop;
+}
+if body :content "text" :contains ["missile","coordinates"]
+{
+ fileinto "secrets";
+}
+if body :content "audio/mp3" :contains ""
+{
+ fileinto "jukebox";
+}
+if body :text :contains "project schedule"
+{
+ fileinto "project/schedule";
+}
View
7 plugins/managesieve/tests/src/parser_imapflags
@@ -0,0 +1,7 @@
+require ["imap4flags"];
+# rule:[imapflags]
+if header :matches "Subject" "^Test$"
+{
+ setflag "\\Seen";
+ addflag ["\\Answered","\\Deleted"];
+}
View
7 plugins/managesieve/tests/src/parser_include
@@ -0,0 +1,7 @@
+require ["include"];
+include "script.sieve";
+# rule:[two]
+if true
+{
+ include :optional "second.sieve";
+}
View
2 plugins/managesieve/tests/src/parser_kep14
@@ -0,0 +1,2 @@
+# EDITOR Roundcube
+# EDITOR_VERSION 123
View
3 plugins/managesieve/tests/src/parser_kep14.out
@@ -0,0 +1,3 @@
+require ["variables"];
+set "EDITOR" "Roundcube";
+set "EDITOR_VERSION" "123";
View
5 plugins/managesieve/tests/src/parser_prefix
@@ -0,0 +1,5 @@
+# this is a comment
+# and the second line
+
+require ["variables"];
+set "b" "c";
View
6 plugins/managesieve/tests/src/parser_relational
@@ -0,0 +1,6 @@
+require ["relational","comparator-i;ascii-numeric"];
+# rule:[redirect]
+if header :value "ge" :comparator "i;ascii-numeric" "X-Spam-score" "14"
+{
+ redirect "test@test.tld";
+}
View
11 plugins/managesieve/tests/src/parser_subaddress
@@ -0,0 +1,11 @@
+require ["envelope","subaddress","fileinto"];
+if envelope :user "To" "postmaster"
+{
+ fileinto "postmaster";
+ stop;
+}
+if envelope :detail :is "To" "mta-filters"
+{
+ fileinto "mta-filters";
+ stop;
+}
View
12 plugins/managesieve/tests/src/parser_vacation
@@ -0,0 +1,12 @@
+require ["vacation"];
+# rule:[test-vacation]
+if header :contains "Subject" "vacation"
+{
+ vacation :days 1 text:
+# test
+test test /* test */
+test
+.
+;
+ stop;
+}
View
12 plugins/managesieve/tests/src/parser_variables
@@ -0,0 +1,12 @@
+require ["variables"];
+set "honorific" "Mr";
+set "vacation" text:
+Dear ${HONORIFIC} ${last_name},
+I am out, please leave a message after the meep.
+.
+;
+set :length "b" "${a}";
+set :lower "b" "${a}";
+set :upperfirst "b" "${a}";
+set :upperfirst :lower "b" "${a}";
+set :quotewildcard "b" "Rock*";
View
66 plugins/managesieve/tests/tokenize.phpt
@@ -1,66 +0,0 @@
---TEST--
-Script parsing: tokenizer
---SKIPIF--
---FILE--
-<?php
-include '../lib/rcube_sieve_script.php';
-
-$txt[1] = array(1, 'text: #test
-This is test ; message;
-Multi line
-.
-;
-');
-$txt[2] = array(0, '["test1","test2"]');
-$txt[3] = array(1, '["test"]');
-$txt[4] = array(1, '"te\\"st"');
-$txt[5] = array(0, 'test #comment');
-$txt[6] = array(0, 'text:
-test
-.
-text:
-test
-.
-');
-$txt[7] = array(1, '"\\a\\\\\\"a"');
-
-foreach ($txt as $idx => $t) {
- echo "[$idx]---------------\n";
- var_dump(rcube_sieve_script::tokenize($t[1], $t[0]));
-}
-?>
---EXPECT--
-[1]---------------
-string(34) "This is test ; message;
-Multi line"
-[2]---------------
-array(1) {
- [0]=>
- array(2) {
- [0]=>
- string(5) "test1"
- [1]=>
- string(5) "test2"
- }
-}
-[3]---------------
-array(1) {
- [0]=>
- string(4) "test"
-}
-[4]---------------
-string(5) "te"st"
-[5]---------------
-array(1) {
- [0]=>
- string(4) "test"
-}
-[6]---------------
-array(2) {
- [0]=>
- string(4) "test"
- [1]=>
- string(4) "test"
-}
-[7]---------------
-string(4) "a\"a"
View
4 plugins/password/drivers/virtualmin.php
@@ -48,6 +48,10 @@ function save($currpass, $newpass)
$pieces = explode("_", $username);
$domain = $pieces[0];
break;
+ case 8: // domain taken from alias, username left as it was
+ $email = $rcmail->user->data['alias'];
+ $domain = substr(strrchr($email, "@"), 1);
+ break;
default: // username@domain
$domain = substr(strrchr($username, "@"), 1);
}
View
6 program/include/rcube_charset.php
@@ -181,6 +181,12 @@ public static function convert($str, $from, $to = null)
$to = empty($to) ? strtoupper(RCMAIL_CHARSET) : self::parse_charset($to);
$from = self::parse_charset($from);
+ // It is a common case when UTF-16 charset is used with US-ASCII content (#1488654)
+ // In that case we can just skip the conversion (use UTF-8)
+ if ($from == 'UTF-16' && !preg_match('/[^\x00-\x7F]/', $str)) {
+ $from = 'UTF-8';
+ }
+
if ($from == $to || empty($str) || empty($from)) {
return $str;
}
View
4 program/include/rcube_imap.php
@@ -2222,6 +2222,10 @@ public function save_message($folder, &$message, $headers='', $is_file=false)
$folder = $this->folder;
}
+ if (!$this->check_connection()) {
+ return false;
+ }
+
// make sure folder exists
if ($this->folder_exists($folder)) {
if ($is_file) {
View
5 program/include/rcube_imap_generic.php
@@ -2538,7 +2538,7 @@ function append($mailbox, &$message)
{
unset($this->data['APPENDUID']);
- if (!$mailbox) {
+ if ($mailbox === null || $mailbox === '') {
return false;
}
@@ -2603,7 +2603,7 @@ function appendFromFile($mailbox, $path, $headers=null)
{
unset($this->data['APPENDUID']);
- if (!$mailbox) {
+ if ($mailbox === null || $mailbox === '') {
return false;
}
@@ -2612,6 +2612,7 @@ function appendFromFile($mailbox, $path, $headers=null)
if (file_exists(realpath($path))) {
$in_fp = fopen($path, 'r');
}
+
if (!$in_fp) {
$this->setError(self::ERROR_UNKNOWN, "Couldn't open $path for reading");
return false;
View
26 program/include/rcube_message.php
@@ -52,7 +52,8 @@ class rcube_message
private $opt = array();
private $parse_alternative = false;
- public $uid = null;
+ public $uid;
+ public $folder;
public $headers;
public $parts = array();
public $mime_parts = array();
@@ -68,17 +69,22 @@ class rcube_message
*
* Provide a uid, and parse message structure.
*
- * @param string $uid The message UID.
+ * @param string $uid The message UID.
+ * @param string $folder Folder name
*
* @see self::$app, self::$storage, self::$opt, self::$parts
*/
- function __construct($uid)
+ function __construct($uid, $folder = null)
{
$this->uid = $uid;
$this->app = rcube::get_instance();
$this->storage = $this->app->get_storage();
+ $this->folder = strlen($folder) ? $folder : $this->storage->get_folder();
$this->storage->set_options(array('all_headers' => true));
+ // Set current folder
+ $this->storage->set_folder($this->folder);
+
$this->headers = $this->storage->get_message($uid);
if (!$this->headers)
@@ -179,10 +185,12 @@ public function get_part_content($mime_id, $fp = null, $skip_charset_conv = fals
}
return $fp ? true : $part->body;
}
+
// get from IMAP
+ $this->storage->set_folder($this->folder);
+
return $this->storage->get_message_part($this->uid, $mime_id, $part, NULL, $fp, $skip_charset_conv);
- } else
- return null;
+ }
}
@@ -637,8 +645,10 @@ private function get_mime_numbers(&$part)
function tnef_decode(&$part)
{
// @TODO: attachment may be huge, hadle it via file
- if (!isset($part->body))
+ if (!isset($part->body)) {
+ $this->storage->set_folder($this->folder);
$part->body = $this->storage->get_message_part($this->uid, $part->mime_id, $part);
+ }
$parts = array();
$tnef = new tnef_decoder;
@@ -673,8 +683,10 @@ function tnef_decode(&$part)
function uu_decode(&$part)
{
// @TODO: messages may be huge, hadle body via file
- if (!isset($part->body))
+ if (!isset($part->body)) {
+ $this->storage->set_folder($this->folder);
$part->body = $this->storage->get_message_part($this->uid, $part->mime_id, $part);
+ }
$parts = array();
// FIXME: line length is max.65?
View
31 program/include/rcube_output_html.php
@@ -400,7 +400,7 @@ function parse($name = 'main', $exit = true, $write = true)
'line' => __LINE__,
'file' => __FILE__,
'message' => 'Error loading template for '.$realname
- ), true, true);
+ ), true, $write);
return false;
}
@@ -698,6 +698,11 @@ protected function xml_command($matches)
}
break;
+ // frame
+ case 'frame':
+ return $this->frame($attrib);
+ break;
+
// show a label
case 'label':
if ($attrib['name'] || $attrib['command']) {
@@ -1275,6 +1280,30 @@ protected function file_callback($matches)
}
+ /**
+ * Returns iframe object, registers some related env variables
+ *
+ * @param array $attrib HTML attributes
+ *
+ * @return string IFRAME element
+ */
+ public function frame($attrib)
+ {
+ if (!$attrib['id']) {
+ $attrib['id'] = 'rcmframe';
+ }
+
+ if (!$attrib['name']) {
+ $attrib['name'] = $attrib['id'];
+ }
+
+ $this->set_env('contentframe', $attrib['id']);
+ $this->set_env('blankpage', $attrib['src'] ? $this->abs_url($attrib['src']) : 'program/resources/blank.gif');
+
+ return html::iframe($attrib);
+ }
+
+
/* ************* common functions delivering gui objects ************** */
View
2 program/include/rcube_shared.inc
@@ -422,7 +422,6 @@ function rcube_autoload($classname)
{
$filename = preg_replace(
array(
- '/MDB2_(.+)/',
'/Mail_(.+)/',
'/Net_(.+)/',
'/Auth_(.+)/',
@@ -431,7 +430,6 @@ function rcube_autoload($classname)
),
array(
'Mail/\\1',
- 'Mail/\\1',
'Net/\\1',
'Auth/\\1',
'html',
View
2 program/include/rcube_storage.php
@@ -195,7 +195,7 @@ public function set_default_folders($arr)
*/
public function set_folder($folder)
{
- if ($this->folder == $folder) {
+ if ($this->folder === $folder) {
return;
}
View
95 program/js/app.js
@@ -1538,14 +1538,17 @@ function rcube_webmail()
if (list.multi_selecting || !this.env.contentframe)
return;
- if (list.get_single_selection() && window.frames && window.frames[this.env.contentframe]) {
- if (window.frames[this.env.contentframe].location.href.indexOf(this.env.blankpage)>=0) {
- if (this.preview_timer)
- clearTimeout(this.preview_timer);
- if (this.preview_read_timer)
- clearTimeout(this.preview_read_timer);
- this.preview_timer = setTimeout(function(){ ref.msglist_get_preview(); }, 200);
- }
+ if (list.get_single_selection())
+ return;
+
+ var win = this.get_frame_window(this.env.contentframe);
+
+ if (win && win.location.href.indexOf(this.env.blankpage)>=0) {
+ if (this.preview_timer)
+ clearTimeout(this.preview_timer);
+ if (this.preview_read_timer)
+ clearTimeout(this.preview_read_timer);
+ this.preview_timer = setTimeout(function(){ ref.msglist_get_preview(); }, 200);
}
};
@@ -1910,12 +1913,12 @@ function rcube_webmail()
if (!id)
return;
- var target = window,
+ var win, target = window,
action = preview ? 'preview': 'show',
url = '&_action='+action+'&_uid='+id+'&_mbox='+urlencode(this.env.mailbox);
- if (preview && this.env.contentframe && window.frames && window.frames[this.env.contentframe]) {
- target = window.frames[this.env.contentframe];
+ if (preview && (win = this.get_frame_window(this.env.contentframe))) {
+ target = win;
url += '&_framed=1';
}
@@ -1952,20 +1955,37 @@ function rcube_webmail()
this.show_contentframe = function(show)
{
- var frm, win;
- if (this.env.contentframe && (frm = $('#'+this.env.contentframe)) && frm.length) {
- if (!show && (win = window.frames[this.env.contentframe])) {
+ var frame, win, name = this.env.contentframe;
+
+ if (name && (frame = this.get_frame_element(name))) {
+ if (!show && (win = this.get_frame_window(name))) {
if (win.location && win.location.href.indexOf(this.env.blankpage)<0)
win.location.href = this.env.blankpage;
}
else if (!bw.safari && !bw.konq)
- frm[show ? 'show' : 'hide']();
- }
+ $(frame)[show ? 'show' : 'hide']();
+ }
if (!show && this.busy)
this.set_busy(false, null, this.env.frame_lock);
};
+ this.get_frame_element = function(id)
+ {
+ var frame;
+
+ if (id && (frame = document.getElementById(id)))
+ return frame;
+ };
+
+ this.get_frame_window = function(id)
+ {
+ var frame = this.get_frame_element(id);
+
+ if (frame && frame.name && window.frames)
+ return window.frames[frame.name];
+ };
+
this.lock_frame = function()
{
if (!this.env.frame_lock)
@@ -2009,7 +2029,7 @@ function rcube_webmail()
// list messages of a specific mailbox
this.list_mailbox = function(mbox, page, sort, url)
{
- var target = window;
+ var win, target = window;
if (typeof url != 'object')
url = {};
@@ -2048,8 +2068,8 @@ function rcube_webmail()
return;
}
- if (this.env.contentframe && window.frames && window.frames[this.env.contentframe]) {
- target = window.frames[this.env.contentframe];
+ if (win = this.get_frame_window(this.env.contentframe)) {
+ target = win;
url._framed = 1;
}
@@ -4015,7 +4035,7 @@ function rcube_webmail()
this.list_contacts = function(src, group, page)
{
- var folder, url = {},
+ var win, folder, url = {},
target = window;
if (!src)
@@ -4047,8 +4067,8 @@ function rcube_webmail()
return;
}
- if (this.env.contentframe && window.frames && window.frames[this.env.contentframe]) {
- target = window.frames[this.env.contentframe];
+ if (win = this.get_frame_window(this.env.contentframe)) {
+ target = win;
url._framed = 1;
}
@@ -4104,11 +4124,11 @@ function rcube_webmail()
// load contact record
this.load_contact = function(cid, action, framed)
{
- var url = {}, target = window;
+ var win, url = {}, target = window;
- if (this.env.contentframe && window.frames && window.frames[this.env.contentframe]) {
+ if (win = this.get_frame_window(this.env.contentframe)) {
url._framed = 1;
- target = window.frames[this.env.contentframe];
+ target = win;
this.show_contentframe(true);
// load dummy content
@@ -4726,11 +4746,11 @@ function rcube_webmail()
// load advanced search page
this.advanced_search = function()
{
- var url = {_form: 1, _action: 'search'}, target = window;
+ var win, url = {_form: 1, _action: 'search'}, target = window;
- if (this.env.contentframe && window.frames && window.frames[this.env.contentframe]) {
+ if (win = this.get_frame_window(this.env.contentframe)) {
url._framed = 1;
- target = window.frames[this.env.contentframe];
+ target = win;
this.contact_list.clear_selection();
}
@@ -4852,13 +4872,13 @@ function rcube_webmail()
// preferences section select and load options frame
this.section_select = function(list)
{
- var id = list.get_single_selection(), target = window,
+ var win, id = list.get_single_selection(), target = window,
url = {_action: 'edit-prefs', _section: id};
if (id) {
- if (this.env.contentframe && window.frames && window.frames[this.env.contentframe]) {
+ if (win = this.get_frame_window(this.env.contentframe)) {
url._framed = 1;
- target = window.frames[this.env.contentframe];
+ target = win;
}
this.location_href(url, target, true);
}
@@ -4881,13 +4901,12 @@ function rcube_webmail()
if (action == 'edit-identity' && (!id || id == this.env.iid))
return false;
- var target = window,
+ var win, target = window,
url = {_action: action, _iid: id};
- if (this.env.contentframe && window.frames && window.frames[this.env.contentframe]) {
+ if (win = this.get_frame_window(this.env.contentframe)) {
url._framed = 1;
- target = window.frames[this.env.contentframe];
- document.getElementById(this.env.contentframe).style.visibility = 'inherit';
+ target = win;
}
if (action && (id || action == 'add-identity')) {
@@ -5263,14 +5282,14 @@ function rcube_webmail()
// when user select a folder in manager
this.show_folder = function(folder, path, force)
{
- var target = window,
+ var win, target = window,
url = '&_action=edit-folder&_mbox='+urlencode(folder);
if (path)
url += '&_path='+urlencode(path);
- if (this.env.contentframe && window.frames && window.frames[this.env.contentframe]) {
- target = window.frames[this.env.contentframe];
+ if (win = this.get_frame_window(this.env.contentframe)) {
+ target = win;
url += '&_framed=1';
}
View
4 program/js/list.js
@@ -231,8 +231,8 @@ focus: function(e)
}
}
- // Un-focus already focused elements
- $(document.activeElement).blur();
+ // Un-focus already focused elements (#1487123, #1487316, #1488600, #1488620)
+ $(':focus:not(body)').blur();
$('iframe').each(function() { this.blur(); });
if (e || (e = window.event))
View
13 program/steps/mail/func.inc
@@ -90,11 +90,13 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list') {
// set current mailbox and some other vars in client environment
$OUTPUT->set_env('mailbox', $mbox_name);
$OUTPUT->set_env('pagesize', $RCMAIL->storage->get_pagesize());
- $OUTPUT->set_env('quota', $RCMAIL->storage->get_capability('QUOTA'));
$OUTPUT->set_env('delimiter', $RCMAIL->storage->get_hierarchy_delimiter());
$OUTPUT->set_env('threading', $threading);
$OUTPUT->set_env('threads', $threading || $RCMAIL->storage->get_capability('THREAD'));
$OUTPUT->set_env('preview_pane_mark_read', $RCMAIL->config->get('preview_pane_mark_read', 0));
+ if ($RCMAIL->storage->get_capability('QUOTA')) {
+ $OUTPUT->set_env('quota', true);
+ }
if ($CONFIG['delete_junk'])
$OUTPUT->set_env('delete_junk', true);
@@ -1053,12 +1055,17 @@ function rcmail_message_full_headers($attrib, $headers=NULL)
global $OUTPUT;
$html = html::div(array('id' => "all-headers", 'class' => "all", 'style' => 'display:none'), html::div(array('id' => 'headers-source'), ''));
- $html .= html::div(array('class' => "more-headers show-headers", 'onclick' => "return ".JS_OBJECT_NAME.".command('show-headers','',this)"), '');
+
+ if (!get_boolean($attrib['no-switch'])) {
+ $html .= html::div(array('class' => "more-headers show-headers", 'onclick' => "return ".JS_OBJECT_NAME.".command('show-headers','',this)"), '');
+ }
+
+ unset($attrib['no-switch']);
$OUTPUT->add_gui_object('all_headers_row', 'all-headers');
$OUTPUT->add_gui_object('all_headers_box', 'headers-source');
- return html::div($attrib, $html);
+ return count($attrib) > 1 ? html::div($attrib, $html) : $html;
}
View
3 program/steps/mail/headers.inc
@@ -24,7 +24,8 @@ if ($uid = get_input_value('_uid', RCUBE_INPUT_POST))
$source = $RCMAIL->storage->get_raw_headers($uid);
if ($source !== false) {
- $source = htmlspecialchars(trim($source));
+ $source = trim(rcube_charset::clean($source));
+ $source = htmlspecialchars($source);
$source = preg_replace(
array(
'/\n[\t\s]+/',
View
4 program/steps/settings/folders.inc
@@ -411,8 +411,10 @@ function rcmail_rename_folder($oldname, $newname)
$OUTPUT->set_pagetitle(rcube_label('folders'));
$OUTPUT->include_script('list.js');
-$OUTPUT->set_env('quota', $STORAGE->get_capability('QUOTA'));
$OUTPUT->set_env('prefix_ns', $STORAGE->get_namespace('prefix'));
+if ($STORAGE->get_capability('QUOTA')) {
+ $OUTPUT->set_env('quota', true);
+}
// add some labels to client
$OUTPUT->add_label('deletefolderconfirm', 'purgefolderconfirm', 'folderdeleting',
View
5 program/steps/settings/save_folder.inc
@@ -80,7 +80,10 @@ if (!$error && strlen($path) && (!strlen($old_imap) || $old_imap != $name_imap))
}
}
-if (!$error) {
+if ($error) {
+ $OUTPUT->command('display_message', $error, 'error');
+}
+else {
$folder['name'] = $name_imap;
$folder['oldname'] = $old_imap;
$folder['class'] = '';
View
15 skins/classic/templates/message.html
@@ -23,11 +23,9 @@
<div id="mailboxlist-container">
<div id="mailboxlist-title" class="boxtitle"><roundcube:label name="mailboxlist" /></div>
<div class="boxlistcontent">
-<roundcube:object name="mailboxlist" id="mailboxlist" maxlength="25" />
-</div>
-<div class="boxfooter">
- <roundcube:button name="mailboxmenulink" id="mailboxmenulink" type="link" title="folderactions" class="button groupactions" onclick="rcmail_ui.show_popup('mailboxmenu');return false" content=" " />
+ <roundcube:object name="mailboxlist" id="mailboxlist" maxlength="25" />
</div>
+<div class="boxfooter"></div>
</div>
</div>
@@ -57,14 +55,5 @@
rcmail.add_onload('mailviewsplitv.init()');
</script>
-<div id="mailboxoptionsmenu" class="popupmenu">
- <ul>
- <li><roundcube:button command="expunge" type="link" label="compact" classAct="active" /></li>
- <li class="separator_below"><roundcube:button command="purge" type="link" label="empty" classAct="active" /></li>
- <li><roundcube:button command="folders" task="settings" type="link" label="managefolders" classAct="active" /></li>
- <roundcube:container name="mailboxoptions" id="mailboxoptionsmenu" />
- </ul>
-</div>
-
</body>
</html>
View
15 skins/classic/templates/messageerror.html
@@ -42,11 +42,9 @@
<div id="mailboxlist-container">
<div class="boxtitle"><roundcube:label name="mailboxlist" /></div>
<div class="boxlistcontent">
-<roundcube:object name="mailboxlist" id="mailboxlist" folder_filter="mail" />
-</div>
-<div class="boxfooter">
- <roundcube:button name="mailboxmenulink" id="mailboxmenulink" type="link" title="folderactions" class="button groupactions" onclick="rcmail_ui.show_popup('mailboxmenu');return false" content=" " />
+ <roundcube:object name="mailboxlist" id="mailboxlist" folder_filter="mail" />
</div>
+<div class="boxfooter"></div>
</div>
</div>
@@ -63,15 +61,6 @@
rcmail.add_onload('mailviewsplitv.init()');
</script>
-<div id="mailboxoptionsmenu" class="popupmenu">
- <ul>
- <li><roundcube:button command="expunge" type="link" label="compact" classAct="active" /></li>
- <li class="separator_below"><roundcube:button command="purge" type="link" label="empty" classAct="active" /></li>
- <li><roundcube:button command="folders" task="settings" type="link" label="managefolders" classAct="active" /></li>
- <roundcube:container name="mailboxoptions" id="mailboxoptionsmenu" />
- </ul>
-</div>
-
</body>
<roundcube:endif />
View
1 skins/larry/addressbook.css
@@ -34,7 +34,6 @@
position: absolute;
top: -6px;
left: 0;
- right: 260px;
height: 40px;
white-space: nowrap;
z-index: 10;
View
6 skins/larry/ie7hacks.css
@@ -29,7 +29,7 @@ a.deletebutton,
.boxfooter .listbutton .inner,
.attachmentslist li a.delete,
.attachmentslist li a.cancelupload,
-#messagepreviewheader .iconlink {
+#messageheader .iconlink {
/* workaround for text-indent which also offsets the background image */
text-indent: 0;
font-size: 0;
@@ -45,7 +45,7 @@ a.deletebutton,
.pagenav a.button,
.pagenav a.button span.inner,
-#messagepreviewheader .iconlink,
+#messageheader .iconlink,
#uploadform a.iconlink {
display: inline;
}
@@ -67,7 +67,7 @@ a.deletebutton,
text-align: left;
}
-#messagepreviewheader .iconlink {
+#messageheader .iconlink {
color: #fff;
height: 14px;
}
View
2 skins/larry/iehacks.css
@@ -143,7 +143,7 @@ ul.toolbarmenu li a.active:hover,
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#005d76', endColorstr='#004558', GradientType=0);
}
-#messageheader, #partheader, #composeheaders {
+#partheader, #composeheaders {
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e9e9e9', GradientType=0);
}
View
BIN skins/larry/images/contactpic_32px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN skins/larry/images/contactpic_48px.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
90 skins/larry/mail.css
@@ -38,10 +38,6 @@
bottom: 28px;
}
-#mailview-top.fullheight {
- border-radius: 4px 4px 0 0;
-}
-
#mailview-bottom {
position: absolute;
left: 0;
@@ -50,6 +46,10 @@
height: 26px;
}
+#mailview-top.fullheight {
+ border-radius: 4px 4px 0 0;
+}
+
#folderlist-header {
width: 100%;
height: 12px;
@@ -341,7 +341,6 @@ a.iconbutton.threadmode.selected {
#messagetoolbar {
position: absolute;
top: -6px;
- right: 390px;
left: 0;
height: 40px;
white-space: nowrap;
@@ -362,7 +361,7 @@ a.iconbutton.threadmode.selected {
position: absolute;
right: 0;
top: 0;
- width: 240px;
+ width: 400px;
}
#mailpreviewtoggle {
@@ -383,11 +382,7 @@ a.iconbutton.threadmode.selected {
/*** message list ***/
#messagelist thead td:first-child {
- border-radius: 4px 0 0 0;
-}
-
-#messagelist thead td:last-child {
- border-radius: 0 4px 0 0;
+ border-radius: 4px 0 0 0; /* for Chrome */
}
#messagelist tr td.attachment,
@@ -680,15 +675,14 @@ a.iconbutton.threadmode.selected {
#messagecontent {
position: absolute;
- top: 140px;
+ top: 0;
left: 0;
width: 100%;
- bottom: 0;
+ bottom: 28px;
overflow: auto;
border-radius: 4px 4px 0 0;
}
-#messageheader,
#partheader,
#composeheaders {
position: relative;
@@ -712,7 +706,7 @@ h2.subject {
h3.subject {
font-size: 14px;
- margin: 0 8em 0 0;
+ margin: 0 13em 0 0;
padding: 8px 8px 4px 8px;
white-space: nowrap;
overflow: hidden;
@@ -787,6 +781,7 @@ h3.subject {
background: -ms-linear-gradient(left, #fbfbfb 0, #e9e9e9 100%);
background: linear-gradient(left, #fbfbfb 0, #e9e9e9 100%);
border-right: 1px solid #dfdfdf;
+ border-radius: 3px 0 0 0; /* for Opera */
}
#previewheaderstoggle .iconlink {
@@ -801,28 +796,29 @@ h3.subject {
#previewheaderstoggle.remove .iconlink {
top: auto;
- bottom: 5px;
+ bottom: 15px;
background-position: -5px -242px;
}
-div.more-headers {
- cursor: pointer;
- height: 10px;
- background: url(images/buttons.png) center -1619px no-repeat;
+#previewheaderstoggle .iconlink.allheaders {
+ display: none;
}
-div.hide-headers {
- background-position: center -1629px;
+#previewheaderstoggle.remove .iconlink.allheaders {
+ top: auto;
+ bottom: 2px;
+ display: inline-block;
+ background-position: -27px -242px;
}
#all-headers {
position: relative;
- margin: 0 10px;
+ margin: 2px 0;
padding: 0;
height: 180px;
- border: 1px solid #bbb;
+ background-color: #f0f0f0;
+ overflow: hidden;
border-radius: 4px;
- background: #fff;
}
#headers-source {
@@ -832,25 +828,30 @@ div.hide-headers {
left: 0;
right: 0;
bottom: 0;
- padding: 2px 5px;
+ padding: 2px;
overflow: auto;
text-align: left;
- color: #333;
+ color: #666;
}
-#messagepreviewheader {
+#messageheader {
position: relative;
height: auto;
margin: 0 8px 0 0;
- padding: 0 0 6px 72px;
+ padding: 0 0 0 72px;
border-bottom: 2px solid #f0f0f0;
}
-#messagepreviewheader h3.subject {
+#messagecontent #messageheader {
+ padding: 0 0 0 90px;
+ min-height: 68px;
+}
+
+#messageheader h3.subject {
padding: 8px 8px 2px 0;
}
-#messagepreviewheader #contactphoto {
+#messageheader #contactphoto {
display: block;
position: absolute;
top: 11px;
@@ -862,52 +863,40 @@ div.hide-headers {
border-radius: 3px;
}
-#messagepreviewheader #contactphoto img {
+#messageheader #contactphoto img {
width: 32px;
height: auto;
border-radius: 3px;
}
-#messageheader #contactphoto {
- display: block;
- position: absolute;
- top: 40px;
- right: 10px;
+#messagecontent #messageheader #contactphoto {
+ top: 11px;
+ left: 31px;
width: 48px;
height: 48px;
- overflow: hidden;
+ background: url(images/contactpic_48px.png) center center no-repeat #fff;
border-radius: 4px;
}
-#messageheader #contactphoto img {
+#messagecontent #messageheader #contactphoto img {
width: 48px;
height: auto;
border-radius: 4px;
}
-#messagepreviewheader #countcontrols,
#messageheader #countcontrols {
position: absolute;
top: 8px;
- right: 8px;
- width: 20em;
+ right: 0;
text-align: right;
white-space: nowrap;
}
-#messageheader .pagenav .countdisplay {
- min-width: 0;
- padding-right: 0.5em;
- white-space: nowrap;
-}
-
-#messagecontent .leftcol,
#messagepreview .leftcol {
margin-right: 252px;
overflow-x: auto;
}
-#messagecontent .rightcol,
#messagepreview .rightcol {
float: right;
/*
@@ -921,6 +910,7 @@ div.hide-headers {
min-height: 200px;
background: #f0f0f0;
padding: 8px;
+ border-radius: 4px;
}
#messagebody {
View
6 skins/larry/styles.css
@@ -647,6 +647,7 @@ a.iconlink.upload {
.uibox {
border: 1px solid #a3a3a3;
border-radius: 4px;
+ overflow: hidden;
box-shadow: 0 0 2px #999;
-o-box-shadow: 0 0 2px #999;
-webkit-box-shadow: 0 0 2px #999;
@@ -660,7 +661,7 @@ a.iconlink.upload {
left: 0;
bottom: 0;
width: 100%;
- min-width: 1150px;
+ min-width: 1024px;
}
.scroller {
@@ -698,7 +699,8 @@ a.iconlink.upload {
left: 0;
width: 100%;
bottom: 0;
- overflow: auto;
+ overflow-x: hidden;
+ overflow-y: auto;
}
.listbox .scroller.withfooter {
View
2 skins/larry/svggradient.php
@@ -11,6 +11,8 @@
* See http://creativecommons.org/licenses/by-sa/3.0/ for details.
*/
+ini_set('error_reporting', E_ALL &~ (E_NOTICE | E_STRICT));
+
header('Content-Type: image/svg+xml');
header("Expires: ".gmdate("D, d M Y H:i:s", time()+864000)." GMT");
header("Cache-Control: max-age=864000");
View
2 skins/larry/svggradients.css
@@ -133,7 +133,7 @@ ul.toolbarmenu li a.active:hover,
background-image: url(svggradient.php?c=005d76;004558);
}
-#messageheader, #partheader, #composeheaders {
+#partheader, #composeheaders {
background-image: url(svggradient.php?c=ffffff;e9e9e9);
}
View
61 skins/larry/templates/message.html
@@ -24,20 +24,38 @@
<!-- folders list -->
<div id="mailboxcontainer" class="uibox listbox">
-<div class="scroller">
-<roundcube:object name="mailboxlist" id="mailboxlist" class="listing" folder_filter="mail" unreadwrap="%s" />
-</div>
+ <div class="scroller">
+ <roundcube:object name="mailboxlist" id="mailboxlist" class="listing" folder_filter="mail" unreadwrap="%s" />
+ </div>
</div>
-</div>
+</div><!-- end mailview-left -->
+
+<div id="mailview-right" class="uibox" style="top: 42px">
+
+<div id="messagecontent">
+
+<div id="messageheader">
+<h3 class="subject"><roundcube:object name="messageHeaders" valueOf="subject" /></h3>
+
+<a href="#details" id="previewheaderstoggle"><span class="iconlink"></span><span id="headerstoggleall" class="iconlink allheaders"></span></a>
-<div id="mailview-right">
+<div id="contactphoto"><roundcube:object name="contactphoto" /></div>
-<div id="mailview-top">
-<div id="messageheader" class="uibox">
-<h2 class="subject"><roundcube:object name="messageHeaders" valueOf="subject" /></h2>
-<roundcube:object name="messageHeaders" class="headers-table" addicon="/images/addcontact.png" exclude="subject" />
-<roundcube:object name="messageFullHeaders" id="full-headers" />