0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 23:49:45 -05:00

Add deletion confirmation to image collection and image item.

This commit is contained in:
Andrey Antukh 2016-09-25 15:20:10 +03:00
parent 77dec1d0e6
commit 6795a4d9a5
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -97,8 +97,11 @@
(dom/prevent-default e)
(dom/stop-propagation e)
(on-save e))))
(delete []
(rs/emit! (di/delete-collection (:id coll))))
(on-delete []
(rs/emit! (di/delete-collection (:id coll))))]
(udl/open! :confirm {:on-accept delete}))]
[:div.dashboard-title
[:h2
(if edit?
@ -205,8 +208,10 @@
(mx/defc grid-options
[coll]
(let [own? (= (:type coll) :own)]
(letfn [(on-delete [event]
(rs/emit! (di/delete-selected)))]
(letfn [(delete []
(rs/emit! (di/delete-selected)))
(on-delete [event]
(udl/open! :confirm {:on-accept delete}))]
;; MULTISELECT OPTIONS BAR
[:div.multiselect-bar
(if own?