Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
913beffb61
|
@ -3,3 +3,7 @@
|
|||
### Alpha test code
|
||||
|
||||
This is a voter intention information system intended to be used by the 'Yes' side in the next Scottish independence referendum. For more information, see [About](about).
|
||||
|
||||
### App not working in Firefox
|
||||
|
||||
This is a known issue; I apologise. It will be fixed.
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
{% block content %}
|
||||
<form action="{{servlet-context}}/login" method="post">
|
||||
{% csrf-field %}
|
||||
<input type="hidden" name="redirect-to" value="{{servlet-context}}/roles"/>
|
||||
<h2>
|
||||
Or use a test username and password
|
||||
</h2>
|
||||
|
|
|
@ -23,6 +23,9 @@
|
|||
;;;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
;;;; Specified here:
|
||||
;;;; https://github.com/simon-brooke/youyesyet/blob/master/doc/specification/scaling.md#searching-the-database-for-localities
|
||||
|
||||
;;;; See also resources/sql/locality-trigger.sql
|
||||
|
||||
(defn locality
|
||||
|
@ -36,6 +39,7 @@
|
|||
(int ;; we're interested in localities West of Greenwich.
|
||||
(* longitude 100)))))
|
||||
|
||||
|
||||
(defn neighbouring-localities
|
||||
"Return this locality with the localities immediately
|
||||
north east, north, north west, east, west, south west,
|
||||
|
@ -53,4 +57,4 @@
|
|||
(+ locality 100)
|
||||
(+ locality 101)))
|
||||
|
||||
(neighbouring-localities 5482391)
|
||||
|
||||
|
|
|
@ -109,22 +109,17 @@
|
|||
(defn map-remove-pins
|
||||
"Remove all pins from this map `view`. Side-effecty; liable to be problematic."
|
||||
[view]
|
||||
(if
|
||||
view
|
||||
(let [layers (.eachLayer view (fn [l] l))]
|
||||
(doall
|
||||
(map
|
||||
#(if
|
||||
(instance? js/L.Marker %)
|
||||
(.removeLayer view %))
|
||||
layers))))
|
||||
(.eachLayer view
|
||||
#(if
|
||||
(instance? js/L.Marker %)
|
||||
(.removeLayer view %)))
|
||||
view)
|
||||
|
||||
|
||||
(defn refresh-map-pins
|
||||
"Refresh the map pins on this map. Side-effecty; liable to be problematic."
|
||||
[]
|
||||
(let [view @(subscribe [:view]) ;; (map-remove-pins @(subscribe [:view]))
|
||||
(let [view (map-remove-pins @(subscribe [:view]))
|
||||
addresses @(subscribe [:addresses])]
|
||||
(if
|
||||
view
|
||||
|
|
|
@ -47,8 +47,8 @@
|
|||
(fn
|
||||
[dwelling]
|
||||
(ui/big-link
|
||||
(:sub-address dwelling)
|
||||
(:sub_address dwelling)
|
||||
:target (str "#/dwelling/" (:id dwelling))) )
|
||||
(sort-by
|
||||
:sub-address
|
||||
:sub_address
|
||||
(:dwellings address)))]]]))
|
||||
|
|
Loading…
Reference in a new issue