From 9dbe68cc8c7d39d744c48aa038860eecbda8e70e Mon Sep 17 00:00:00 2001 From: Nicholas Kariniemi Date: Sun, 4 Aug 2013 21:15:56 +0300 Subject: [PATCH] Only show delete bottons on hover --- public/css/styles.css | 7 +++++++ src-clj/grub/core.clj | 3 ++- src-cljs/grub_client/view.cljs | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 public/css/styles.css diff --git a/public/css/styles.css b/public/css/styles.css new file mode 100644 index 0000000..2c3e011 --- /dev/null +++ b/public/css/styles.css @@ -0,0 +1,7 @@ +.grub-close { + display: none; +} + +tr:hover .grub-close { + display: block; +} diff --git a/src-clj/grub/core.clj b/src-clj/grub/core.clj index f8a1ffd..54cbecd 100644 --- a/src-clj/grub/core.clj +++ b/src-clj/grub/core.clj @@ -36,7 +36,8 @@ [:head [:title "Grub"] [:meta {:name "viewport" :content "width=device-width, initial-scale=1.0"}] - (include-css "/css/bootstrap.css")] + (include-css "/css/bootstrap.css") + (include-css "/css/styles.css")] [:body (include-js "http://code.jquery.com/jquery.js") (include-js "/js/bootstrap.js") diff --git a/src-cljs/grub_client/view.cljs b/src-cljs/grub_client/view.cljs index c44278b..b8128b9 100644 --- a/src-cljs/grub_client/view.cljs +++ b/src-cljs/grub_client/view.cljs @@ -14,7 +14,7 @@ [:input {:type "checkbox"}] (:grub grub)]]] [:td - [:button.close {:type "button"} "×"]]]) + [:button.grub-close.close {:type "button"} "×"]]]) (def add-grub-text (node [:input.form-control {:type "text" :placeholder "2 grubs"}]))