Commit 07a9d44de7a54b2cd1bffd9fcc830f7b2a03b549
Committed by
Ciro Santilli
1 parent
9b52affe
Exists in
spb-stable
and in
2 other branches
Commit message textareas have 72 char mark line.
Showing
7 changed files
with
38 additions
and
5 deletions
Show diff stats
app/assets/stylesheets/generic/forms.scss
... | ... | @@ -75,3 +75,26 @@ label { |
75 | 75 | width: 200px; |
76 | 76 | } |
77 | 77 | } |
78 | + | |
79 | +.commit-message-container { | |
80 | + background-color: $body-bg; | |
81 | + position: relative; | |
82 | + font-family: $monospace_font; | |
83 | + $left: 12px; | |
84 | + .max-width-marker { | |
85 | + color: rgba(0, 0, 0, 0.0); | |
86 | + font-family: inherit; | |
87 | + left: $left; | |
88 | + height: 100%; | |
89 | + border-right: 1px solid mix($input-border, white); | |
90 | + position: absolute; | |
91 | + z-index: 1; | |
92 | + } | |
93 | + > textarea { | |
94 | + background-color: rgba(0, 0, 0, 0.0); | |
95 | + font-family: inherit; | |
96 | + padding-left: $left; | |
97 | + position: relative; | |
98 | + z-index: 2; | |
99 | + } | |
100 | +} | ... | ... |
app/assets/stylesheets/sections/tree.scss
app/views/projects/blob/_remove.html.haml
... | ... | @@ -14,7 +14,8 @@ |
14 | 14 | = label_tag 'commit_message', class: "control-label" do |
15 | 15 | Commit message |
16 | 16 | .col-sm-10 |
17 | - = text_area_tag 'commit_message', params[:commit_message], placeholder: "Removed this file because...", required: true, rows: 3, class: 'form-control' | |
17 | + = render 'shared/commit_message_container', {textarea: text_area_tag('commit_message', | |
18 | + params[:commit_message], placeholder: "Removed this file because...", required: true, rows: 3, class: 'form-control')} | |
18 | 19 | .form-group |
19 | 20 | .col-sm-2 |
20 | 21 | .col-sm-10 | ... | ... |
app/views/projects/edit_tree/show.html.haml
... | ... | @@ -19,7 +19,8 @@ |
19 | 19 | = label_tag 'commit_message', class: "control-label" do |
20 | 20 | Commit message |
21 | 21 | .col-sm-10 |
22 | - = text_area_tag 'commit_message', '', placeholder: "Update #{@blob.name}", required: true, rows: 3, class: 'form-control' | |
22 | + = render 'shared/commit_message_container', {textarea: text_area_tag('commit_message', '', | |
23 | + placeholder: "Update #{@blob.name}", required: true, rows: 3, class: 'form-control')} | |
23 | 24 | .form-actions |
24 | 25 | = hidden_field_tag 'last_commit', @last_commit |
25 | 26 | = hidden_field_tag 'content', '', id: "file-content" | ... | ... |
app/views/projects/merge_requests/show/_mr_accept.html.haml
... | ... | @@ -21,7 +21,6 @@ |
21 | 21 | = link_to "click here", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal" |
22 | 22 | for instructions. |
23 | 23 | |
24 | - | |
25 | 24 | .js-toggle-container |
26 | 25 | %p |
27 | 26 | If you want to modify merge commit message - |
... | ... | @@ -31,7 +30,8 @@ |
31 | 30 | .form-group |
32 | 31 | = label_tag :merge_commit_message, "Commit message", class: 'control-label' |
33 | 32 | .col-sm-10 |
34 | - = text_area_tag :merge_commit_message, @merge_request.merge_commit_message, class: "form-control js-gfm-input", rows: 14, required: true | |
33 | + = render 'shared/commit_message_container', {textarea: text_area_tag(:merge_commit_message, | |
34 | + @merge_request.merge_commit_message, class: "form-control js-gfm-input", rows: 14, required: true)} | |
35 | 35 | %p.hint |
36 | 36 | The recommended maximum line length is 52 characters for the first line and 72 characters for all following lines. |
37 | 37 | ... | ... |
app/views/projects/new_tree/show.html.haml
... | ... | @@ -24,7 +24,8 @@ |
24 | 24 | = label_tag 'commit_message', class: "control-label" do |
25 | 25 | Commit message |
26 | 26 | .col-sm-10 |
27 | - = text_area_tag 'commit_message', params[:commit_message], placeholder: "Added new file", required: true, rows: 3, class: 'form-control' | |
27 | + = render 'shared/commit_message_container', {textarea: text_area_tag('commit_message', | |
28 | + params[:commit_message], placeholder: "Added new file", required: true, rows: 3, class: 'form-control')} | |
28 | 29 | |
29 | 30 | .file-holder |
30 | 31 | .file-title | ... | ... |