From: Go MAEDA Date: Mon, 3 Jun 2019 23:26:35 +0000 (+0000) Subject: Some fixes for r18214 (#31496): X-Git-Tag: 4.1.0~830 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=80a52e17d0ef938253416869443b1a01fc07ac39;p=redmine.git Some fixes for r18214 (#31496): * incorrect icon-toggle-plus and icon-toggle-minus background rules * broken CSS rule in .toggle-multiselect and removes some unnecessary rules * some cases where clicking on toggle-multiselect element adds the icon class to "a" element instead of "span" * icon switch in workflow permissions tab Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@18224 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/workflows/edit.html.erb b/app/views/workflows/edit.html.erb index 66eb11a86..3f3e3c2f5 100644 --- a/app/views/workflows/edit.html.erb +++ b/app/views/workflows/edit.html.erb @@ -64,11 +64,11 @@ $("a[data-expands]").click(function(e){ e.preventDefault(); var target = $($(this).attr("data-expands")); if (target.attr("multiple")) { - $(event.target).switchClass('icon-toggle-minus', 'icon-toggle-plus'); + $(this).find('span').switchClass('icon-toggle-minus', 'icon-toggle-plus'); target.attr("multiple", false); target.find("option[value=all]").show(); } else { - $(event.target).switchClass('icon-toggle-plus', 'icon-toggle-minus'); + $(this).find('span').switchClass('icon-toggle-plus', 'icon-toggle-minus'); target.attr("multiple", true); target.find("option[value=all]").attr("selected", false).hide(); } diff --git a/app/views/workflows/permissions.html.erb b/app/views/workflows/permissions.html.erb index a9af3d208..60ad1c73c 100644 --- a/app/views/workflows/permissions.html.erb +++ b/app/views/workflows/permissions.html.erb @@ -112,9 +112,11 @@ $("a[data-expands]").click(function(e){ e.preventDefault(); var target = $($(this).attr("data-expands")); if (target.attr("multiple")) { + $(this).find('span').switchClass('icon-toggle-minus', 'icon-toggle-plus'); target.attr("multiple", false); target.find("option[value=all]").show(); } else { + $(this).find('span').switchClass('icon-toggle-plus', 'icon-toggle-minus'); target.attr("multiple", true); target.find("option[value=all]").attr("selected", false).hide(); } diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 9981efc4b..a4c77d118 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -531,7 +531,7 @@ fieldset#filters td.values select {min-width:130px;} .add-filter {width:35%; float:right; text-align: right; vertical-align: top;} #issue_is_private_wrap {float:right; margin-right:1em;} -.toggle-multiselect { no-repeat 0% 40%; padding-left:16px; margin-left:0; margin-right:5px; cursor:pointer;} +.toggle-multiselect { margin-right:5px; cursor:pointer;} .buttons { font-size: 0.9em; margin-bottom: 1.4em; margin-top: 1em; } div#issue-changesets {float:right; width:45%; margin-left: 1em; margin-bottom: 1em; background: #fff; padding-left: 1em; font-size: 90%;} @@ -1502,8 +1502,8 @@ td.gantt_selected_column .gantt_hdr,.gantt_selected_column_container { .icon-bookmark-off { background-image: url(../images/tag_blue_add.png); } .icon-sorted-asc { background-image: url(../images/arrow_down.png); } .icon-sorted-desc { background-image: url(../images/arrow_up.png); } -.icon-toggle-plus { background: url(../images/bullet_toggle_plus.png) } -.icon-toggle-minus { background: url(../images/bullet_toggle_minus.png) } +.icon-toggle-plus { background-image: url(../images/bullet_toggle_plus.png) } +.icon-toggle-minus { background-image: url(../images/bullet_toggle_minus.png) } .icon-file { background-image: url(../images/files/default.png); } .icon-file.text-plain { background-image: url(../images/files/text.png); }