Patch #18770 » Collapsable-divs-History-and-roadmap.patch
| app/views/issues/_history.html.erb Sun Jul 26 07:10:55 2015 +0000 → app/views/issues/_history.html.erb Tue Aug 11 17:18:07 2015 +0200 | ||
|---|---|---|
|
<% reply_links = authorize_for('issues', 'edit') -%>
|
||
|
<div class="expander">
|
||
|
<% for journal in journals %>
|
||
|
<div id="change-<%= journal.id %>" class="<%= journal.css_classes %>">
|
||
|
<div id="note-<%= journal.indice %>">
|
||
|
<h4><a href="#note-<%= journal.indice %>" class="journal-link">#<%= journal.indice %></a>
|
||
|
<div class="expander-item group open">
|
||
|
<h4><a href="#note-<%= journal.indice %>" class="journal-link">#<%= journal.indice %></a>
|
||
|
<%= avatar(journal.user, :size => "24") %>
|
||
|
<span class="expander" onclick="toggleExpanderDiv(this);"> </span>
|
||
|
<%= authoring journal.created_on, journal.user, :label => :label_updated_time_by %>
|
||
|
<%= link_to_function("#{l(:button_collapse_all)}/#{l(:button_expand_all)}",
|
||
|
"toggleAllExpanderDivs(this)", :class => 'toggle-all') %>
|
||
|
<%= content_tag('span', l(:field_is_private), :class => 'private') if journal.private_notes? %></h4>
|
||
|
</div>
|
||
|
<div class="expander-item">
|
||
|
<% if journal.details.any? %>
|
||
|
<ul class="details">
|
||
|
<ul class="details">
|
||
|
<% details_to_strings(journal.visible_details).each do |string| %>
|
||
|
<li><%= string %></li>
|
||
|
<li><%= string %></li>
|
||
|
<% end %>
|
||
|
</ul>
|
||
|
</ul>
|
||
|
<% end %>
|
||
|
<%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %>
|
||
|
<% end %>
|
||
|
</div>
|
||
|
<% heads_for_wiki_formatter if User.current.allowed_to?(:edit_issue_notes, issue.project) || User.current.allowed_to?(:edit_own_issue_notes, issue.project) %>
|
||
| app/views/issues/show.html.erb Sun Jul 26 07:10:55 2015 +0000 → app/views/issues/show.html.erb Tue Aug 11 17:18:07 2015 +0200 | ||
|---|---|---|
|
<% if @issue.description? || @issue.attachments.any? -%>
|
||
|
<hr />
|
||
|
<% if @issue.description? %>
|
||
|
<div class="description">
|
||
|
<div class="contextual">
|
||
|
<%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
|
||
|
</div>
|
||
|
<p><strong><%=l(:field_description)%></strong></p>
|
||
|
<div class="wiki">
|
||
|
<%= textilizable @issue, :description, :attachments => @issue.attachments %>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="expander">
|
||
|
<div class="description">
|
||
|
<div class="expander-item group open">
|
||
|
<div class="contextual">
|
||
|
<%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if authorize_for('issues', 'edit') %>
|
||
|
</div>
|
||
|
|
||
|
<p>
|
||
|
<span class="expander" onclick="toggleExpanderDiv(this);"> </span>
|
||
|
<strong><%=l(:field_description)%></strong>
|
||
|
</p>
|
||
|
</div>
|
||
|
<div class="expander-item open">
|
||
|
<div class="wiki">
|
||
|
<%= textilizable @issue, :description, :attachments => @issue.attachments %>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<% end %>
|
||
|
<%= link_to_attachments @issue, :thumbnails => true %>
|
||
|
<% end -%>
|
||
| app/views/versions/index.html.erb Sun Jul 26 07:10:55 2015 +0000 → app/views/versions/index.html.erb Tue Aug 11 17:18:07 2015 +0200 | ||
|---|---|---|
|
<p class="nodata"><%= l(:label_no_data) %></p>
|
||
|
<% else %>
|
||
|
<div id="roadmap">
|
||
|
<% #[OHO-2015-08-07] changes to make issue description collapsable: added DIV levels %>
|
||
|
<div class="expander">
|
||
|
<% @versions.each do |version| %>
|
||
|
<article class="version-article <%= version.completed? ? 'version-completed' : 'version-incompleted' %>">
|
||
|
<header>
|
||
|
<h3 class="version"><%= link_to_version version, :name => version_anchor(version) %></h3>
|
||
|
</header>
|
||
|
<article class="version-article <%= version.completed? ? 'version-completed' : 'version-incompleted' %>">
|
||
|
<div class="expander-item group open">
|
||
|
<header>
|
||
|
<h3 class="version">
|
||
|
<span class="expander" onclick="toggleExpanderDiv(this);"> </span>
|
||
|
<%= link_to_version version, :name => version_anchor(version) %>
|
||
|
<%= link_to_function("#{l(:button_collapse_all)}/#{l(:button_expand_all)}",
|
||
|
"toggleAllExpanderDivs(this)", :class => 'toggle-all') %>
|
||
|
</h3>
|
||
|
</header>
|
||
|
</div>
|
||
|
<div class="expander-item">
|
||
|
<%= render :partial => 'versions/overview', :locals => {:version => version} %>
|
||
|
<%= render(:partial => "wiki/content",
|
||
|
:locals => {:content => version.wiki_page.content}) if version.wiki_page %>
|
||
|
<% if (issues = @issues_by_version[version]) && issues.size > 0 %>
|
||
|
<%= form_tag({}) do -%>
|
||
|
<table class="list related-issues">
|
||
|
<caption><%= l(:label_related_issues) %></caption>
|
||
|
<table class="list related-issues">
|
||
|
<caption><%= l(:label_related_issues) %></caption>
|
||
|
<% issues.each do |issue| -%>
|
||
|
<tr class="hascontextmenu">
|
||
|
<td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td>
|
||
|
<td class="subject"><%= link_to_issue(issue, :project => (@project != issue.project)) %></td>
|
||
|
</tr>
|
||
|
<tr class="hascontextmenu">
|
||
|
<td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td>
|
||
|
<td class="subject"><%= link_to_issue(issue, :project => (@project != issue.project)) %></td>
|
||
|
</tr>
|
||
|
<% end -%>
|
||
|
</table>
|
||
|
</table>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
|
<%= call_hook :view_projects_roadmap_version_bottom, :version => version %>
|
||
|
</article>
|
||
|
</div>
|
||
|
</article>
|
||
|
<% end %>
|
||
|
</div>
|
||
|
<% #[OHO-end] %>
|
||
|
</div>
|
||
|
<% end %>
|
||
| ... | ... | |
|
<%= link_to_function l(:label_completed_versions),
|
||
|
'$("#toggle-completed-versions").toggleClass("collapsed"); $("#completed-versions").toggle()',
|
||
|
:id => 'toggle-completed-versions', :class => 'collapsible collapsed' %>
|
||
|
</p>
|
||
|
<ul id = "completed-versions" style = "display:none;">
|
||
|
<% @completed_versions.each do |version| %>
|
||
|
<li><%= link_to_version version %></li>
|
||
|
<% end %>
|
||
|
</ul>
|
||
|
</p>
|
||
|
<% end %>
|
||
|
<% end %>
|
||
| public/javascripts/application.js Sun Jul 26 07:10:55 2015 +0000 → public/javascripts/application.js Tue Aug 11 17:18:07 2015 +0200 | ||
|---|---|---|
|
}
|
||
|
}
|
||
|
function toggleExpanderDiv(el) {
|
||
|
var expItem = $(el).parents('div.expander-item').first();
|
||
|
var n = expItem.next();
|
||
|
expItem.toggleClass('open');
|
||
|
while (n.length && !n.hasClass('group')) {
|
||
|
n.toggle();
|
||
|
n = n.next('expItem');
|
||
|
}
|
||
|
}
|
||
|
function collapseAllExpanderDivs(el) {
|
||
|
var exp = $(el).parents('div.expander').first();
|
||
|
exp.find('div.expander-item').each(function(index) {
|
||
|
if ($(this).hasClass('group')) {
|
||
|
$(this).removeClass('open');
|
||
|
} else {
|
||
|
$(this).hide();
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
function expandAllExpanderDivs(el) {
|
||
|
var exp = $(el).parents('div.expander').first();
|
||
|
exp.find('div.expander-item').each(function(index) {
|
||
|
if ($(this).hasClass('group')) {
|
||
|
$(this).addClass('open');
|
||
|
} else {
|
||
|
$(this).show();
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
function toggleAllExpanderDivs(el) {
|
||
|
var expItem = $(el).parents('div.expander-item').first();
|
||
|
if (expItem.hasClass('open')) {
|
||
|
collapseAllExpanderDivs(el);
|
||
|
} else {
|
||
|
expandAllExpanderDivs(el);
|
||
|
}
|
||
|
}
|
||
|
function toggleFieldset(el) {
|
||
|
var fieldset = $(el).parents('fieldset').first();
|
||
|
fieldset.toggleClass('collapsed');
|
||
| public/stylesheets/application.css Sun Jul 26 07:10:55 2015 +0000 → public/stylesheets/application.css Tue Aug 11 17:18:07 2015 +0200 | ||
|---|---|---|
|
tr.entry.file td.filename a { margin-left: 16px; }
|
||
|
tr.entry.file td.filename_no_report a { margin-left: 16px; }
|
||
|
tr span.expander {background-image: url(../images/bullet_toggle_plus.png); padding-left: 8px; margin-left: 0; cursor: pointer;}
|
||
|
tr.open span.expander {background-image: url(../images/bullet_toggle_minus.png);}
|
||
|
tr span.expander, div span.expander {background-image: url(../images/bullet_toggle_plus.png); background-repeat: no-repeat; padding-left: 8px; margin-left: 0; cursor: pointer;}
|
||
|
tr.open span.expander, div.open span.expander {background-image: url(../images/bullet_toggle_minus.png); background-repeat: no-repeat;}
|
||
|
tr.changeset { height: 20px }
|
||
|
tr.changeset ul, ol { margin-top: 0px; margin-bottom: 0px; }
|
||
| ... | ... | |
|
table.list tbody tr.group td { padding: 0.8em 0 0.5em 0.3em; font-weight: bold; border-bottom: 1px solid #ccc; text-align:left; }
|
||
|
table.list tbody tr.group span.count {position:relative; top:-1px; color:#fff; font-size:10px; background:#9DB9D5; padding:0px 6px 1px 6px; border-radius:3px; margin-left:4px;}
|
||
|
tr.group a.toggle-all { color: #aaa; font-size: 80%; font-weight: normal; display:none;}
|
||
|
tr.group:hover a.toggle-all { display:inline;}
|
||
|
tr.group a.toggle-all, div.group a.toggle-all { color: #aaa; font-size: 80%; font-weight: normal; display:none;}
|
||
|
tr.group:hover a.toggle-all, div.group:hover a.toggle-all { display:inline;}
|
||
|
a.toggle-all:hover {text-decoration:none;}
|
||
|
table.list tbody tr:hover { background-color:#ffffdd; }
|
||
- « Previous
- 1
- …
- 3
- 4
- 5
- Next »