From bd7a49c43607d2a90e0966e2606217363ef79a5a Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Sat, 11 Feb 2012 15:07:17 -0500 Subject: [PATCH] Show edit-link on hover --- .../backbone/templates/habits/habit.jst.ejs | 7 ++++--- app/assets/stylesheets/habits.css.scss | 12 ++++++++++-- app/assets/stylesheets/rewards.css.scss | 3 --- 3 files changed, 14 insertions(+), 8 deletions(-) delete mode 100644 app/assets/stylesheets/rewards.css.scss diff --git a/app/assets/javascripts/backbone/templates/habits/habit.jst.ejs b/app/assets/javascripts/backbone/templates/habits/habit.jst.ejs index b2859c0d5f..8d2edfb8b8 100644 --- a/app/assets/javascripts/backbone/templates/habits/habit.jst.ejs +++ b/app/assets/javascripts/backbone/templates/habits/habit.jst.ejs @@ -10,10 +10,11 @@ <% } %> <%= name %> -
+ +
+ Edit <% if (notes) { %>
<%= notes %>
<% } %> - Edit -
+
\ No newline at end of file diff --git a/app/assets/stylesheets/habits.css.scss b/app/assets/stylesheets/habits.css.scss index 9896659b8c..61071f7118 100644 --- a/app/assets/stylesheets/habits.css.scss +++ b/app/assets/stylesheets/habits.css.scss @@ -40,10 +40,18 @@ text-decoration:none; } -.edit { float:right; } - #progressbar { margin-top: 20px; } #tnl { float:right; margin:5px; } #money { float:right; } + +.habit-meta { float:right; } + +.habit-meta .edit-link { + display: none; +} + +li:hover .habit-meta .edit-link { + display: inline; +} diff --git a/app/assets/stylesheets/rewards.css.scss b/app/assets/stylesheets/rewards.css.scss deleted file mode 100644 index fb8a5be462..0000000000 --- a/app/assets/stylesheets/rewards.css.scss +++ /dev/null @@ -1,3 +0,0 @@ -// Place all the styles related to the rewards controller here. -// They will automatically be included in application.css. -// You can use Sass (SCSS) here: http://sass-lang.com/