Skip to content

Commit c739ef8

Browse files
committed
1 parent b963f59 commit c739ef8

File tree

6 files changed

+24
-6
lines changed

6 files changed

+24
-6
lines changed

app/views/issues/_action_menu.html.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<div class="contextual">
2+
<%= link_to l(:button_add_notes), edit_issue_path(@issue),
3+
:onclick => 'showAndScrollToAddNotes(); return false;',
4+
:class => 'icon icon-add' if @issue.editable? %>
25
<%= link_to l(:button_edit), edit_issue_path(@issue),
36
:onclick => 'showAndScrollTo("update", "issue_notes"); return false;',
47
:class => 'icon icon-edit', :accesskey => accesskey(:edit) if @issue.editable? %>

app/views/issues/_action_menu_edit.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<div style="clear: both;"></div>
55
<% if @issue.editable? %>
6-
<div id="update" style="display:none;">
6+
<div id="update" class="hidden">
77
<h3><%= l(:button_edit) %></h3>
88
<%= render :partial => 'edit' %>
99
</div>

app/views/issues/_edit.html.erb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
<%= render :partial => 'conflict' if @conflict %>
44
<div class="box">
55
<% if @issue.attributes_editable? %>
6-
<fieldset class="tabular"><legend><%= l(:label_change_properties) %></legend>
6+
<fieldset id="attributes" class="tabular"><legend><%= l(:label_change_properties) %></legend>
77
<div id="all_attributes">
88
<%= render :partial => 'form', :locals => {:f => f} %>
99
</div>
1010
</fieldset>
1111
<% end %>
1212
<% if User.current.allowed_to?(:log_time, @project) %>
13-
<fieldset class="tabular"><legend><%= l(:button_log_time) %></legend>
13+
<fieldset id="log_time" class="tabular"><legend><%= l(:button_log_time) %></legend>
1414
<%= labelled_fields_for :time_entry, @time_entry do |time_entry| %>
1515
<div class="splitcontent">
1616
<div class="splitcontentleft">
@@ -28,7 +28,7 @@
2828
</fieldset>
2929
<% end %>
3030
<% if @issue.notes_addable? %>
31-
<fieldset><legend><%= l(:field_notes) %></legend>
31+
<fieldset id="add_notes"><legend><%= l(:field_notes) %></legend>
3232
<%= f.text_area :notes, :cols => 60, :rows => 10, :class => 'wiki-edit',
3333
:data => {
3434
:auto_complete => true
@@ -43,7 +43,7 @@
4343
<%= call_hook(:view_issues_edit_notes_bottom, { :issue => @issue, :notes => @notes, :form => f }) %>
4444
</fieldset>
4545

46-
<fieldset><legend><%= l(:label_attachment_plural) %></legend>
46+
<fieldset id="add_attachments"><legend><%= l(:label_attachment_plural) %></legend>
4747
<% if @issue.attachments.any? && @issue.safe_attribute?('deleted_attachment_ids') %>
4848
<div class="contextual"><%= link_to l(:label_edit_attachments), '#', :onclick => "$('#existing-attachments').toggle(); return false;" %></div>
4949
<div id="existing-attachments" style="<%= @issue.deleted_attachment_ids.blank? ? 'display:none;' : '' %>">

config/locales/en.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,7 @@ en:
11281128
button_edit: Edit
11291129
button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}"
11301130
button_add: Add
1131+
button_add_notes: Add notes
11311132
button_change: Change
11321133
button_apply: Apply
11331134
button_clear: Clear

public/javascripts/application.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@ function showAndScrollTo(id, focus) {
2727
$('html, body').animate({scrollTop: $('#'+id).offset().top}, 100);
2828
}
2929

30+
function showAndScrollToEditIssue() {
31+
$('#update h3').show();
32+
$('#attributes').show();
33+
$('#log_time').show();
34+
showAndScrollTo('update', 'issue_notes');
35+
}
36+
37+
function showAndScrollToAddNotes() {
38+
$('#update h3').hide();
39+
$('#attributes').hide();
40+
$('#log_time').hide();
41+
showAndScrollTo('update', 'issue_notes');
42+
}
43+
3044
function toggleRowGroup(el) {
3145
var tr = $(el).parents('tr').first();
3246
var n = tr.next();

public/stylesheets/application.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ div.modal p.buttons {text-align:right; margin-bottom:0;}
136136
div.modal .box p {margin: 0.3em 0;}
137137

138138
.clear:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; }
139-
139+
.hidden {display: none;}
140140
.mobile-show {display: none;}
141141
.hidden {display: none;}
142142
.inline-flex {display: inline-flex;}

0 commit comments

Comments
 (0)