Commit 249cb19d authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix project update. Make slim form only for reversed comments

parent 7cce2b15
...@@ -34,16 +34,21 @@ var NoteList = { ...@@ -34,16 +34,21 @@ var NoteList = {
disableButtonIfEmptyField(".note-text", ".submit_note"); disableButtonIfEmptyField(".note-text", ".submit_note");
$(".note-text").on("focus", function(){
$(this).css("height", "80px");
$('.note_advanced_opts').show();
});
$("#note_attachment").change(function(e){ $("#note_attachment").change(function(e){
var val = $('.input-file').val(); var val = $('.input-file').val();
var filename = val.replace(/^.*[\\\/]/, ''); var filename = val.replace(/^.*[\\\/]/, '');
$(".file_name").text(filename); $(".file_name").text(filename);
}); });
if(this.reversed) {
var textarea = $(".note-text");
$('.note_advanced_opts').hide();
textarea.css("height", "40px");
textarea.on("focus", function(){
$(this).css("height", "80px");
$('.note_advanced_opts').show();
});
}
}, },
......
...@@ -10,13 +10,6 @@ ...@@ -10,13 +10,6 @@
padding:0px; padding:0px;
} }
#new-notes-list:not(.reversed) {
border-top:1px solid #aaa;
}
#new-notes-list.reversed {
border-bottom:1px solid #ccc;
}
.issue_notes, .issue_notes,
.wiki_notes { .wiki_notes {
.note_content { .note_content {
...@@ -33,9 +26,6 @@ ...@@ -33,9 +26,6 @@
} }
#new_note { #new_note {
.note-text {
height:40px;
}
.attach_holder { .attach_holder {
display:none; display:none;
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
.right Comments are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}. .right Comments are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
.clearfix .clearfix
.row.note_advanced_opts.hide .row.note_advanced_opts
.span3 .span3
= f.submit 'Add Comment', class: "btn success submit_note grouped", id: "submit_note" = f.submit 'Add Comment', class: "btn success submit_note grouped", id: "submit_note"
= link_to 'Preview', preview_project_notes_path(@project), class: 'btn grouped', id: 'preview-link' = link_to 'Preview', preview_project_notes_path(@project), class: 'btn grouped', id: 'preview-link'
......
...@@ -8,4 +8,4 @@ ...@@ -8,4 +8,4 @@
:javascript :javascript
$(function(){ $(function(){
NoteList.init("#{tid}", "#{tt}", "#{project_notes_path(@project)}"); NoteList.init("#{tid}", "#{tt}", "#{project_notes_path(@project)}");
}); });
\ No newline at end of file
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
%h3.page_title Edit Project %h3.page_title Edit Project
%hr %hr
= render "projects/form" = render "projects/form"
%div.ajax_loader.hide %div.save-project-loader.hide
%center %center
%div.padded= image_tag "ajax_loader.gif" = image_tag "ajax_loader.gif"
%h3.prepend-top Saving project & repository. Please wait... %h3 Saving project. Please wait a few minutes
:javascript :javascript
$(function(){ new Projects(); }); $(function(){ new Projects(); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment