diff --git a/frontend/uxbox/ui/dashboard.cljs b/frontend/uxbox/ui/dashboard.cljs index fd8509d38..2f7d320ad 100644 --- a/frontend/uxbox/ui/dashboard.cljs +++ b/frontend/uxbox/ui/dashboard.cljs @@ -135,14 +135,6 @@ (lightbox/close!))} i/close]]))) - ;; (.preventDefault e) - ;; (let [new-project-attributes {:name (trim name) - ;; :width (int width) - ;; :height (int height) - ;; :layout layout}] - ;; ;; (actions/create-project conn new-project-attributes) - ;; (close-lightbox!)))} - (def new-project-lightbox (util/component {:render new-project-lightbox-render diff --git a/frontend/uxbox/ui/elements.cljs b/frontend/uxbox/ui/elements.cljs index c751db43c..11c16e3dd 100644 --- a/frontend/uxbox/ui/elements.cljs +++ b/frontend/uxbox/ui/elements.cljs @@ -309,6 +309,7 @@ ] [:div.dashboard-grid-content [:div.grid-item.small-item.add-project + {on-click #(lightbox/set! :new-color)} [:span "+ New color"]] [:div.grid-item.small-item.project-th [:span.color-swatch {:style {:background-color "#81dadd"}}] @@ -476,6 +477,36 @@ {:render new-icon-lightbox-render :name "new-icon-lightbox"})) +;; ADD COLOR LIGHTBOX + (defmethod lightbox/render-lightbox :new-icon [_] - (new-icon-lightbox)) + (new-icon-lightbox))(defn- new-color-lightbox-render + [own] + (html + [:div.lightbox-body + [:h3 "New color"] + [:form + [:div.row-flex + [:input#color-hex.input-text + {:placeholder "#" + :type "text" + :auto-focus true}] + [:input#color-rgb.input-text + {:placeholder "RGB" + :type "text" + :auto-focus true}]] + [:input#project-btn.btn-primary {:value "+ Add color" :type "submit"}]] + [:a.close {:href "#" + :on-click #(do (dom/prevent-default %) + (lightbox/close!))} + i/close]])) + +(def new-color-lightbox + (util/component + {:render new-color-lightbox-render + :name "new-color-lightbox"})) + +(defmethod lightbox/render-lightbox :new-color + [_] + (new-color-lightbox))