Od: Michael M Slusarz <[email protected]>
Komu: <[email protected]>
Dátum: 30.10.2013 21:18
Predmet: Re: [imp] Feature Request - selectable email addresses and add to
existing contact.
Quoting Simon B <[email protected]>:
Hi
When one clicks on an email address in imp, one is offered the choice
of new message or adding to contacts. The email address is shown but
is not selectable - meaning the only way to copy an email address of a
message you receive is to select the new message choice and copy it
from there and then close the newly opened window - altogether that's
a suboptimal user experience and more clicks than is necessary.
Patch? This is difficult to accomplish because clicking in a context
menu box immediately causes the box to close normally.
Attaching. The patch is for IMP 6.1.4 but i believe it will be possible to
apply it also to 6.1.5. Apply it like this:
cd dir/to/imp
patch -p1 < imp_copy_email.patch
Copying text to clipboard using javascript appears to be impossible in all
browsers except IE. There are lots of workaround solutions on the net but all
of them are using Flash (brrrr). My solution is not the best but it's working
:) btw, icon for context menu option needs to be added, also CSS is missing.
azur
diff -Naur imp/js/dimpcore.js imp_new/js/dimpcore.js
--- imp/js/dimpcore.js 2013-09-01 15:23:03.000000000 +0200
+++ imp_new/js/dimpcore.js 2013-10-31 12:10:33.000000000 +0100
@@ -46,6 +46,11 @@
});
},
+ copyEmail: function(address)
+ {
+ window.prompt('Ctrl+C, Enter', address);
+ },
+
toggleButtons: function(elts, disable)
{
elts.each(function(b) {
@@ -237,6 +242,10 @@
addr: Object.toJSON(baseelt.retrieve('email'))
});
break;
+
+ case 'ctx_contacts_copy':
+ this.copyEmail(baseelt.retrieve('email').b);
+ break;
}
},
diff -Naur imp/lib/Dynamic/Base.php imp_new/lib/Dynamic/Base.php
--- imp/lib/Dynamic/Base.php 2013-09-01 15:23:03.000000000 +0200
+++ imp_new/lib/Dynamic/Base.php 2013-10-31 12:10:23.000000000 +0100
@@ -149,7 +149,8 @@
$context = array(
'ctx_contacts' => array(
'new' => _("New Message"),
- 'add' => _("Add to Address Book")
+ 'add' => _("Add to Address Book"),
+ 'copy' => _("Copy e-mail address")
),
'ctx_reply' => array(
'reply' => _("To Sender"),
--
imp mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: [email protected]