From: Michael M Slusarz Date: Sat, 21 Feb 2009 23:57:24 +0000 (-0700) Subject: Improvements to PGP & S/MIME verifying UI X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8db538e55ef53a519826bd27684d9776694a8067;p=horde.git Improvements to PGP & S/MIME verifying UI --- diff --git a/imp/js/src/DimpCore.js b/imp/js/src/DimpCore.js index c1ae197b6..9b493b607 100644 --- a/imp/js/src/DimpCore.js +++ b/imp/js/src/DimpCore.js @@ -491,12 +491,20 @@ DimpCore = { // CSS class based matching if (elt.hasClassName('unblockImageLink')) { IMP.unblockImages(e); - } else if (elt.match('SPAN.toggleQuoteShow')) { + } else if (elt.hasClassName('toggleQuoteShow')) { [ elt, elt.next() ].invoke('toggle'); Effect.BlindDown(elt.next(1), { duration: 0.2, queue: { position: 'end', scope: 'showquote', limit: 2 } }); - } else if (elt.match('SPAN.toggleQuoteHide')) { + } else if (elt.hasClassName('toggleQuoteHide')) { [ elt, elt.previous() ].invoke('toggle'); Effect.BlindUp(elt.next(), { duration: 0.2, queue: { position: 'end', scope: 'showquote', limit: 2 } }); + } else if (elt.hasClassName('pgpVerifyMsg')) { + elt.replace(DIMP.text.verify); + DimpCore.reloadMessage({ pgp_verify_msg: 1 }); + e.stop(); + } else if (elt.hasClassName('smimeVerifyMsg')) { + elt.replace(DIMP.text.verify); + DimpCore.reloadMessage({ smime_verify_msg: 1 }); + e.stop(); } break; } diff --git a/imp/lib/DIMP.php b/imp/lib/DIMP.php index 869e91d66..3c7607e93 100644 --- a/imp/lib/DIMP.php +++ b/imp/lib/DIMP.php @@ -204,6 +204,7 @@ class DIMP 'cancel' => _("Cancel"), 'loading' => _("Loading..."), 'check' => _("Checking..."), + 'verify' => _("Verifying..."), 'onlogout' => _("Logging Out..."), 'ajax_timeout' => _("There has been no contact with the remote server for several minutes. The server may be temporarily unavailable or network problems may be interrupting your session. You will not see any updates until the connection is restored."), 'ajax_recover' => _("The connection to the remote server has been restored."), diff --git a/imp/lib/Mime/Viewer/pgp.php b/imp/lib/Mime/Viewer/pgp.php index a5edd66dd..c9b5d4781 100644 --- a/imp/lib/Mime/Viewer/pgp.php +++ b/imp/lib/Mime/Viewer/pgp.php @@ -177,7 +177,7 @@ class IMP_Horde_Mime_Viewer_pgp extends Horde_Mime_Viewer_Driver case 'imp': /* Ask for the correct passphrase if this is encrypted * symmetrically. */ - $status[] = Horde::link('#', '', null, null, IMP::passphraseDialogJS('PGPSymmetric', $js_action, array('symmetricid' => $symmetric_id)) . ';return false;') . _("You must enter the passphrase used to encrypt this message to view it.") . ''; + $status[] = Horde::link('#', '', '', '', IMP::passphraseDialogJS('PGPSymmetric', $js_action, array('symmetricid' => $symmetric_id)) . ';return false;') . _("You must enter the passphrase used to encrypt this message to view it.") . ''; break; } return null; @@ -213,7 +213,7 @@ class IMP_Horde_Mime_Viewer_pgp extends Horde_Mime_Viewer_Driver case 'imp': /* Ask for the private key's passphrase if this is * encrypted asymmetrically. */ - $status[] = Horde::link('#', '', null, null, IMP::passphraseDialogJS('PGPPersonal', $js_action) . ';return false;') . _("You must enter the passphrase for your PGP private key to view this message.") . ''; + $status[] = Horde::link('#', '', '', '', IMP::passphraseDialogJS('PGPPersonal', $js_action) . ';return false;') . _("You must enter the passphrase for your PGP private key to view this message.") . ''; break; } return null; @@ -356,7 +356,7 @@ class IMP_Horde_Mime_Viewer_pgp extends Horde_Mime_Viewer_Driver break; case 'dimp': - $status[] = Horde::link('#', '', '', '', 'DimpCore.reloadMessage({ pgp_verify_msg: 1 });return false;') . _("Click HERE to verify the message.") . ''; + $status[] = Horde::link('#', '', 'pgpVerifyMsg') . _("Click HERE to verify the message.") . ''; break; } } diff --git a/imp/lib/Mime/Viewer/smime.php b/imp/lib/Mime/Viewer/smime.php index df9f7a783..2e3a1380d 100644 --- a/imp/lib/Mime/Viewer/smime.php +++ b/imp/lib/Mime/Viewer/smime.php @@ -146,7 +146,7 @@ class IMP_Horde_Mime_Viewer_smime extends Horde_Mime_Viewer_Driver // Fall through case 'imp': - $status[] = Horde::link('#', '', null, null, IMP::passphraseDialogJS('SMIMEPersonal', $js_action) . ';return false;') . _("You must enter the passphrase for your S/MIME private key to view this message.") . ''; + $status[] = Horde::link('#', '', '', '', IMP::passphraseDialogJS('SMIMEPersonal', $js_action) . ';return false;') . _("You must enter the passphrase for your S/MIME private key to view this message.") . ''; break; } return null; @@ -247,7 +247,7 @@ class IMP_Horde_Mime_Viewer_smime extends Horde_Mime_Viewer_Driver break; case 'dimp': - $status[] = Horde::link('#', '', '', '', 'DimpCore.reloadMessage({ smime_verify_msg: 1 });return false;') . _("Click HERE to verify the message.") . ''; + $status[] = Horde::link('#', '', 'smimeVerifyMsg') . _("Click HERE to verify the message.") . ''; break; } return $ret;