Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
matobaa authored and Redmine Patch Meetup committed Apr 22, 2023
1 parent f653a8f commit d6fed12
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
3 changes: 3 additions & 0 deletions app/views/issues/_action_menu.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<div class="contextual">
<%= link_to l(:button_add_notes), edit_issue_path(@issue),
:onclick => 'showAndScrollToAddNotes(); return false;',
:class => 'icon icon-add' if @issue.editable? %>
<%= link_to l(:button_edit), edit_issue_path(@issue),
:onclick => 'showAndScrollTo("update", "issue_notes"); return false;',
:class => 'icon icon-edit', :accesskey => accesskey(:edit) if @issue.editable? %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/issues/_action_menu_edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<div style="clear: both;"></div>
<% if @issue.editable? %>
<div id="update" style="display:none;">
<div id="update" class="hidden">
<h3><%= l(:button_edit) %></h3>
<%= render :partial => 'edit' %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/issues/_edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<%= render :partial => 'conflict' if @conflict %>
<div class="box">
<% if @issue.attributes_editable? %>
<fieldset class="tabular"><legend><%= l(:label_change_properties) %></legend>
<fieldset id="attributes" class="tabular"><legend><%= l(:label_change_properties) %></legend>
<div id="all_attributes">
<%= render :partial => 'form', :locals => {:f => f} %>
</div>
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,7 @@ en:
button_edit: Edit
button_edit_associated_wikipage: "Edit associated Wiki page: %{page_title}"
button_add: Add
button_add_notes: Add notes
button_change: Change
button_apply: Apply
button_clear: Clear
Expand Down
14 changes: 14 additions & 0 deletions public/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ function showAndScrollTo(id, focus) {
$('html, body').animate({scrollTop: $('#'+id).offset().top}, 100);
}

function showAndScrollToEditIssue() {
$('#update h3').show();
$('#attributes').show();
$('#log_time').show();
showAndScrollTo('update', 'issue_notes');
}

function showAndScrollToAddNotes() {
$('#update h3').hide();
$('#attributes').hide();
$('#log_time').hide();
showAndScrollTo('update', 'issue_notes');
}

function toggleRowGroup(el) {
var tr = $(el).parents('tr').first();
var n = tr.next();
Expand Down
2 changes: 1 addition & 1 deletion public/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ div.modal p.buttons {text-align:right; margin-bottom:0;}
div.modal .box p {margin: 0.3em 0;}

.clear:after{ content: "."; display: block; height: 0; clear: both; visibility: hidden; }

.hidden {display: none;}
.mobile-show {display: none;}
.hidden {display: none;}
.inline-flex {display: inline-flex;}
Expand Down

0 comments on commit d6fed12

Please sign in to comment.