Changeset 1044 in subversion


Ignore:
Timestamp:
Feb 11, 2008 5:45:26 PM (5 years ago)
Author:
thomasb
Message:

Add UI elements to mark the selected messages read/unread

Location:
trunk/roundcubemail
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/CHANGELOG

    r1027 r1044  
    11CHANGELOG RoundCube Webmail 
    22--------------------------- 
     3 
     42008/02/11 (thomasb) 
     5---------- 
     6- Add function to mark the selected messages as read/unread (#1457360) 
    37 
    482008/02/07 (thomasb) 
  • trunk/roundcubemail/program/include/rcmail_template.inc

    r1024 r1044  
    454454      // return a button 
    455455      case 'button': 
    456         if ($attrib['command']) 
    457           return $this->button($attrib); 
     456        return $this->button($attrib); 
    458457        break; 
    459458 
     
    583582    $skin_path = $this->config['skin_path']; 
    584583 
    585     if (!($attrib['command'] || $attrib['name'])) 
     584    if (!($attrib['command'] || $attrib['name'] || $attrib['onclick'])) 
    586585      return ''; 
    587586 
  • trunk/roundcubemail/program/localization/de_CH/labels.inc

    r950 r1044  
    111111$labels['backtolist']       = 'ZurÃŒck zur Liste'; 
    112112$labels['viewsource']       = 'Quelltext anzeigen'; 
     113$labels['markmessages']     = 'Nachrichten markieren'; 
     114$labels['markread']         = 'Als gelesen'; 
     115$labels['markunread']       = 'Als ungelesen'; 
    113116 
    114117$labels['select'] = 'AuswÀhlen'; 
  • trunk/roundcubemail/program/localization/de_DE/labels.inc

    r951 r1044  
    8888$labels['backtolist'] = 'ZurÃŒck zur Liste'; 
    8989$labels['viewsource'] = 'Quelltext anzeigen'; 
     90$labels['markmessages'] = 'Nachrichten markieren'; 
     91$labels['markread'] = 'Als gelesen'; 
     92$labels['markunread'] = 'Als ungelesen'; 
    9093$labels['select'] = 'AuswÀhlen'; 
    9194$labels['all'] = 'Alle'; 
  • trunk/roundcubemail/program/localization/en_US/labels.inc

    r950 r1044  
    110110$labels['backtolist']       = 'Back to message list'; 
    111111$labels['viewsource']       = 'Show source'; 
     112$labels['markmessages']     = 'Mark messages'; 
     113$labels['markread']         = 'As read'; 
     114$labels['markunread']       = 'As unread'; 
    112115 
    113116$labels['select'] = 'Select'; 
  • trunk/roundcubemail/skins/default/mail.css

    r1027 r1044  
    4040{ 
    4141  padding-left: 2px; 
     42} 
     43 
     44#markmessagemenu 
     45{ 
     46  position: absolute; 
     47  top: 32px; 
     48  left: 90px; 
     49  width: auto; 
     50  visibility: hidden; 
     51  background-color: #F9F9F9; 
     52  border: 1px solid #CCC; 
     53  padding: 1px; 
     54  opacity: 0.9; 
     55  z-index: 240; 
     56} 
     57 
     58ul.toolbarmenu 
     59{ 
     60  margin: 0; 
     61  padding: 0; 
     62  list-style: none; 
     63} 
     64 
     65ul.toolbarmenu li 
     66{ 
     67  font-size: 11px; 
     68  white-space: nowrap; 
     69  min-width: 130px; 
     70  width: auto !important; 
     71  width: 130px; 
     72} 
     73 
     74ul.toolbarmenu li a 
     75{ 
     76  display: block; 
     77  color: #a0a0a0; 
     78  padding: 2px 8px 3px 12px; 
     79  text-decoration: none; 
     80} 
     81 
     82ul.toolbarmenu li a.active:hover 
     83{ 
     84  background-color: #ddd; 
    4285} 
    4386 
     
    72115#mailboxcontrols a.active:active, 
    73116#mailboxcontrols a.active:visited, 
     117ul.toolbarmenu li a.active, 
     118ul.toolbarmenu li a.active:active, 
     119ul.toolbarmenu li a.active:visited, 
    74120td.formlinks a, 
    75121td.formlinks a:visited 
     
    191237  display: block; 
    192238  height: 12px; 
     239  margin: 0; 
    193240  padding: 3px 10px 4px 10px; 
    194241  background-color: #EBEBEB; 
  • trunk/roundcubemail/skins/default/templates/mail.html

    r808 r1044  
    66<link rel="stylesheet" type="text/css" href="/mail.css" /> 
    77<script type="text/javascript" src="/splitter.js"></script> 
     8<script type="text/javascript"> 
     9 
     10function rcube_mail_ui() 
     11{ 
     12  this.markmenu = new rcube_layer('markmessagemenu'); 
     13} 
     14 
     15rcube_mail_ui.prototype = { 
     16 
     17show_markmenu: function(show) 
     18{ 
     19  if (typeof show == 'undefined') 
     20    show = this.markmenu.visible ? false : true; 
     21   
     22  var ref = rcube_find_object('markreadbutton'); 
     23  if (show && ref) 
     24    this.markmenu.move(ref.offsetLeft, ref.offsetTop + ref.offsetHeight); 
     25   
     26  this.markmenu.show(show); 
     27}, 
     28 
     29body_mouseup: function(evt, p) 
     30{ 
     31  if (this.markmenu && this.markmenu.visible) 
     32    this.show_markmenu(false); 
     33}, 
     34 
     35body_keypress: function(evt, p) 
     36{ 
     37  if (rcube_event.get_keycode(evt) == 27 && this.markmenu && this.markmenu.visible) 
     38    this.show_markmenu(false); 
     39} 
     40 
     41}; 
     42 
     43</script> 
    844</head> 
    945<body> 
     
    1248<roundcube:include file="/includes/header.html" /> 
    1349 
    14 <div id="messagetoolbar"> 
    15 <roundcube:button command="checkmail" imageSel="/images/buttons/inbox_sel.png" imageAct="/images/buttons/inbox_act.png" imagePas="/images/buttons/inbox_pas.png" width="32" height="32" title="checkmail" /> 
    16 <roundcube:button command="compose" imageSel="/images/buttons/compose_sel.png" imageAct="/images/buttons/compose_act.png" imagePas="/images/buttons/compose_pas.png" width="32" height="32" title="writenewmessage" /> 
    17 <roundcube:button command="reply" imageSel="/images/buttons/reply_sel.png" imageAct="/images/buttons/reply_act.png" imagePas="/images/buttons/reply_pas.png" width="32" height="32" title="replytomessage" /> 
    18 <roundcube:button command="reply-all" imageSel="/images/buttons/replyall_sel.png" imageAct="/images/buttons/replyall_act.png" imagePas="/images/buttons/replyall_pas.png" width="32" height="32" title="replytoallmessage" /> 
    19 <roundcube:button command="forward" imageSel="/images/buttons/forward_sel.png" imageAct="/images/buttons/forward_act.png" imagePas="/images/buttons/forward_pas.png" width="32" height="32" title="forwardmessage" /> 
    20 <roundcube:button command="delete" imageSel="/images/buttons/delete_sel.png" imageAct="/images/buttons/delete_act.png" imagePas="/images/buttons/delete_pas.png" width="32" height="32" title="deletemessage" /> 
    21 <roundcube:button command="print" imageSel="/images/buttons/print_sel.png" imageAct="/images/buttons/print_act.png" imagePas="/images/buttons/print_pas.png" width="32" height="32" title="printmessage" /> 
    22 </div> 
    23  
    24 <div id="quicksearchbar"> 
    25 <roundcube:object name="searchform" type="search" results="5" id="quicksearchbox" /><roundcube:button command="reset-search" id="searchreset" image="/images/icons/reset.gif" title="resetsearch" /> 
    26 </div> 
    27  
    28 <div id="messagecountbar"> 
    29 <roundcube:button command="firstpage" imageSel="/images/buttons/first_sel.png" imageAct="/images/buttons/first_act.png" imagePas="/images/buttons/first_pas.png" width="11" height="11" title="firstmessages" /> 
    30 <roundcube:button command="previouspage" imageSel="/images/buttons/previous_sel.png" imageAct="/images/buttons/previous_act.png" imagePas="/images/buttons/previous_pas.png" width="11" height="11" title="previousmessages" /> 
    31 &nbsp;<roundcube:object name="messageCountDisplay" />&nbsp; 
    32 <roundcube:button command="nextpage" imageSel="/images/buttons/next_sel.png" imageAct="/images/buttons/next_act.png" imagePas="/images/buttons/next_pas.png" width="11" height="11" title="nextmessages" /> 
    33 <roundcube:button command="lastpage" imageSel="/images/buttons/last_sel.png" imageAct="/images/buttons/last_act.png" imagePas="/images/buttons/last_pas.png" width="11" height="11" title="lastmessages" /> 
    34 </div> 
    35  
    3650<div id="mailboxlist-container"> 
    37 <div id="mailboxlist-header"><roundcube:label name="mailboxlist" /></div> 
     51<h3 id="mailboxlist-header"><roundcube:label name="mailboxlist" /></h3> 
    3852<roundcube:object name="mailboxlist" id="mailboxlist" maxlength="16" /> 
    3953</div> 
     
    8599</div> 
    86100 
     101<div id="messagetoolbar"> 
     102<roundcube:button command="checkmail" imageSel="/images/buttons/inbox_sel.png" imageAct="/images/buttons/inbox_act.png" imagePas="/images/buttons/inbox_pas.png" width="32" height="32" title="checkmail" /> 
     103<roundcube:button command="compose" imageSel="/images/buttons/compose_sel.png" imageAct="/images/buttons/compose_act.png" imagePas="/images/buttons/compose_pas.png" width="32" height="32" title="writenewmessage" /> 
     104<roundcube:button id="markreadbutton" image="/images/buttons/markread_act.png" width="32" height="32" title="markmessages" onclick="rcmailUI.show_markmenu();return false" /> 
     105<roundcube:button command="reply" imageSel="/images/buttons/reply_sel.png" imageAct="/images/buttons/reply_act.png" imagePas="/images/buttons/reply_pas.png" width="32" height="32" title="replytomessage" /> 
     106<roundcube:button command="reply-all" imageSel="/images/buttons/replyall_sel.png" imageAct="/images/buttons/replyall_act.png" imagePas="/images/buttons/replyall_pas.png" width="32" height="32" title="replytoallmessage" /> 
     107<roundcube:button command="forward" imageSel="/images/buttons/forward_sel.png" imageAct="/images/buttons/forward_act.png" imagePas="/images/buttons/forward_pas.png" width="32" height="32" title="forwardmessage" /> 
     108<roundcube:button command="delete" imageSel="/images/buttons/delete_sel.png" imageAct="/images/buttons/delete_act.png" imagePas="/images/buttons/delete_pas.png" width="32" height="32" title="deletemessage" /> 
     109<roundcube:button command="print" imageSel="/images/buttons/print_sel.png" imageAct="/images/buttons/print_act.png" imagePas="/images/buttons/print_pas.png" width="32" height="32" title="printmessage" /> 
     110 
     111<div id="markmessagemenu"> 
     112  <ul class="toolbarmenu"> 
     113    <li><roundcube:button command="mark" prop="read" label="markread" classAct="active" /></li> 
     114    <li><roundcube:button command="mark" prop="unread" label="markunread" classAct="active" /></li> 
     115  </ul> 
     116</div> 
     117</div> 
     118 
     119<div id="quicksearchbar"> 
     120<roundcube:object name="searchform" type="search" results="5" id="quicksearchbox" /><roundcube:button command="reset-search" id="searchreset" image="/images/icons/reset.gif" title="resetsearch" /> 
     121</div> 
     122 
     123<div id="messagecountbar"> 
     124<roundcube:button command="firstpage" imageSel="/images/buttons/first_sel.png" imageAct="/images/buttons/first_act.png" imagePas="/images/buttons/first_pas.png" width="11" height="11" title="firstmessages" /> 
     125<roundcube:button command="previouspage" imageSel="/images/buttons/previous_sel.png" imageAct="/images/buttons/previous_act.png" imagePas="/images/buttons/previous_pas.png" width="11" height="11" title="previousmessages" /> 
     126&nbsp;<roundcube:object name="messageCountDisplay" />&nbsp; 
     127<roundcube:button command="nextpage" imageSel="/images/buttons/next_sel.png" imageAct="/images/buttons/next_act.png" imagePas="/images/buttons/next_pas.png" width="11" height="11" title="nextmessages" /> 
     128<roundcube:button command="lastpage" imageSel="/images/buttons/last_sel.png" imageAct="/images/buttons/last_act.png" imagePas="/images/buttons/last_pas.png" width="11" height="11" title="lastmessages" /> 
     129</div> 
     130 
     131<script type="text/javascript"> 
     132 
     133var rcmailUI = new rcube_mail_ui(); 
     134rcube_event.add_listener({ object:rcmailUI, method:'body_mouseup', event:'mouseup' }); 
     135rcube_event.add_listener({ object:rcmailUI, method:'body_keypress', event:'keypress' }); 
     136   
     137</script> 
    87138</body> 
    88139</html> 
Note: See TracChangeset for help on using the changeset viewer.