From 8b6dba749a80fbdf94f1495dda8cf3cdad61a28b Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Thu, 13 Sep 2012 02:12:44 +0200 Subject: [PATCH] Reorder notes view elements --- app/assets/javascripts/note.js | 8 ++++---- app/assets/stylesheets/sections/notes.scss | 6 +++++- app/views/notes/_notes.html.haml | 9 ++++----- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/note.js b/app/assets/javascripts/note.js index 79ab086bfa2..47b0e0f5927 100644 --- a/app/assets/javascripts/note.js +++ b/app/assets/javascripts/note.js @@ -106,8 +106,8 @@ var NoteList = { type: "GET", url: this.notes_path, data: "?" + this.target_params, - complete: function(){ $('.status').removeClass("loading")}, - beforeSend: function() { $('.status').addClass("loading") }, + complete: function(){ $('.notes-status').removeClass("loading")}, + beforeSend: function() { $('.notes-status').addClass("loading") }, dataType: "script"}); }, @@ -136,8 +136,8 @@ var NoteList = { type: "GET", url: this.notes_path, data: "first_id=" + this.first_id + this.target_params, - complete: function(){ $('.status').removeClass("loading")}, - beforeSend: function() { $('.status').addClass("loading") }, + complete: function(){ $('.notes-status').removeClass("loading")}, + beforeSend: function() { $('.notes-status').addClass("loading") }, dataType: "script"}); }, diff --git a/app/assets/stylesheets/sections/notes.scss b/app/assets/stylesheets/sections/notes.scss index 6a965fa47b9..b2f61d9b624 100644 --- a/app/assets/stylesheets/sections/notes.scss +++ b/app/assets/stylesheets/sections/notes.scss @@ -10,7 +10,7 @@ padding:0px; } -#new_notes_list li:last-child{ +#notes-list li:last-child { border-bottom:1px solid #aaa; } @@ -71,6 +71,10 @@ } } +.notes-status { + margin: 18px; +} + p.notify_controls input{ margin: 5px; diff --git a/app/views/notes/_notes.html.haml b/app/views/notes/_notes.html.haml index e692e746465..e5b1ea72650 100644 --- a/app/views/notes/_notes.html.haml +++ b/app/views/notes/_notes.html.haml @@ -1,10 +1,9 @@ +%ul#notes-list +%ul#new_notes_list +.notes-status + - if can? current_user, :write_note, @project = render "notes/form" -.clear -%hr -%ul#new_notes_list -%ul#notes-list -.status :javascript