changeset 7287:b4c77ea1221f

admin: hooks: handle overflow of long hook names Some hook names are quite long and are visually truncated in the admin section. Use the same principle as on the System Info: hide overflow and add ellipsis, use a title attribute to let users discover the full name on hover.
author Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
date Mon, 21 May 2018 14:52:36 +0200
parents 99f7ec293293
children ef8d19a299c7
files kallithea/public/less/style.less kallithea/templates/admin/settings/settings_hooks.html
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/public/less/style.less	Mon May 21 14:44:15 2018 +0200
+++ b/kallithea/public/less/style.less	Mon May 21 14:52:36 2018 +0200
@@ -733,6 +733,8 @@
       .clearfix;
       > label {
         .make-xs-column(3);
+        overflow: hidden;
+        text-overflow: ellipsis;
         input {
           width: 100%;
         }
--- a/kallithea/templates/admin/settings/settings_hooks.html	Mon May 21 14:44:15 2018 +0200
+++ b/kallithea/templates/admin/settings/settings_hooks.html	Mon May 21 14:52:36 2018 +0200
@@ -3,7 +3,7 @@
       <h4>${_('Built-in Mercurial Hooks (Read-Only)')}</h4>
       % for hook in c.hooks:
         <% input_id = hook.ui_key.replace('.', '_') %>
-            <label class="control-label" for="${input_id}">${hook.ui_key}</label>
+            <label class="control-label" for="${input_id}" title="${hook.ui_key}">${hook.ui_key}</label>
             <div>
               ${h.text(hook.ui_key,hook.ui_value,id=input_id,size=60,readonly="readonly",class_='form-control')}
             </div>
@@ -19,7 +19,7 @@
         %for hook in c.custom_hooks:
             <div class="form-group form-inline" id="${'id%s' % hook.ui_id }">
                 <% input_id = hook.ui_key.replace('.', '_') %>
-                    <label class="control-label" for="${input_id}">${hook.ui_key}</label>
+                    <label class="control-label" for="${input_id}" title="${hook.ui_key}">${hook.ui_key}</label>
                     <div>
                         ${h.hidden('hook_ui_key',hook.ui_key,id='hook_ui_key_'+input_id)}
                         ${h.hidden('hook_ui_value',hook.ui_value,id='hook_ui_value_'+input_id)}