From 151da534c23e208fbe1254e57cf19a7b6a5dc395 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 7 Nov 2016 22:13:12 +0100 Subject: [PATCH] Add delete confirmation to colors collections. --- src/uxbox/main/ui/dashboard/colors.cljs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/uxbox/main/ui/dashboard/colors.cljs b/src/uxbox/main/ui/dashboard/colors.cljs index 325ddd970..ba8e3d870 100644 --- a/src/uxbox/main/ui/dashboard/colors.cljs +++ b/src/uxbox/main/ui/dashboard/colors.cljs @@ -63,8 +63,10 @@ (dom/prevent-default e) (dom/stop-propagation e) (save)))) - (delete-collection [] - (rs/emit! (dc/delete-collection (:id coll))))] + (delete [] + (rs/emit! (dc/delete-collection id))) + (on-delete [] + (udl/open! :confirm {:on-accept delete}))] [:div.dashboard-title [:h2 (if edit? @@ -86,7 +88,7 @@ (if edit? [:span {:on-click save} i/save] [:span {:on-click edit} i/pencil]) - [:span {:on-click delete-collection} i/trash]])]))) + [:span {:on-click on-delete} i/trash]])]))) ;; --- Nav