diff options
| author | Nathan Kinkade <nkinkade@nkinka.de> | 2009-03-08 21:13:21 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nkinkade@nkinka.de> | 2009-03-11 12:51:52 +0000 |
| commit | f807a4f4b549c285c5ebf91d77cf207cb9ef8e6d (patch) | |
| tree | c84039d0d8bd2afe1033079bb357155066496239 | |
| parent | 7718f6247d7f10f464b8b631b736fa2921e8a273 (diff) | |
Bits and pieces needed for a copy-message dropdown.
| -rw-r--r-- | roundcubemail/program/js/app.js | 12 | ||||
| -rw-r--r-- | roundcubemail/program/localization/en_US/messages.inc | 6 | ||||
| -rw-r--r-- | roundcubemail/skins/npk/functions.js | 17 | ||||
| -rw-r--r-- | roundcubemail/skins/npk/mail.css | 21 | ||||
| -rw-r--r-- | roundcubemail/skins/npk/templates/mail.html | 9 |
5 files changed, 52 insertions, 13 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index fbe1dcd75..d8721fdde 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -277,7 +277,7 @@ function rcube_webmail() if ((this.env.action=='add' || this.env.action=='edit') && this.gui_objects.editform) this.enable_command('save', true); else - this.enable_command('search', 'reset-search', 'moveto', 'import', true); + this.enable_command('search', 'reset-search', 'moveto', 'copyto', 'import', true); if (this.contact_list && this.contact_list.rowcount > 0) this.enable_command('export', true); @@ -1348,12 +1348,12 @@ function rcube_webmail() { this.enable_command('reply', 'reply-all', 'forward', false); this.enable_command('show', 'print', selected); - this.enable_command('delete', 'moveto', 'mark', (list.selection.length > 0 ? true : false)); + this.enable_command('delete', 'moveto', 'copyto', 'mark', (list.selection.length > 0 ? true : false)); } else { this.enable_command('show', 'reply', 'reply-all', 'forward', 'print', selected); - this.enable_command('delete', 'moveto', 'mark', (list.selection.length > 0 ? true : false)); + this.enable_command('delete', 'moveto', 'copyto', 'mark', (list.selection.length > 0 ? true : false)); } // start timer for message preview (wait for double click) @@ -1773,7 +1773,7 @@ function rcube_webmail() lock = true; this.set_busy(true, 'copyingmessage'); } - + // Hide message command buttons until a message is selected this.enable_command('reply', 'reply-all', 'forward', 'delete', 'mark', 'print', false); @@ -4029,7 +4029,7 @@ function rcube_webmail() else if (this.message_list) this.message_list.init(); break; - + case 'purge': case 'expunge': if (!this.env.messagecount && this.task == 'mail') { @@ -4037,7 +4037,7 @@ function rcube_webmail() if (this.env.contentframe) this.show_contentframe(false); // disable commands useless when mailbox is empty - this.enable_command('show', 'reply', 'reply-all', 'forward', 'moveto', 'delete', 'mark', 'viewsource', + this.enable_command('show', 'reply', 'reply-all', 'forward', 'moveto', 'copyto', 'delete', 'mark', 'viewsource', 'print', 'load-attachment', 'purge', 'expunge', 'select-all', 'select-none', 'sort', 'expand-all', 'collapse-all', false); } diff --git a/roundcubemail/program/localization/en_US/messages.inc b/roundcubemail/program/localization/en_US/messages.inc index ed63c7c47..56e306565 100644 --- a/roundcubemail/program/localization/en_US/messages.inc +++ b/roundcubemail/program/localization/en_US/messages.inc @@ -43,7 +43,8 @@ $messages['sendingfailed'] = 'Failed to send message'; $messages['senttooquickly'] = 'Please wait $sec sec(s). before sending this message'; $messages['errorsavingsent'] = 'An error occured while saving sent message'; $messages['errorsaving'] = 'An error occured while saving'; -$messages['errormoving'] = 'Could not move the message'; +$messages['errormoving'] = 'Could not move the message(s)'; +$messages['errorcopying'] = 'Could not copy the message(s)'; $messages['errordeleting'] = 'Could not delete the message'; $messages['deletecontactconfirm'] = 'Do you really want to delete the selected contact(s)?'; $messages['deletemessagesconfirm'] = 'Do you really want to delete the selected message(s)?'; @@ -80,7 +81,8 @@ $messages['copysuccess'] = 'Successfully copied $nr addresses'; $messages['copyerror'] = 'Could not copy any addresses'; $messages['sourceisreadonly'] = 'This address source is read only'; $messages['errorsavingcontact'] = 'Could not save the contact address'; -$messages['movingmessage'] = 'Moving message...'; +$messages['movingmessage'] = 'Moving message(s)...'; +$messages['copyingmessage'] = 'Copying message(s)...'; $messages['receiptsent'] = 'Successfully sent a read receipt'; $messages['errorsendingreceipt'] = 'Could not send the receipt'; $messages['nodeletelastidentity'] = 'You cannot delete this identity, it\'s your last one.'; diff --git a/roundcubemail/skins/npk/functions.js b/roundcubemail/skins/npk/functions.js index 7d9b955eb..d8123e462 100644 --- a/roundcubemail/skins/npk/functions.js +++ b/roundcubemail/skins/npk/functions.js @@ -130,6 +130,7 @@ function rcube_mail_ui() { this.markmenu = new rcube_layer('markmessagemenu'); this.movemenu = new rcube_layer('movemessagemenu'); + this.copymenu = new rcube_layer('copymessagemenu'); } rcube_mail_ui.prototype = { @@ -158,6 +159,18 @@ show_movemenu: function(show) this.movemenu.show(show); }, +show_copymenu: function(show) +{ + if (typeof show == 'undefined') + show = this.copymenu.visible ? false : true; + + var ref = rcube_find_object('copymessagebutton'); + if (show && ref) + this.copymenu.move(ref.offsetLeft, ref.parentNode.height); + + this.copymenu.show(show); +}, + body_mouseup: function(evt, p) { var evtElm = rcube_event.get_target(evt); @@ -165,6 +178,8 @@ body_mouseup: function(evt, p) 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); + if (this.copymenu && this.copymenu.visible && evtElm.parentNode != rcube_find_object('copymessagebutton') && evtElm != rcube_find_object('copymessagearrow')) + this.show_copymenu(false); }, // hide menus if user presses Escape key @@ -174,6 +189,8 @@ body_keypress: function(evt, p) this.show_markmenu(false); if (rcube_event.get_keycode(evt) == 27 && this.movemenu && this.movemenu.visible) this.show_movemenu(false); + if (rcube_event.get_keycode(evt) == 27 && this.copymenu && this.copymenu.visible) + this.show.copymenu(false); } }; diff --git a/roundcubemail/skins/npk/mail.css b/roundcubemail/skins/npk/mail.css index 60c1cc869..4c747ba8d 100644 --- a/roundcubemail/skins/npk/mail.css +++ b/roundcubemail/skins/npk/mail.css @@ -40,7 +40,7 @@ top: 8px; } -#messagetoolbar ul.move_mboxlist +#messagetoolbar ul.move_copy_mboxlist { list-style-type: none; margin: 5px 0 5px 0; @@ -48,12 +48,12 @@ } -#messagetoolbar ul.move_mboxlist a +#messagetoolbar ul.move_copy_mboxlist a { text-decoration: none; } -#messagetoolbar ul.move_mboxlist a:hover +#messagetoolbar ul.move_copy_mboxlist a:hover { text-decoration: underline; } @@ -135,6 +135,21 @@ z-index: 250; } +#copymessagemenu +{ + position: absolute; + top: 35px; + left: 468px; + 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 aba591e05..40001928f 100644 --- a/roundcubemail/skins/npk/templates/mail.html +++ b/roundcubemail/skins/npk/templates/mail.html @@ -99,7 +99,8 @@ <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> +<li id="movemessagebutton"><roundcube:button name="movemessagearrow" id="movemessagearrow" title="movemessages" onclick="rcmail_ui.show_movemenu();return false" label="buttonbarmove" image="/images/arrow_down.png" /></li> +<li id="copymessagebutton"><roundcube:button name="copymessagearrow" id="copymessagearrow" title="copymessages" onclick="rcmail_ui.show_copymenu();return false" label="buttonbarcopy" image="/images/arrow_down.png" /></li> <a href="#" onclick="return rcmail.command('checkmail','',this)">Refresh</a> </ul> @@ -141,7 +142,11 @@ </div> <div id="movemessagemenu"> - <roundcube:object name="mailboxlist" type="ul" maxlength="25" mailboxaction="moveto" class="move_mboxlist" /> + <roundcube:object name="mailboxlist" type="ul" maxlength="25" mailboxaction="moveto" class="move_copy_mboxlist" /> +</div> + +<div id="copymessagemenu"> + <roundcube:object name="mailboxlist" type="ul" maxlength="25" mailboxaction="copyto" class="move_copy_mboxlist" /> </div> <div id="searchfilter"> |
