Mercurial > kallithea
changeset 5953:e2fb29be0681
templates: use a better class name for an enabled toggle button
"btn-success" is rather a poor choice for a class applied when the
button is active, "active" is better for that.
A side effect of the change is that "Enabled" is now shown in bold.
author | Andrew Shadura <andrew@shadura.me> |
---|---|
date | Sat, 28 May 2016 15:11:48 +0200 |
parents | 24d5af811027 |
children | 8075ec3d0233 |
files | kallithea/templates/admin/auth/auth_settings.html |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/templates/admin/auth/auth_settings.html Sat May 28 15:08:31 2016 +0200 +++ b/kallithea/templates/admin/auth/auth_settings.html Sat May 28 15:11:48 2016 +0200 @@ -36,7 +36,7 @@ %for plugin_path in c.available_plugins: <li> <div style="padding:3px 0px 3px 0px"> - <span style="margin: 0px 10px 0px 0px" plugin_id="${plugin_path}" class="toggle-plugin btn btn-mini ${'btn-success' if plugin_path in c.enabled_plugins else ''}"> + <span style="margin: 0px 10px 0px 0px" plugin_id="${plugin_path}" class="toggle-plugin btn btn-mini ${'active' if plugin_path in c.enabled_plugins else ''}"> ${_('Enabled') if plugin_path in c.enabled_plugins else _('Disabled')}</span>${plugin_path} </div> </li> @@ -115,10 +115,10 @@ var $cur_button = $(e.currentTarget); var plugin_id = $cur_button.attr('plugin_id'); - if($cur_button.hasClass('btn-success')){ + if($cur_button.hasClass('active')){ elems.splice(elems.indexOf(plugin_id), 1); $auth_plugins_input.val(elems.join(',')); - $cur_button.removeClass('btn-success'); + $cur_button.removeClass('active'); $cur_button.html(_TM['Disabled']); } else{ @@ -126,7 +126,7 @@ elems.push(plugin_id); } $auth_plugins_input.val(elems.join(',')); - $cur_button.addClass('btn-success'); + $cur_button.addClass('active'); $cur_button.html(_TM['Enabled']); } });