Feature #29034 » 0001-option-to-collapse-expand-issue-description-files-fu.patch
| app/helpers/issues_helper.rb | ||
|---|---|---|
| 82 | 82 |
s << '<div>' |
| 83 | 83 |
subject = h(issue.subject) |
| 84 | 84 |
if issue.is_private? |
| 85 |
subject = subject + ' ' + content_tag('span', l(:field_is_private), :class => 'private')
|
|
| 85 |
subject = subject + ' ' + content_tag('span', l(:field_is_private), :class => 'private')
|
|
| 86 | 86 |
end |
| 87 | 87 |
s << content_tag('h3', subject)
|
| 88 | 88 |
s << '</div>' * (ancestors.size + 1) |
| ... | ... | |
| 269 | 269 | |
| 270 | 270 |
content = |
| 271 | 271 |
content_tag('hr') +
|
| 272 |
content_tag('p', content_tag('strong', custom_field_name_tag(value.custom_field) )) +
|
|
| 273 |
content_tag('div', attr_value, class: 'value')
|
|
| 272 |
content_tag('p', content_tag('strong', custom_field_name_tag(value.custom_field), :class => 'toggle-section icon icon-expanded' )) +
|
|
| 273 |
content_tag('div', attr_value, class: 'value collapsible')
|
|
| 274 | 274 |
s << content_tag('div', content, class: "cf_#{value.custom_field.id} attribute")
|
| 275 | 275 |
end |
| 276 | 276 |
s |
| app/views/attachments/_links.html.erb | ||
|---|---|---|
| 1 |
<div class="attachments"> |
|
| 1 |
<div class="attachments collapsible">
|
|
| 2 | 2 |
<div class="contextual"> |
| 3 | 3 |
<%= link_to(l(:label_edit_attachments), |
| 4 | 4 |
container_attachments_edit_path(container), |
| app/views/issues/_relations.html.erb | ||
|---|---|---|
| 4 | 4 |
<% end %> |
| 5 | 5 |
</div> |
| 6 | 6 | |
| 7 |
<p><strong><%=l(:label_related_issues)%></strong></p> |
|
| 7 |
<p><strong class="toggle-section icon icon-expanded"><%=l(:label_related_issues)%></strong></p>
|
|
| 8 | 8 | |
| 9 | 9 |
<% if @relations.present? %> |
| 10 |
<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do %>
|
|
| 10 |
<%= form_tag({}, :class => 'collapsible', :data => {:cm_url => issues_context_menu_path}) do %>
|
|
| 11 | 11 |
<%= render_issue_relations(@issue, @relations) %> |
| 12 | 12 |
<% end %> |
| 13 | 13 |
<% end %> |
| app/views/issues/show.html.erb | ||
|---|---|---|
| 82 | 82 |
<%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if @issue.notes_addable? %> |
| 83 | 83 |
</div> |
| 84 | 84 | |
| 85 |
<p><strong><%=l(:field_description)%></strong></p> |
|
| 86 |
<div class="wiki"> |
|
| 85 |
<p><strong class="toggle-section icon icon-expanded"><%=l(:field_description)%></strong></p>
|
|
| 86 |
<div class="wiki collapsible">
|
|
| 87 | 87 |
<%= textilizable @issue, :description, :attachments => @issue.attachments %> |
| 88 | 88 |
</div> |
| 89 | 89 |
</div> |
| 90 | 90 |
<% end %> |
| 91 | 91 |
<% if @issue.attachments.any? %> |
| 92 | 92 |
<hr /> |
| 93 |
<p><strong><%=l(:label_attachment_plural)%></strong></p> |
|
| 93 |
<p><strong class="toggle-section icon icon-expanded"><%=l(:label_attachment_plural)%></strong></p>
|
|
| 94 | 94 |
<%= link_to_attachments @issue, :thumbnails => true %> |
| 95 | 95 |
<% end %> |
| 96 | 96 | |
| ... | ... | |
| 104 | 104 |
<div class="contextual"> |
| 105 | 105 |
<%= link_to_new_subtask(@issue) if User.current.allowed_to?(:manage_subtasks, @project) %> |
| 106 | 106 |
</div> |
| 107 |
<p><strong><%=l(:label_subtask_plural)%></strong></p> |
|
| 108 |
<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do %>
|
|
| 107 |
<p><strong class="toggle-section icon icon-expanded"><%=l(:label_subtask_plural)%></strong></p>
|
|
| 108 |
<%= form_tag({}, :class => 'collapsible', :data => {:cm_url => issues_context_menu_path}) do %>
|
|
| 109 | 109 |
<%= render_descendants_tree(@issue) unless @issue.leaf? %> |
| 110 | 110 |
<% end %> |
| 111 | 111 |
</div> |
| public/javascripts/application.js | ||
|---|---|---|
| 844 | 844 |
$(document).ready(function(){
|
| 845 | 845 |
$('#content').on('change', 'input[data-disables], input[data-enables], input[data-shows]', toggleDisabledOnChange);
|
| 846 | 846 |
toggleDisabledInit(); |
| 847 | ||
| 848 |
$(".toggle-section").on('click', function() {
|
|
| 849 |
element = $(this) |
|
| 850 |
element.toggleClass('icon-collapsed icon-expanded');
|
|
| 851 |
element.parent().next('.collapsible').toggle();
|
|
| 852 |
}); |
|
| 847 | 853 |
}); |
| 848 | 854 | |
| 849 | 855 |
function keepAnchorOnSignIn(form){
|
| public/stylesheets/application.css | ||
|---|---|---|
| 482 | 482 |
fieldset.collapsible>legend { padding-left: 18px; background: url(../images/arrow_down.png) no-repeat 4px 40%; cursor:pointer; }
|
| 483 | 483 |
fieldset.collapsible.collapsed>legend { background-image: url(../images/arrow_right.png); }
|
| 484 | 484 | |
| 485 |
.toggle-section {cursor: pointer;}
|
|
| 486 |
.toggle-section.icon {padding-left: 15px;}
|
|
| 487 | ||
| 485 | 488 |
fieldset#date-range p { margin: 2px 0 2px 0; }
|
| 486 | 489 |
fieldset#filters table { border-collapse: collapse; }
|
| 487 | 490 |
fieldset#filters table td { padding: 0; vertical-align: middle; }
|
| ... | ... | |
| 1315 | 1318 |
.icon-add-bullet { background-image: url(../images/bullet_add.png); }
|
| 1316 | 1319 |
.icon-shared { background-image: url(../images/link.png); }
|
| 1317 | 1320 |
.icon-actions { background-image: url(../images/3_bullets.png); }
|
| 1321 |
.icon-collapsed {background-image: url(../images/arrow_right.png); }
|
|
| 1322 |
.icon-expanded {background-image: url(../images/arrow_down.png); }
|
|
| 1318 | 1323 | |
| 1319 | 1324 |
.icon-file { background-image: url(../images/files/default.png); }
|
| 1320 | 1325 |
.icon-file.text-plain { background-image: url(../images/files/text.png); }
|