Commit b34378c4d7932b34a89ef95936dc1a828453e31e

Authored by Dmitriy Zaporozhets
1 parent 44c55307

Improve preview/edit links for comment form

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/assets/stylesheets/sections/notes.scss
@@ -275,10 +275,9 @@ ul.notes { @@ -275,10 +275,9 @@ ul.notes {
275 275
276 // preview/edit buttons 276 // preview/edit buttons
277 > a { 277 > a {
278 - font-size: 24px;  
279 - padding: 4px;  
280 position: absolute; 278 position: absolute;
281 - right: 10px; 279 + right: 5px;
  280 + top: 116px;
282 } 281 }
283 .note_preview { 282 .note_preview {
284 background: #f5f5f5; 283 background: #f5f5f5;
@@ -325,7 +324,7 @@ ul.notes { @@ -325,7 +324,7 @@ ul.notes {
325 padding: 0 5px; 324 padding: 0 5px;
326 325
327 .note-form-option { 326 .note-form-option {
328 - margin-top: 10px; 327 + margin-top: 8px;
329 margin-left: 30px; 328 margin-left: 30px;
330 @extend .pull-left; 329 @extend .pull-left;
331 } 330 }
@@ -366,4 +365,4 @@ ul.notes { @@ -366,4 +365,4 @@ ul.notes {
366 365
367 .parallel-comment { 366 .parallel-comment {
368 padding: 6px; 367 padding: 6px;
369 -}  
370 \ No newline at end of file 368 \ No newline at end of file
  369 +}
app/views/projects/notes/_form.html.haml
@@ -7,10 +7,12 @@ @@ -7,10 +7,12 @@
7 = f.hidden_field :noteable_type 7 = f.hidden_field :noteable_type
8 8
9 .note_text_and_preview.js-toggler-container 9 .note_text_and_preview.js-toggler-container
10 - %a.js-note-preview-button.js-toggler-target.turn-off{ href: "javascript:;", title: "Preview", data: {url: preview_project_notes_path(@project)} } 10 + %a.btn.btn-primary.js-note-preview-button.js-toggler-target.turn-off{ href: "#", data: {url: preview_project_notes_path(@project)} }
11 %i.icon-eye-open 11 %i.icon-eye-open
12 - %a.js-note-edit-button.js-toggler-target.turn-off{ href: "javascript:;", title: "Edit" } 12 + Preview
  13 + %a.btn.btn-primary.js-note-edit-button.js-toggler-target.turn-off{ href: "#" }
13 %i.icon-edit 14 %i.icon-edit
  15 + Write
14 16
15 = f.text_area :note, size: 255, class: 'note_text js-note-text js-gfm-input turn-on' 17 = f.text_area :note, size: 255, class: 'note_text js-note-text js-gfm-input turn-on'
16 .note_preview.js-note-preview.turn-off 18 .note_preview.js-note-preview.turn-off
@@ -27,7 +29,7 @@ @@ -27,7 +29,7 @@
27 %a.btn.grouped.js-close-discussion-note-form Cancel 29 %a.btn.grouped.js-close-discussion-note-form Cancel
28 30
29 .note-form-option 31 .note-form-option
30 - %a.choose-btn.btn.btn-small.js-choose-note-attachment-button 32 + %a.choose-btn.btn.js-choose-note-attachment-button
31 %i.icon-paper-clip 33 %i.icon-paper-clip
32 %span Choose File ... 34 %span Choose File ...
33 &nbsp; 35 &nbsp;