Maintain accesskeys on updates; no need to carry around these text strings
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 24 Dec 2009 07:42:16 +0000 (00:42 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 24 Dec 2009 07:42:16 +0000 (00:42 -0700)
imp/js/DimpBase.js
imp/js/DimpCore.js
imp/templates/javascript_defs_dimp.php

index 3e659f4..3f64a92 100644 (file)
@@ -1935,6 +1935,10 @@ var DimpBase = {
                 e.stop();
                 return;
 
+            case 'alertsloglink':
+                $('alertsloglink').down('A').update(DimpCore.Growler.toggleLog() ? DIMP.text.hidealog : DIMP.text.showalog);
+                break;
+
             case 'applyfilterlink':
                 if (this.viewport) {
                     this.viewport.reload({ applyfilter: 1 });
@@ -2900,6 +2904,10 @@ var DimpBase = {
             DM.addSubMenu('ctx_qsearchopts_filternot', 'ctx_flag');
         }
 
+        /* Store these text strings for updating purposes. */
+        DIMP.text.getmail = $('checkmaillink').down('A').innerHTML;
+        DIMP.text.showalog = $('alertsloglink').down('A').innerHTML;
+
         /* Initialize the starting page. */
         tmp = location.hash;
         if (!tmp.empty() && tmp.startsWith('#')) {
index 6be98b0..b10a6fc 100644 (file)
@@ -402,10 +402,6 @@ var DimpCore = {
                 window.print();
                 break;
 
-            case 'alertsloglink':
-                $('alertsloglink').down('A').update(this.Growler.toggleLog() ? DIMP.text.hidealog : DIMP.text.showalog);
-                break;
-
             case 'largeaddrspan_active':
                 tmp = elt.down();
                 if (!tmp.next().visible() ||
index 89000a2..9a67eaf 100644 (file)
@@ -129,8 +129,7 @@ $code['text'] = array(
     'createsub_prompt' => _("Create subfolder:"),
     'delete_folder' => _("Permanently delete %s?"),
     'empty_folder' => _("Permanently delete all messages in %s?"),
-    'getmail' => Horde::highlightAccessKey(addslashes(_("_Get Mail")), Horde::getAccessKey(_("_Get Mail"), true)),
-    'hidealog' => _("Hide Alerts Log"),
+    'hidealog' => Horde::highlightAccessKey(_("Hide Alerts _Log"), Horde::getAccessKey(_("Alerts _Log"), true)),
     'listmsg_wait' => _("The server is still generating the message list."),
     'listmsg_timeout' => _("The server was unable to generate the message list."),
     'loading' => _("Loading..."),
@@ -147,7 +146,6 @@ $code['text'] = array(
     'prefs' => _("User Options"),
     'rename_prompt' => _("Rename folder to:"),
     'search' => _("Search"),
-    'showalog' => Horde::highlightAccessKey(addslashes(_("_Alerts Log")), Horde::getAccessKey(_("_Alerts Log"), true)),
     'verify' => _("Verifying..."),
     'vp_empty' => _("There are no messages in this mailbox."),
 );