Update Om to fix production build issues
This commit is contained in:
parent
9e6d900596
commit
6ca589e3e6
7 changed files with 22 additions and 38785 deletions
|
@ -6,7 +6,7 @@
|
|||
:dependencies [[org.clojure/clojure "1.7.0"]
|
||||
[org.clojure/clojurescript "0.0-3308"]
|
||||
[org.clojure/core.async "0.1.346.0-17112a-alpha"]
|
||||
[om "0.7.3"]
|
||||
[org.omcljs/om "0.8.8"]
|
||||
[http-kit "2.1.19"]
|
||||
[ring/ring-core "1.3.2" :exclusions [org.clojure/tools.reader]]
|
||||
[hiccup "1.0.5"]
|
||||
|
@ -35,9 +35,7 @@
|
|||
:prod {:source-paths ["src/cljs" "src/cljc"]
|
||||
:compiler {:output-to "resources/public/js/grub.min.js"
|
||||
:optimizations :advanced
|
||||
:pretty-print false
|
||||
:preamble ["react/react.min.js"]
|
||||
:externs ["react/externs/react.js"]}}}}
|
||||
:pretty-print false}}}}
|
||||
:source-paths ["src/clj" "src/cljc" "target/classes"]
|
||||
:test-paths ["src/test"]
|
||||
:ring {:handler grub.core/app}
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -32,7 +32,6 @@
|
|||
(hiccup/include-css "./css/styles.css")]
|
||||
[:body
|
||||
[:div#container]
|
||||
(hiccup/include-js "./js/react-0.11.2-with-addons.js")
|
||||
(hiccup/include-js "./js/out/goog/base.js")
|
||||
(hiccup/include-js "./js/grub.js")
|
||||
[:script {:type "text/javascript"} "goog.require(\"grub.core\")"]]))
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
(when (= edit-state :editing) "edit")]
|
||||
:on-click (fn [e] (when (#{:waiting :pressed} edit-state)
|
||||
(om/transact! grub nil #(assoc % :completed (not completed)) :local)
|
||||
(.blur (om/get-node owner :grub-input))))
|
||||
(.blur (om/get-node owner "grub-input"))))
|
||||
:on-mouse-down #(transition-state owner :mouse-down)
|
||||
:on-mouse-up #(transition-state owner :mouse-up)
|
||||
:on-mouse-leave #(transition-state owner :mouse-leave)
|
||||
|
@ -70,7 +70,7 @@
|
|||
[:input.grub-input
|
||||
{:type "text"
|
||||
:readOnly (if (= edit-state :editing) "" "readonly")
|
||||
:ref :grub-input
|
||||
:ref "grub-input"
|
||||
:value (:grub-text state)
|
||||
:on-change #(om/set-state! owner :grub-text (.. % -target -value))
|
||||
:on-key-up #(when (dom/enter-pressed? %) (transition-state owner :enter))}]
|
||||
|
|
|
@ -79,8 +79,8 @@
|
|||
(html
|
||||
[:div.panel.panel-default.recipe-panel
|
||||
{:on-click
|
||||
#(when (not (or (dom/click-on-elem? % (om/get-node owner :add-grubs-btn))
|
||||
(dom/click-on-elem? % (om/get-node owner :save-btn))))
|
||||
#(when (not (or (dom/click-on-elem? % (om/get-node owner "add-grubs-btn"))
|
||||
(dom/click-on-elem? % (om/get-node owner "save-btn"))))
|
||||
(transition-state owner :click))}
|
||||
[:div.panel-heading.recipe-header
|
||||
{:class (when (= edit-state :editing) "edit")}
|
||||
|
@ -92,7 +92,7 @@
|
|||
[:button.btn.btn-primary.btn-sm.recipe-add-grubs-btn
|
||||
{:type "button"
|
||||
:class (when (= edit-state :editing) "hidden")
|
||||
:ref :add-grubs-btn
|
||||
:ref "add-grubs-btn"
|
||||
:on-click #(add-grubs (om/get-shared owner :add-grubs-ch) grubs)}
|
||||
[:span.glyphicon.glyphicon-plus]
|
||||
" Grubs"]]
|
||||
|
@ -116,7 +116,7 @@
|
|||
[:span.glyphicon.glyphicon-trash]]
|
||||
[:button.btn.btn-primary.pull-right.recipe-done-btn
|
||||
{:type "button"
|
||||
:ref :save-btn
|
||||
:ref "save-btn"
|
||||
:on-click #(transition-state owner :save)}
|
||||
[:span.glyphicon.glyphicon-ok]]]])))
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
(render-state [this {:keys [edit-state new-recipe-name new-recipe-grubs new-recipe-directions]}]
|
||||
(html
|
||||
[:div.panel.panel-default.recipe-panel
|
||||
{:on-click #(when (not (dom/click-on-elem? % (om/get-node owner :save-btn)))
|
||||
{:on-click #(when (not (dom/click-on-elem? % (om/get-node owner "save-btn")))
|
||||
(transition-state owner :click))}
|
||||
[:div.panel-heading.recipe-header.new
|
||||
[:input.form-control.recipe-header-input
|
||||
|
@ -74,7 +74,7 @@
|
|||
:on-change #(om/set-state! owner :new-recipe-directions (dom/event-val %))}]
|
||||
[:button.btn.btn-primary.pull-right.recipe-done-btn
|
||||
{:type "button"
|
||||
:ref :save-btn
|
||||
:ref "save-btn"
|
||||
:on-click #(transition-state owner :save)}
|
||||
[:span.glyphicon.glyphicon-ok#save-recipe-btn]]]]))
|
||||
|
||||
|
|
Loading…
Reference in a new issue