From 08d24a1b8f56aa339b7431ede4678c805255986c Mon Sep 17 00:00:00 2001 From: Henrik Bohre Date: Sun, 14 Jun 2009 23:15:45 +0200 Subject: [PATCH] #300: Added some visual feedback when hovering over drop target --- app/views/todos/_todo.html.erb | 3 ++- public/stylesheets/standard.css | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/todos/_todo.html.erb b/app/views/todos/_todo.html.erb index ee2eab24..0d023284 100644 --- a/app/views/todos/_todo.html.erb +++ b/app/views/todos/_todo.html.erb @@ -46,7 +46,8 @@ draggable_element(dom_id(todo), :revert => "'true'", :handle => "'grip'", :onDr <%= drop_receiving_element(dom_id(todo), :url => {:controller => "todos", :action => "add_predecessor"}, - :with => "'successor=' + encodeURIComponent(element.id.split('_').last()) + '&predecessor=' + encodeURIComponent(#{todo.id})" + :with => "'successor=' + encodeURIComponent(element.id.split('_').last()) + '&predecessor=' + encodeURIComponent(#{todo.id})", + :hoverclass => 'hover' ) %> diff --git a/public/stylesheets/standard.css b/public/stylesheets/standard.css index 8fb551f8..45617228 100644 --- a/public/stylesheets/standard.css +++ b/public/stylesheets/standard.css @@ -939,6 +939,11 @@ div.message { cursor: move; } +.hover { + background: #EAEAEA; + font-weight: bold; +} + /* Error message styles */ .fieldWithErrors { padding: 2px;