diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-07-01 10:22:14 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-07-01 10:22:14 +0200 |
commit | a45f9b7bf58475ccc812e819f159638403c00419 (patch) | |
tree | 2853fa82a74bf3cf61eb9212b2b012c1c4bd763a /skins | |
parent | 049ba0aed21590dbbc3286d68b45a7f46d28b142 (diff) |
Contacts drag-n-drop default action is to move contacts (#1488751)
Added possibility to choose to move or copy contacts from drag-n-drop menu (#1488751)
Use consistent naming: 'moveto' -> 'move'
Diffstat (limited to 'skins')
-rw-r--r-- | skins/classic/functions.js | 10 | ||||
-rw-r--r-- | skins/classic/includes/messagetoolbar.html | 2 | ||||
-rw-r--r-- | skins/classic/templates/addressbook.html | 7 | ||||
-rw-r--r-- | skins/classic/templates/mail.html | 4 | ||||
-rw-r--r-- | skins/larry/templates/addressbook.html | 7 | ||||
-rw-r--r-- | skins/larry/templates/mail.html | 2 | ||||
-rw-r--r-- | skins/larry/templates/message.html | 2 | ||||
-rw-r--r-- | skins/larry/ui.js | 12 |
8 files changed, 34 insertions, 12 deletions
diff --git a/skins/classic/functions.js b/skins/classic/functions.js index d10812c57..0c3b1425a 100644 --- a/skins/classic/functions.js +++ b/skins/classic/functions.js @@ -94,7 +94,7 @@ function rcube_mail_ui() messagemenu: {id:'messagemenu'}, attachmentmenu: {id:'attachmentmenu'}, listmenu: {id:'listmenu', editable:1}, - dragmessagemenu:{id:'dragmessagemenu', sticky:1}, + dragmenu: {id:'dragmenu', sticky:1}, groupmenu: {id:'groupoptionsmenu', above:1}, mailboxmenu: {id:'mailboxoptionsmenu', above:1}, composemenu: {id:'composeoptionsmenu', editable:1, overlap:1}, @@ -162,9 +162,9 @@ show_popupmenu: function(popup, show) } }, -dragmessagemenu: function(show) +dragmenu: function(show) { - this.popups.dragmessagemenu.obj[show?'show':'hide'](); + this.popups.dragmenu.obj[show?'show':'hide'](); }, forwardmenu: function(show) @@ -960,7 +960,7 @@ function rcube_init_mail_ui() rcmail.addEventListener('menu-save', 'menu_save', rcmail_ui); rcmail.addEventListener('aftersend-attachment', 'uploadmenu', rcmail_ui); rcmail.addEventListener('aftertoggle-editor', 'resize_compose_body_ev', rcmail_ui); - rcmail.gui_object('message_dragmenu', 'dragmessagemenu'); + rcmail.gui_object('dragmenu', 'dragmenu'); if (rcmail.gui_objects.mailboxlist) { rcmail.addEventListener('responseaftermark', rcube_render_mailboxlist); @@ -985,6 +985,8 @@ function rcube_init_mail_ui() if (rcmail.gui_objects.folderlist) new rcmail_scroller('#directorylist-content', '#directorylist-title', '#directorylist-footer'); + + rcmail.gui_object('dragmenu', 'dragmenu'); } else if (rcmail.env.task == 'settings') { if (rcmail.gui_objects.subscriptionlist) diff --git a/skins/classic/includes/messagetoolbar.html b/skins/classic/includes/messagetoolbar.html index bd14f490f..2940cd640 100644 --- a/skins/classic/includes/messagetoolbar.html +++ b/skins/classic/includes/messagetoolbar.html @@ -21,7 +21,7 @@ <roundcube:button name="markmenulink" id="markmenulink" type="link" class="button markmessage" title="markmessages" onclick="rcmail_ui.show_popup('markmenu');return false" content=" " /> <roundcube:button name="messagemenulink" id="messagemenulink" type="link" class="button messagemenu" title="moreactions" onclick="rcmail_ui.show_popup('messagemenu');return false" content=" " /> <roundcube:if condition="template:name == 'message'" /> -<roundcube:object name="mailboxlist" type="select" noSelection="moveto" maxlength="25" onchange="rcmail.command('moveto', this.options[this.selectedIndex].value)" class="mboxlist" folder_filter="mail" /> +<roundcube:object name="mailboxlist" type="select" noSelection="move" maxlength="25" onchange="rcmail.command('move', this.options[this.selectedIndex].value)" class="mboxlist" folder_filter="mail" /> <roundcube:endif /> </div> diff --git a/skins/classic/templates/addressbook.html b/skins/classic/templates/addressbook.html index fdcd1847f..9bd684866 100644 --- a/skins/classic/templates/addressbook.html +++ b/skins/classic/templates/addressbook.html @@ -116,5 +116,12 @@ </ul> </div> +<div id="dragmenu" class="popupmenu"> + <ul> + <li><roundcube:button command="move" onclick="return rcmail.drag_menu_action('move')" label="move" classAct="active" /></li> + <li><roundcube:button command="copy" onclick="return rcmail.drag_menu_action('copy')" label="copy" classAct="active" /></li> + </ul> +</div> + </body> </html> diff --git a/skins/classic/templates/mail.html b/skins/classic/templates/mail.html index c3b4004cc..353597620 100644 --- a/skins/classic/templates/mail.html +++ b/skins/classic/templates/mail.html @@ -130,9 +130,9 @@ <roundcube:button command="reset-search" id="searchreset" image="/images/icons/reset.gif" title="resetsearch" width="13" height="13" /> </div> -<div id="dragmessagemenu" class="popupmenu"> +<div id="dragmenu" class="popupmenu"> <ul> - <li><roundcube:button command="moveto" onclick="return rcmail.drag_menu_action('moveto')" label="move" classAct="active" /></li> + <li><roundcube:button command="move" onclick="return rcmail.drag_menu_action('move')" label="move" classAct="active" /></li> <li><roundcube:button command="copy" onclick="return rcmail.drag_menu_action('copy')" label="copy" classAct="active" /></li> </ul> </div> diff --git a/skins/larry/templates/addressbook.html b/skins/larry/templates/addressbook.html index d9e491f99..b33ebd999 100644 --- a/skins/larry/templates/addressbook.html +++ b/skins/larry/templates/addressbook.html @@ -106,6 +106,13 @@ </ul> </div> +<div id="dragcontactmenu" class="popupmenu"> + <ul class="toolbarmenu"> + <li><roundcube:button command="move" onclick="return rcmail.drag_menu_action('move')" label="move" classAct="active" /></li> + <li><roundcube:button command="copy" onclick="return rcmail.drag_menu_action('copy')" label="copy" classAct="active" /></li> + </ul> +</div> + <roundcube:include file="/includes/footer.html" /> </body> diff --git a/skins/larry/templates/mail.html b/skins/larry/templates/mail.html index 575cb792a..6b6ffd7ae 100644 --- a/skins/larry/templates/mail.html +++ b/skins/larry/templates/mail.html @@ -140,7 +140,7 @@ <div id="dragmessagemenu" class="popupmenu"> <ul class="toolbarmenu"> - <li><roundcube:button command="moveto" onclick="return rcmail.drag_menu_action('moveto')" label="move" classAct="active" /></li> + <li><roundcube:button command="move" onclick="return rcmail.drag_menu_action('move')" label="move" classAct="active" /></li> <li><roundcube:button command="copy" onclick="return rcmail.drag_menu_action('copy')" label="copy" classAct="active" /></li> </ul> </div> diff --git a/skins/larry/templates/message.html b/skins/larry/templates/message.html index 7ac7e5b55..32dc1a46b 100644 --- a/skins/larry/templates/message.html +++ b/skins/larry/templates/message.html @@ -17,7 +17,7 @@ <roundcube:endif /> <roundcube:include file="/includes/mailtoolbar.html" /> <div class="toolbarselect"> - <roundcube:object name="mailboxlist" type="select" noSelection="moveto" maxlength="25" onchange="rcmail.command('moveto', this.options[this.selectedIndex].value)" class="mailboxlist decorated" folder_filter="mail" /> + <roundcube:object name="mailboxlist" type="select" noSelection="move" maxlength="25" onchange="rcmail.command('move', this.options[this.selectedIndex].value)" class="mailboxlist decorated" folder_filter="mail" /> </div> </div> diff --git a/skins/larry/ui.js b/skins/larry/ui.js index 7dc9b57b1..19f05cca4 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -19,7 +19,7 @@ function rcube_mail_ui() searchmenu: { editable:1, callback:searchmenu }, attachmentmenu: { }, listoptions: { editable:1 }, - dragmessagemenu: { sticky:1 }, + dragmenu: { sticky:1 }, groupmenu: { above:1 }, mailboxmenu: { above:1 }, spellmenu: { callback: spellmenu }, @@ -90,8 +90,8 @@ function rcube_mail_ui() var dragmenu = $('#dragmessagemenu'); if (dragmenu.length) { - rcmail.gui_object('message_dragmenu', 'dragmessagemenu'); - popups.dragmessagemenu = dragmenu; + rcmail.gui_object('dragmenu', 'dragmessagemenu'); + popups.dragmenu = dragmenu; } if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') { @@ -206,6 +206,12 @@ function rcube_mail_ui() new rcube_scroller('#directorylist-content', '#directorylist-header', '#directorylist-footer'); } + + var dragmenu = $('#dragcontactmenu'); + if (dragmenu.length) { + rcmail.gui_object('dragmenu', 'dragcontactmenu'); + popups.dragmenu = dragmenu; + } } // turn a group of fieldsets into tabs |