From 268543ec4e4104a2a5ee28cb91ab6a59aaf76497 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Fri, 12 Jan 2018 08:13:04 +0100 Subject: [PATCH] Disable button and add tooltip if change_url unavailable (needed to add a span holding the tooltip, because tooltips aren't displayed for disabled buttons) --- src/locales/en.json | 1 + src/views/app/app_info.ms | 25 ++++++++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 8bdcc83a..59a6165f 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -20,6 +20,7 @@ "app_info_debug_desc": "Display debugging information for this application.", "app_info_default_desc": "Redirect domain root to this application (%s).", "app_info_changeurl_desc": "Change the access URL of this application (domain and/or path).", + "app_info_change_url_disabled_tooltip": "This feature hasn't been implemented in this app yet", "app_info_uninstall_desc": "Remove this application.", "app_install_cancel": "Installation cancelled.", "app_install_custom_no_manifest": "No manifest.json file", diff --git a/src/views/app/app_info.ms b/src/views/app/app_info.ms index 23b2612b..7e01e599 100644 --- a/src/views/app/app_info.ms +++ b/src/views/app/app_info.ms @@ -48,15 +48,21 @@
- {{#if change_url}} -
-

{{t 'app_info_changeurl_desc' settings.domain}}

- - {{t 'app_change_url'}} - -
-
- {{/if}} +
+

{{t 'app_info_changeurl_desc' settings.domain}}

+ {{#if change_url}} + + {{t 'app_change_url'}} + + {{else}} + {{#tooltip (t 'app_info_change_url_disabled_tooltip') }} + + {{t 'app_change_url'}} + + {{/tooltip}} + {{/if}} +
+

{{t 'app_info_uninstall_desc'}}

@@ -72,3 +78,4 @@
+{{load_tooltips}}