diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2024-09-09 15:50:37 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2024-09-09 15:50:37 +0000 |
commit | e8879d891f39539fe1d0d6cb14c26a02944234a5 (patch) | |
tree | fe709e3de231388c64e84f0f5034bf18a66b7e5d /app/helpers/application_helper.rb | |
parent | 053326b660184a7273c43799f4b01237fe6293b2 (diff) | |
download | redmine-e8879d891f39539fe1d0d6cb14c26a02944234a5.tar.gz redmine-e8879d891f39539fe1d0d6cb14c26a02944234a5.zip |
Refactors toggle checkboxes link and switch to SVG icon (#23980).
Patch by Mizuki ISHIKAWA (user:ishikawa999)
git-svn-id: https://svn.redmine.org/redmine/trunk@23047 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index eedf4f891..8960f5ab9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1597,11 +1597,13 @@ module ApplicationHelper link_to_function(l(:button_uncheck_all), "checkAll('#{form_name}', false)") end - def toggle_checkboxes_link(selector) - link_to_function '', + def toggle_checkboxes_link(selector, options={}) + css_classes = 'icon icon-checked' + css_classes += ' ' + options[:class] if options[:class] + link_to_function icon_with_label('checked', ''), "toggleCheckboxesBySelector('#{selector}')", :title => "#{l(:button_check_all)} / #{l(:button_uncheck_all)}", - :class => 'icon icon-checked' + :class => css_classes end def progress_bar(pcts, options={}) |