"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/redmine/wiki_formatting/macros.rb" between
redmine-4.1.0.tar.gz and redmine-4.1.1.tar.gz

About: Redmine is a flexible project management and bug-tracking web application (using the Ruby on Rails framework). It supports also project wikis and forums, documents management, and multiple version control systems.

macros.rb  (redmine-4.1.0):macros.rb  (redmine-4.1.1)
skipping to change at line 236 skipping to change at line 236
desc "Inserts of collapsed block of text. Examples:\n\n" + desc "Inserts of collapsed block of text. Examples:\n\n" +
"{{collapse\nThis is a block of text that is collapsed by default.\ nIt can be expanded by clicking a link.\n}}\n\n" + "{{collapse\nThis is a block of text that is collapsed by default.\ nIt can be expanded by clicking a link.\n}}\n\n" +
"{{collapse(View details...)\nWith custom link text.\n}}" "{{collapse(View details...)\nWith custom link text.\n}}"
macro :collapse do |obj, args, text| macro :collapse do |obj, args, text|
html_id = "collapse-#{Redmine::Utils.random_hex(4)}" html_id = "collapse-#{Redmine::Utils.random_hex(4)}"
show_label = args[0] || l(:button_show) show_label = args[0] || l(:button_show)
hide_label = args[1] || args[0] || l(:button_hide) hide_label = args[1] || args[0] || l(:button_hide)
js = "$('##{html_id}-show, ##{html_id}-hide').toggle(); $('##{html_id}') .fadeToggle(150);" js = "$('##{html_id}-show, ##{html_id}-hide').toggle(); $('##{html_id}') .fadeToggle(150);"
out = ''.html_safe out = ''.html_safe
out << link_to_function(show_label, js, :id => "#{html_id}-show", :class out << link_to_function(show_label, js, :id => "#{html_id}-show", :class
=> 'collapsible collapsed') => 'icon icon-collapsed collapsible')
out << link_to_function(hide_label, js, :id => "#{html_id}-hide", :class out << link_to_function(hide_label, js, :id => "#{html_id}-hide", :class
=> 'collapsible', :style => 'display:none;') => '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 << content_tag('div', textilizable(text, :object => obj, :headings = > false, :inline_attachments => @@inline_attachments), :id => html_id, :class => 'collapsed-text', :style => 'display:none;')
out out
end end
desc "Displays a clickable thumbnail of an attached image.\n" + desc "Displays a clickable thumbnail of an attached image.\n" +
"Default size is 200 pixels. Examples:\n\n" + "Default size is 200 pixels. Examples:\n\n" +
"{{thumbnail(image.png)}}\n" + "{{thumbnail(image.png)}}\n" +
"{{thumbnail(image.png, size=300, title=Thumbnail)}} -- with custom title and size" "{{thumbnail(image.png, size=300, title=Thumbnail)}} -- with custom title and size"
macro :thumbnail do |obj, args| macro :thumbnail do |obj, args|
args, options = extract_macro_options(args, :size, :title) args, options = extract_macro_options(args, :size, :title)
 End of changes. 1 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)