diff options
| author | Nathan Kinkade <nkinkade@nkinka.de> | 2009-03-08 16:51:38 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nkinkade@nkinka.de> | 2009-03-11 12:51:52 +0000 |
| commit | 7718f6247d7f10f464b8b631b736fa2921e8a273 (patch) | |
| tree | baf71921d2bf8759e97703db3d681555f1ebf78d | |
| parent | 3f87b76045f296f2154b681046554286612cf547 (diff) | |
Changes necessary to implement a move-message dropdown button.
| -rw-r--r-- | roundcubemail/program/include/main.inc | 3 | ||||
| -rw-r--r-- | roundcubemail/program/localization/en_US/labels.inc | 7 | ||||
| -rw-r--r-- | roundcubemail/skins/npk/functions.js | 25 | ||||
| -rw-r--r-- | roundcubemail/skins/npk/mail.css | 39 | ||||
| -rw-r--r-- | roundcubemail/skins/npk/templates/mail.html | 17 |
5 files changed, 77 insertions, 14 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index 9adcd4cfc..c243d7b1d 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -1043,6 +1043,7 @@ function rcmail_render_folder_tree_html(&$arrFolders, &$mbox_name, &$jslist, $at $maxlength = intval($attrib['maxlength']); $realnames = (bool)$attrib['realnames']; $msgcounts = $RCMAIL->imap->get_cache('messagecount'); + $mailboxaction = ($attrib['mailboxaction']) ? $attrib['mailboxaction'] : 'list'; $idx = 0; $out = ''; @@ -1100,7 +1101,7 @@ function rcmail_render_folder_tree_html(&$arrFolders, &$mbox_name, &$jslist, $at $html_name = Q($foldername . ($unread ? " ($unread)" : '')); $link_attrib = $folder['virtual'] ? array() : array( 'href' => rcmail_url('', array('_mbox' => $folder['id'])), - 'onclick' => sprintf("return %s.command('list','%s',this)", JS_OBJECT_NAME, $js_name), + 'onclick' => sprintf("return %s.command('%s','%s',this)", JS_OBJECT_NAME, $mailboxaction, $js_name), 'title' => $title, ); diff --git a/roundcubemail/program/localization/en_US/labels.inc b/roundcubemail/program/localization/en_US/labels.inc index 29e2620c5..3b73363bd 100644 --- a/roundcubemail/program/localization/en_US/labels.inc +++ b/roundcubemail/program/localization/en_US/labels.inc @@ -177,7 +177,12 @@ $labels['buttonbarmark'] = 'Mark'; $labels['buttonbarreply'] = 'Reply'; $labels['buttonbarreplyall'] = 'Reply to all'; $labels['buttonbarforward'] = 'Forward'; -$labels['archivemessage'] = 'Move to archives folder'; +$labels['buttonbarmove'] = 'Move'; +$labels['buttonbarcopy'] = 'Copy'; + +$labels['archivemessages'] = 'Move to archives folder'; +$labels['movemessages'] = 'Move to selected folder'; +$labels['copymessages'] = 'Copy to selected folder'; // message compose $labels['compose'] = 'Compose a message'; diff --git a/roundcubemail/skins/npk/functions.js b/roundcubemail/skins/npk/functions.js index f2c26ede7..7d9b955eb 100644 --- a/roundcubemail/skins/npk/functions.js +++ b/roundcubemail/skins/npk/functions.js @@ -129,6 +129,7 @@ function rcmail_init_compose_form() function rcube_mail_ui() { this.markmenu = new rcube_layer('markmessagemenu'); + this.movemenu = new rcube_layer('movemessagemenu'); } rcube_mail_ui.prototype = { @@ -138,23 +139,41 @@ show_markmenu: function(show) if (typeof show == 'undefined') show = this.markmenu.visible ? false : true; - var ref = rcube_find_object('markmsgs'); + var ref = rcube_find_object('markmessagebutton'); if (show && ref) - this.markmenu.move(ref.offsetLeft, ref.offsetTop + ref.offsetHeight); + this.markmenu.move(ref.offsetLeft, ref.parentNode.height); this.markmenu.show(show); }, +show_movemenu: function(show) +{ + if (typeof show == 'undefined') + show = this.movemenu.visible ? false : true; + + var ref = rcube_find_object('movemessagebutton'); + if (show && ref) + this.movemenu.move(ref.offsetLeft, ref.parentNode.height); + + this.movemenu.show(show); +}, + body_mouseup: function(evt, p) { - if (this.markmenu && this.markmenu.visible && rcube_event.get_target(evt) != rcube_find_object('markreadbutton')) + var evtElm = rcube_event.get_target(evt); + if (this.markmenu && this.markmenu.visible && evtElm.parentNode != rcube_find_object('markmessagebutton') && evtElm != rcube_find_object('markmessagearrow')) this.show_markmenu(false); + if (this.movemenu && this.movemenu.visible && evtElm.parentNode != rcube_find_object('movemessagebutton') && evtElm != rcube_find_object('movemessagearrow')) + this.show_movemenu(false); }, +// hide menus if user presses Escape key body_keypress: function(evt, p) { if (rcube_event.get_keycode(evt) == 27 && this.markmenu && this.markmenu.visible) this.show_markmenu(false); + if (rcube_event.get_keycode(evt) == 27 && this.movemenu && this.movemenu.visible) + this.show_movemenu(false); } }; diff --git a/roundcubemail/skins/npk/mail.css b/roundcubemail/skins/npk/mail.css index 776370f22..60c1cc869 100644 --- a/roundcubemail/skins/npk/mail.css +++ b/roundcubemail/skins/npk/mail.css @@ -40,6 +40,24 @@ top: 8px; } +#messagetoolbar ul.move_mboxlist +{ + list-style-type: none; + margin: 5px 0 5px 0; + padding: 0 5px 0 5px; + +} + +#messagetoolbar ul.move_mboxlist a +{ + text-decoration: none; +} + +#messagetoolbar ul.move_mboxlist a:hover +{ + text-decoration: underline; +} + #messagetoolbar select.mboxlist option { padding-left: 15px; @@ -66,7 +84,7 @@ #messagetoolbar ul#actionmenu li a { text-decoration: none; - padding: 0; + padding: 3px 7px 3px 7px; } #messagetoolbar ul#actionmenu li @@ -76,7 +94,7 @@ border: 1px solid; border-color: #d4d4d4 #2e2e2e #2e2e2e #d4d4d4; margin: 0; - padding: 3px 10px 3px 10px; + padding: 3px 0px 3px 0px; font-size: x-small; } @@ -91,7 +109,7 @@ { position: absolute; top: 35px; - left: 165px; + left: 378px; width: auto; visibility: hidden; background-color: #F9F9F9; @@ -102,6 +120,21 @@ z-index: 240; } +#movemessagemenu +{ + position: absolute; + top: 35px; + left: 443px; + width: auto; + visibility: hidden; + background-color: #F9F9F9; + border: 1px solid #CCC; + padding: 1px; + opacity: 0.9; + filter:alpha(opacity=90); + z-index: 250; +} + ul.toolbarmenu { margin: 0; diff --git a/roundcubemail/skins/npk/templates/mail.html b/roundcubemail/skins/npk/templates/mail.html index 4018a0317..aba591e05 100644 --- a/roundcubemail/skins/npk/templates/mail.html +++ b/roundcubemail/skins/npk/templates/mail.html @@ -93,12 +93,13 @@ <div id="messagetoolbar"> <ul id="actionmenu"> -<li style="margin-right: 2em;"><roundcube:button name="archivemessage" id="archivemessage" type="link" label="buttonbararchive" image="NONE" title="archivemessage" onclick="rcmail.command('moveto', 'archives')" title="archivemessage" /></li> -<li><roundcube:button command="compose" type="link" label="buttonbarcompose" image="NONE" title="writenewmessage" /></li> -<li><roundcube:button name="markmsgs" id="markreadbutton" title="markmessages" onclick="rcmail_ui.show_markmenu();return false" label="buttonbarmark" image="/images/arrow_down.png" /></li> -<li><roundcube:button command="reply" type="link" label="buttonbarreply" image="NONE" title="replytomessage" /></li> -<li><roundcube:button command="reply-all" type="link" label="buttonbarreplyall" image="NONE" title="replytoallmessage" /></li> -<li><roundcube:button command="forward" type="link" label="buttonbarforward" image="NONE" title="forwardmessage" /></li> +<li style="margin-right: 2em;"><roundcube:button name="archivemessage" id="archivemessage" type="link" label="buttonbararchive" image="NONE" title="archivemessage" onclick="rcmail.command('moveto', 'archives')" title="archivemessages" /></li> +<li><roundcube:button command="compose" type="link" label="buttonbarcompose" title="writenewmessage" /></li> +<li><roundcube:button command="reply" type="link" label="buttonbarreply" title="replytomessage" /></li> +<li><roundcube:button command="reply-all" type="link" label="buttonbarreplyall" title="replytoallmessage" /></li> +<li><roundcube:button command="forward" type="link" label="buttonbarforward" title="forwardmessage" /></li> +<li id="markmessagebutton"><roundcube:button name="markmessagearrow" id="markmessagearrow" title="markmessages" onclick="rcmail_ui.show_markmenu();return false" label="buttonbarmark" image="/images/arrow_down.png" /></li> +<li id="movemessagebutton"><roundcube:button type="image" name="movemessagearrow" id="movemessagearrow" title="movemessages" onclick="rcmail_ui.show_movemenu();return false" label="buttonbarmove" image="/images/arrow_down.png" /></li> <a href="#" onclick="return rcmail.command('checkmail','',this)">Refresh</a> </ul> @@ -139,6 +140,10 @@ </ul> </div> +<div id="movemessagemenu"> + <roundcube:object name="mailboxlist" type="ul" maxlength="25" mailboxaction="moveto" class="move_mboxlist" /> +</div> + <div id="searchfilter"> <label for="rcmlistfilter"><roundcube:label name="filter" /></label>: <roundcube:object name="searchfilter" class="searchfilter" /> |
