Commit 8b6dba749a80fbdf94f1495dda8cf3cdad61a28b

Authored by Riyad Preukschas
1 parent 8f9a450e

Reorder notes view elements

app/assets/javascripts/note.js
... ... @@ -106,8 +106,8 @@ var NoteList = {
106 106 type: "GET",
107 107 url: this.notes_path,
108 108 data: "?" + this.target_params,
109   - complete: function(){ $('.status').removeClass("loading")},
110   - beforeSend: function() { $('.status').addClass("loading") },
  109 + complete: function(){ $('.notes-status').removeClass("loading")},
  110 + beforeSend: function() { $('.notes-status').addClass("loading") },
111 111 dataType: "script"});
112 112 },
113 113  
... ... @@ -136,8 +136,8 @@ var NoteList = {
136 136 type: "GET",
137 137 url: this.notes_path,
138 138 data: "first_id=" + this.first_id + this.target_params,
139   - complete: function(){ $('.status').removeClass("loading")},
140   - beforeSend: function() { $('.status').addClass("loading") },
  139 + complete: function(){ $('.notes-status').removeClass("loading")},
  140 + beforeSend: function() { $('.notes-status').addClass("loading") },
141 141 dataType: "script"});
142 142 },
143 143  
... ...
app/assets/stylesheets/sections/notes.scss
... ... @@ -10,7 +10,7 @@
10 10 padding:0px;
11 11 }
12 12  
13   -#new_notes_list li:last-child{
  13 +#notes-list li:last-child {
14 14 border-bottom:1px solid #aaa;
15 15 }
16 16  
... ... @@ -71,6 +71,10 @@
71 71 }
72 72 }
73 73  
  74 +.notes-status {
  75 + margin: 18px;
  76 +}
  77 +
74 78  
75 79 p.notify_controls input{
76 80 margin: 5px;
... ...
app/views/notes/_notes.html.haml
  1 +%ul#notes-list
  2 +%ul#new_notes_list
  3 +.notes-status
  4 +
1 5 - if can? current_user, :write_note, @project
2 6 = render "notes/form"
3   -.clear
4   -%hr
5   -%ul#new_notes_list
6   -%ul#notes-list
7   -.status
8 7  
9 8  
10 9 :javascript
... ...