Commit 249cb19d96cff52f70f930fbf13ee23ae5d66d3e
1 parent
7cce2b15
Exists in
master
and in
4 other branches
Fix project update. Make slim form only for reversed comments
Showing
5 changed files
with
15 additions
and
20 deletions
Show diff stats
app/assets/javascripts/notes.js
... | ... | @@ -34,16 +34,21 @@ var NoteList = { |
34 | 34 | |
35 | 35 | disableButtonIfEmptyField(".note-text", ".submit_note"); |
36 | 36 | |
37 | - $(".note-text").on("focus", function(){ | |
38 | - $(this).css("height", "80px"); | |
39 | - $('.note_advanced_opts').show(); | |
40 | - }); | |
41 | - | |
42 | 37 | $("#note_attachment").change(function(e){ |
43 | 38 | var val = $('.input-file').val(); |
44 | 39 | var filename = val.replace(/^.*[\\\/]/, ''); |
45 | 40 | $(".file_name").text(filename); |
46 | 41 | }); |
42 | + | |
43 | + if(this.reversed) { | |
44 | + var textarea = $(".note-text"); | |
45 | + $('.note_advanced_opts').hide(); | |
46 | + textarea.css("height", "40px"); | |
47 | + textarea.on("focus", function(){ | |
48 | + $(this).css("height", "80px"); | |
49 | + $('.note_advanced_opts').show(); | |
50 | + }); | |
51 | + } | |
47 | 52 | }, |
48 | 53 | |
49 | 54 | ... | ... |
app/assets/stylesheets/sections/notes.scss
... | ... | @@ -10,13 +10,6 @@ |
10 | 10 | padding:0px; |
11 | 11 | } |
12 | 12 | |
13 | -#new-notes-list:not(.reversed) { | |
14 | - border-top:1px solid #aaa; | |
15 | -} | |
16 | -#new-notes-list.reversed { | |
17 | - border-bottom:1px solid #ccc; | |
18 | -} | |
19 | - | |
20 | 13 | .issue_notes, |
21 | 14 | .wiki_notes { |
22 | 15 | .note_content { |
... | ... | @@ -33,9 +26,6 @@ |
33 | 26 | } |
34 | 27 | |
35 | 28 | #new_note { |
36 | - .note-text { | |
37 | - height:40px; | |
38 | - } | |
39 | 29 | .attach_holder { |
40 | 30 | display:none; |
41 | 31 | } | ... | ... |
app/views/notes/_common_form.html.haml
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | .right Comments are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}. |
15 | 15 | .clearfix |
16 | 16 | |
17 | - .row.note_advanced_opts.hide | |
17 | + .row.note_advanced_opts | |
18 | 18 | .span3 |
19 | 19 | = f.submit 'Add Comment', class: "btn success submit_note grouped", id: "submit_note" |
20 | 20 | = link_to 'Preview', preview_project_notes_path(@project), class: 'btn grouped', id: 'preview-link' | ... | ... |
app/views/notes/_reversed_notes_with_form.html.haml
app/views/projects/edit.html.haml
... | ... | @@ -3,10 +3,10 @@ |
3 | 3 | %h3.page_title Edit Project |
4 | 4 | %hr |
5 | 5 | = render "projects/form" |
6 | -%div.ajax_loader.hide | |
6 | +%div.save-project-loader.hide | |
7 | 7 | %center |
8 | - %div.padded= image_tag "ajax_loader.gif" | |
9 | - %h3.prepend-top Saving project & repository. Please wait... | |
8 | + = image_tag "ajax_loader.gif" | |
9 | + %h3 Saving project. Please wait a few minutes | |
10 | 10 | |
11 | 11 | :javascript |
12 | 12 | $(function(){ new Projects(); }); | ... | ... |