From a45f9b7bf58475ccc812e819f159638403c00419 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Mon, 1 Jul 2013 10:22:14 +0200 Subject: 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' --- skins/classic/functions.js | 10 ++++++---- skins/classic/includes/messagetoolbar.html | 2 +- skins/classic/templates/addressbook.html | 7 +++++++ skins/classic/templates/mail.html | 4 ++-- skins/larry/templates/addressbook.html | 7 +++++++ skins/larry/templates/mail.html | 2 +- skins/larry/templates/message.html | 2 +- skins/larry/ui.js | 12 +++++++++--- 8 files changed, 34 insertions(+), 12 deletions(-) (limited to 'skins') 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 @@ - + 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 @@ +
+
    +
  • +
  • +
+
+ 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 @@ -
+
    -
  • +
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 @@
+
+
    +
  • +
  • +
+
+ 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 @@
    -
  • +
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 @@
- +
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 -- cgit v1.2.3