From: Go MAEDA Date: Mon, 13 Jan 2020 00:39:00 +0000 (+0000) Subject: Merged r19413 from trunk to 4.1-stable (#32754). X-Git-Tag: 4.1.1~59 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=569f0ebdbd417da9b1894caaf6a1ec06e80e725e;p=redmine.git Merged r19413 from trunk to 4.1-stable (#32754). git-svn-id: http://svn.redmine.org/redmine/branches/4.1-stable@19424 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/redmine/wiki_formatting/macros.rb b/lib/redmine/wiki_formatting/macros.rb index d6463d2b4..99eac68fa 100644 --- a/lib/redmine/wiki_formatting/macros.rb +++ b/lib/redmine/wiki_formatting/macros.rb @@ -233,8 +233,8 @@ module Redmine hide_label = args[1] || args[0] || l(:button_hide) js = "$('##{html_id}-show, ##{html_id}-hide').toggle(); $('##{html_id}').fadeToggle(150);" out = ''.html_safe - out << link_to_function(show_label, js, :id => "#{html_id}-show", :class => 'collapsible collapsed') - out << link_to_function(hide_label, js, :id => "#{html_id}-hide", :class => 'collapsible', :style => 'display:none;') + out << link_to_function(show_label, js, :id => "#{html_id}-show", :class => 'icon icon-collapsed collapsible') + out << link_to_function(hide_label, js, :id => "#{html_id}-hide", :class => 'icon icon-expended collapsible', :style => 'display:none;') out << content_tag('div', textilizable(text, :object => obj, :headings => false, :inline_attachments => @@inline_attachments), :id => html_id, :class => 'collapsed-text', :style => 'display:none;') out end diff --git a/test/unit/lib/redmine/wiki_formatting/macros_test.rb b/test/unit/lib/redmine/wiki_formatting/macros_test.rb index ceda727c8..214e77868 100644 --- a/test/unit/lib/redmine/wiki_formatting/macros_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/macros_test.rb @@ -215,8 +215,8 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest assert_select_in result, 'div.collapsed-text' assert_select_in result, 'strong', :text => 'Collapsed' - assert_select_in result, 'a.collapsible.collapsed', :text => 'Show' - assert_select_in result, 'a.collapsible', :text => 'Hide' + assert_select_in result, 'a.collapsible.icon-collapsed', :text => 'Show' + assert_select_in result, 'a.collapsible.icon-expended', :text => 'Hide' end end @@ -226,8 +226,8 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest assert_select_in result, 'div.collapsed-text' assert_select_in result, 'strong', :text => 'Collapsed' - assert_select_in result, 'a.collapsible.collapsed', :text => 'Example' - assert_select_in result, 'a.collapsible', :text => 'Example' + assert_select_in result, 'a.collapsible.icon-collapsed', :text => 'Example' + assert_select_in result, 'a.collapsible.icon-expended', :text => 'Example' end def test_macro_collapse_with_two_args @@ -236,8 +236,8 @@ class Redmine::WikiFormatting::MacrosTest < Redmine::HelperTest assert_select_in result, 'div.collapsed-text' assert_select_in result, 'strong', :text => 'Collapsed' - assert_select_in result, 'a.collapsible.collapsed', :text => 'Show example' - assert_select_in result, 'a.collapsible', :text => 'Hide example' + assert_select_in result, 'a.collapsible.icon-collapsed', :text => 'Show example' + assert_select_in result, 'a.collapsible.icon-expended', :text => 'Hide example' end def test_macro_collapse_should_not_break_toc