Created
November 1, 2013 13:23
-
-
Save s-mage/7265370 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%h2.expandall Expand/Collapse All | |
- @tag.pages.each do |page| | |
%div{ class: 'title', id: "title_#{page.title}" } | |
= page.pretty_title | |
= link_to(" [edit]", controller: 'wiki', action: 'show', | | |
project_id: page.project, id: page.title) | |
%div{ class: 'section', id: page.title } | |
= raw Redmine::WikiFormatting::Textile::Formatter.new(page.text).to_html | |
:javascript | |
$('div#title_#{page.title}').click(function() { | |
$('div##{page.title}').slideToggle('fast'); | |
$('div#title_#{page.title}').slideToggle('fast'); | |
}); | |
$('div##{page.title}').click(function() { | |
$('div##{page.title}').slideToggle('fast'); | |
$('div#title_#{page.title}').slideToggle('fast'); | |
}); | |
%h2.expandall Expand/Collapse All | |
:javascript | |
$('div.section').slideUp('fast'); | |
$('.expandall').click(function() { | |
$('div.section').slideToggle('fast'); | |
$('div.title').slideToggle('fast'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment