diff --git a/CHANGELOG b/CHANGELOG
index 7f04880b4..def887dd3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,10 @@
CHANGELOG RoundCube Webmail
---------------------------
+2008/02/11 (thomasb)
+----------
+- Add function to mark the selected messages as read/unread (#1457360)
+
2008/02/07 (thomasb)
----------
- Remember decision to display images for a certain message during session (#1484754)
diff --git a/program/include/rcmail_template.inc b/program/include/rcmail_template.inc
index d6eb35ca5..301b3f20d 100644
--- a/program/include/rcmail_template.inc
+++ b/program/include/rcmail_template.inc
@@ -453,8 +453,7 @@ class rcmail_template extends rcube_html_page
{
// return a button
case 'button':
- if ($attrib['command'])
- return $this->button($attrib);
+ return $this->button($attrib);
break;
// show a label
@@ -582,7 +581,7 @@ class rcmail_template extends rcube_html_page
$skin_path = $this->config['skin_path'];
- if (!($attrib['command'] || $attrib['name']))
+ if (!($attrib['command'] || $attrib['name'] || $attrib['onclick']))
return '';
// try to find out the button type
diff --git a/program/localization/de_CH/labels.inc b/program/localization/de_CH/labels.inc
index a626d32c0..3d2c81500 100644
--- a/program/localization/de_CH/labels.inc
+++ b/program/localization/de_CH/labels.inc
@@ -110,6 +110,9 @@ $labels['lastmessage'] = 'Die letzte Nachricht anzeigen';
$labels['lastmessages'] = 'Die letzten Nachrichten anzeigen';
$labels['backtolist'] = 'Zurück zur Liste';
$labels['viewsource'] = 'Quelltext anzeigen';
+$labels['markmessages'] = 'Nachrichten markieren';
+$labels['markread'] = 'Als gelesen';
+$labels['markunread'] = 'Als ungelesen';
$labels['select'] = 'Auswählen';
$labels['all'] = 'Alle';
diff --git a/program/localization/de_DE/labels.inc b/program/localization/de_DE/labels.inc
index e2b13674f..409c4af8d 100644
--- a/program/localization/de_DE/labels.inc
+++ b/program/localization/de_DE/labels.inc
@@ -87,6 +87,9 @@ $labels['lastmessage'] = 'Die letzte Nachricht anzeigen';
$labels['lastmessages'] = 'Die letzten Nachrichten anzeigen';
$labels['backtolist'] = 'Zurück zur Liste';
$labels['viewsource'] = 'Quelltext anzeigen';
+$labels['markmessages'] = 'Nachrichten markieren';
+$labels['markread'] = 'Als gelesen';
+$labels['markunread'] = 'Als ungelesen';
$labels['select'] = 'Auswählen';
$labels['all'] = 'Alle';
$labels['none'] = 'Keine';
diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc
index 769045fbb..533e40f99 100644
--- a/program/localization/en_US/labels.inc
+++ b/program/localization/en_US/labels.inc
@@ -109,6 +109,9 @@ $labels['lastmessage'] = 'Show the last message';
$labels['lastmessages'] = 'Show last set of messages';
$labels['backtolist'] = 'Back to message list';
$labels['viewsource'] = 'Show source';
+$labels['markmessages'] = 'Mark messages';
+$labels['markread'] = 'As read';
+$labels['markunread'] = 'As unread';
$labels['select'] = 'Select';
$labels['all'] = 'All';
diff --git a/skins/default/images/buttons/markread_act.png b/skins/default/images/buttons/markread_act.png
new file mode 100644
index 000000000..32c051140
Binary files /dev/null and b/skins/default/images/buttons/markread_act.png differ
diff --git a/skins/default/mail.css b/skins/default/mail.css
index 9cb50f555..ac05f0124 100644
--- a/skins/default/mail.css
+++ b/skins/default/mail.css
@@ -41,6 +41,49 @@
padding-left: 2px;
}
+#markmessagemenu
+{
+ position: absolute;
+ top: 32px;
+ left: 90px;
+ width: auto;
+ visibility: hidden;
+ background-color: #F9F9F9;
+ border: 1px solid #CCC;
+ padding: 1px;
+ opacity: 0.9;
+ z-index: 240;
+}
+
+ul.toolbarmenu
+{
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+ul.toolbarmenu li
+{
+ font-size: 11px;
+ white-space: nowrap;
+ min-width: 130px;
+ width: auto !important;
+ width: 130px;
+}
+
+ul.toolbarmenu li a
+{
+ display: block;
+ color: #a0a0a0;
+ padding: 2px 8px 3px 12px;
+ text-decoration: none;
+}
+
+ul.toolbarmenu li a.active:hover
+{
+ background-color: #ddd;
+}
+
#listcontrols
{
position: absolute;
@@ -71,6 +114,9 @@ td.formlinks a:visited
#mailboxcontrols a.active,
#mailboxcontrols a.active:active,
#mailboxcontrols a.active:visited,
+ul.toolbarmenu li a.active,
+ul.toolbarmenu li a.active:active,
+ul.toolbarmenu li a.active:visited,
td.formlinks a,
td.formlinks a:visited
{
@@ -190,6 +236,7 @@ td.formlinks a:visited
{
display: block;
height: 12px;
+ margin: 0;
padding: 3px 10px 4px 10px;
background-color: #EBEBEB;
background-image: url(images/listheader_aqua.gif);
diff --git a/skins/default/templates/mail.html b/skins/default/templates/mail.html
index a38c06aee..2c3846b2b 100644
--- a/skins/default/templates/mail.html
+++ b/skins/default/templates/mail.html
@@ -5,36 +5,50 @@