From 5934e238242cb0d96e128bfad3905809b5aeb093 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Fri, 21 Mar 2014 18:32:04 +0100
Subject: Disable link registering mailto: protocol handler if not supported by
 the browser (#1489569)

---
 program/steps/settings/func.inc | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

(limited to 'program/steps')

diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 7c36df3b1..307be8c8e 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -376,13 +376,16 @@ function rcmail_user_prefs($current = null)
             if ($current) {
                 $product_name = $RCMAIL->config->get('product_name', 'Roundcube Webmail');
                 $RCMAIL->output->add_script(sprintf("%s.check_protocol_handler('%s', '#mailtoprotohandler');",
-                    rcmail_output::JS_OBJECT_NAME, rcube::JQ($product_name)), 'foot');
+                    rcmail_output::JS_OBJECT_NAME, rcube::JQ($product_name)), 'docready');
             }
 
             $blocks['browser']['options']['mailtoprotohandler'] = array(
                 'content' => html::a(array(
-                'href'    => '#',
-                'id'      => 'mailtoprotohandler'), rcube::Q($RCMAIL->gettext('mailtoprotohandler'))),
+                    'href'    => '#',
+                    'id'      => 'mailtoprotohandler'
+                ),
+                rcube::Q($RCMAIL->gettext('mailtoprotohandler'))) .
+                html::span('mailtoprotohandler-status', ''),
             );
 
         break;
-- 
cgit v1.2.3