Woohoo! Map renders in Firefox!
Much else still doesn't work, however.
This commit is contained in:
parent
db5a034d9a
commit
20d6c9bd9a
|
@ -119,23 +119,25 @@
|
|||
[:div
|
||||
[:header
|
||||
[ui/navbar]]
|
||||
(if content [error-boundary [content]]
|
||||
(if content [content]
|
||||
[:div.error (str "No content in page " @(rf/subscribe [:page]))])
|
||||
[:footer
|
||||
[:div.error {:style [:display (if (empty? error) :none :block)]} (apply str error)]
|
||||
(if-not (empty? error)
|
||||
[:div.error
|
||||
error])
|
||||
(if-not (empty? feedback)
|
||||
[:div.feedback
|
||||
{:style [:display (if (empty? feedback) :none :block)]}
|
||||
(apply str (map #(h/feedback-messages %) (distinct feedback)))]
|
||||
[:div.queue (if
|
||||
(nil? outqueue) ""
|
||||
(str (count outqueue) " items queued to send"))]]]))
|
||||
(apply str (map #(h/feedback-messages %) (distinct feedback)))])
|
||||
;; (if-not (empty? outqueue)
|
||||
;; [:div.queue (str (count outqueue) " items queued to send")])
|
||||
]]))
|
||||
|
||||
;; -------------------------
|
||||
;; Routes
|
||||
(secretary/set-config! :prefix "#")
|
||||
|
||||
(secretary/defroute "/" []
|
||||
(ui/log-and-dispatch [:set-active-page :map]))
|
||||
(ui/log-and-dispatch [:set-active-page :about]))
|
||||
|
||||
(secretary/defroute "/about" []
|
||||
(ui/log-and-dispatch [:set-active-page :about]))
|
||||
|
@ -214,7 +216,7 @@
|
|||
(rf/dispatch [:fetch-options])
|
||||
(rf/dispatch [:fetch-issues])
|
||||
(rf/dispatch [:fetch-followupmethods])
|
||||
(rf/dispatch [:dispatch-later [{:ms 60000 :dispatch [:process-queue]}]])
|
||||
;; (rf/dispatch [:dispatch-later [{:ms 60000 :dispatch [:process-queue]}]])
|
||||
(load-interceptors!)
|
||||
(hook-browser-navigation!)
|
||||
(mount-components))
|
||||
|
|
|
@ -94,12 +94,14 @@
|
|||
so back links work."
|
||||
[id]
|
||||
(js/console.log (str "Click handler for address #" id))
|
||||
(let [view @(subscribe [:view])
|
||||
centre (.getCenter view)]
|
||||
(dispatch [:set-zoom (.getZoom view)])
|
||||
(dispatch [:set-latitude (.-lat centre)])
|
||||
(dispatch [:set-longitude (.-lng centre)]))
|
||||
(set! window.location.href (str "#building/" id)))
|
||||
;; (let [view @(subscribe [:view])
|
||||
;; centre (.getCenter view)]
|
||||
;; (dispatch [:set-zoom (.getZoom view)])
|
||||
;; (dispatch [:set-latitude (.-lat centre)])
|
||||
;; (dispatch [:set-longitude (.-lng centre)]))
|
||||
(js/console.log (str "Navigating to " "#building/" id))
|
||||
(set! window.location.href (str "#building/" id))
|
||||
)
|
||||
|
||||
|
||||
(defn add-map-pin
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
{:fetch-locality "Fetching local data."
|
||||
:send-request "Request has been queued."
|
||||
:send-intention-and-visit "Voting intention has been sent"
|
||||
:bad-address "No valid address has been selected"
|
||||
})
|
||||
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
(reg-sub
|
||||
:error
|
||||
(fn [db _]
|
||||
(:error db)))
|
||||
(apply str (:error db))))
|
||||
|
||||
(reg-sub
|
||||
:feedback
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
[]
|
||||
(let [address @(subscribe [:address])
|
||||
dwellings (:dwellings address)]
|
||||
(js/console.log (str "Address: address"))
|
||||
(if address
|
||||
[:div
|
||||
[:h1 (str "Flats at " (:address address))]
|
||||
[:div.container {:id "main-container"}
|
||||
|
@ -51,4 +53,4 @@
|
|||
:target (str "#/dwelling/" (:id dwelling))) )
|
||||
(sort-by
|
||||
:sub_address
|
||||
(:dwellings address)))]]]))
|
||||
(:dwellings address)))]]])))
|
||||
|
|
Loading…
Reference in a new issue