summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-09-18 08:54:17 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-09-18 08:54:17 +0300
commit249cb19d96cff52f70f930fbf13ee23ae5d66d3e (patch)
treee64af6936ec3d4b08dd4ab5aa023fb48b060eda1
parent7cce2b1506fc9e1da2d933953e026bb8b9d81ba0 (diff)
downloadgitlab-ce-249cb19d96cff52f70f930fbf13ee23ae5d66d3e.tar.gz
Fix project update. Make slim form only for reversed comments
-rw-r--r--app/assets/javascripts/notes.js15
-rw-r--r--app/assets/stylesheets/sections/notes.scss10
-rw-r--r--app/views/notes/_common_form.html.haml2
-rw-r--r--app/views/notes/_reversed_notes_with_form.html.haml2
-rw-r--r--app/views/projects/edit.html.haml6
5 files changed, 15 insertions, 20 deletions
diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js
index 81bb1d6d1b0..4a55b41b1ab 100644
--- a/app/assets/javascripts/notes.js
+++ b/app/assets/javascripts/notes.js
@@ -34,16 +34,21 @@ var NoteList = {
disableButtonIfEmptyField(".note-text", ".submit_note");
- $(".note-text").on("focus", function(){
- $(this).css("height", "80px");
- $('.note_advanced_opts').show();
- });
-
$("#note_attachment").change(function(e){
var val = $('.input-file').val();
var filename = val.replace(/^.*[\\\/]/, '');
$(".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();
+ });
+ }
},
diff --git a/app/assets/stylesheets/sections/notes.scss b/app/assets/stylesheets/sections/notes.scss
index 148807d6521..5fc6c96e8ca 100644
--- a/app/assets/stylesheets/sections/notes.scss
+++ b/app/assets/stylesheets/sections/notes.scss
@@ -10,13 +10,6 @@
padding:0px;
}
-#new-notes-list:not(.reversed) {
- border-top:1px solid #aaa;
-}
-#new-notes-list.reversed {
- border-bottom:1px solid #ccc;
-}
-
.issue_notes,
.wiki_notes {
.note_content {
@@ -33,9 +26,6 @@
}
#new_note {
- .note-text {
- height:40px;
- }
.attach_holder {
display:none;
}
diff --git a/app/views/notes/_common_form.html.haml b/app/views/notes/_common_form.html.haml
index 6d559cfc790..fc6e3c7ee6e 100644
--- a/app/views/notes/_common_form.html.haml
+++ b/app/views/notes/_common_form.html.haml
@@ -14,7 +14,7 @@
.right Comments are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
.clearfix
- .row.note_advanced_opts.hide
+ .row.note_advanced_opts
.span3
= 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'
diff --git a/app/views/notes/_reversed_notes_with_form.html.haml b/app/views/notes/_reversed_notes_with_form.html.haml
index 05f01847da4..24d599244b4 100644
--- a/app/views/notes/_reversed_notes_with_form.html.haml
+++ b/app/views/notes/_reversed_notes_with_form.html.haml
@@ -8,4 +8,4 @@
:javascript
$(function(){
NoteList.init("#{tid}", "#{tt}", "#{project_notes_path(@project)}");
- }); \ No newline at end of file
+ });
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index 987d43ec540..fdd537da3aa 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -3,10 +3,10 @@
%h3.page_title Edit Project
%hr
= render "projects/form"
-%div.ajax_loader.hide
+%div.save-project-loader.hide
%center
- %div.padded= image_tag "ajax_loader.gif"
- %h3.prepend-top Saving project &amp; repository. Please wait...
+ = image_tag "ajax_loader.gif"
+ %h3 Saving project. Please wait a few minutes
:javascript
$(function(){ new Projects(); });