Skip to content

Commit 0ae7d87

Browse files
matobaaRedmine Patch Meetup
authored andcommitted
1 parent 3f70dd6 commit 0ae7d87

File tree

6 files changed

+21
-3
lines changed

6 files changed

+21
-3
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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>

config/locales/en.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,6 +1146,7 @@ en:
11461146
button_edit: Edit
11471147
button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}"
11481148
button_add: Add
1149+
button_add_notes: Add notes
11491150
button_change: Change
11501151
button_apply: Apply
11511152
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
@@ -141,7 +141,7 @@ div.modal p.buttons {text-align:right; margin-bottom:0;}
141141
div.modal .box p {margin: 0.3em 0;}
142142

143143
.clear:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; }
144-
144+
.hidden {display: none;}
145145
.mobile-show {display: none;}
146146
.hidden {display: none;}
147147
.inline-flex {display: inline-flex;}

0 commit comments

Comments
 (0)