diff --git a/dummies/mapview.png b/dummies/mapview.png
deleted file mode 100644
index 1fe15e1..0000000
Binary files a/dummies/mapview.png and /dev/null differ
diff --git a/dummies/mapview.svg b/dummies/mapview.svg
deleted file mode 100644
index c909b17..0000000
--- a/dummies/mapview.svg
+++ /dev/null
@@ -1,4874 +0,0 @@
-
-
-
-
diff --git a/dummies/mapview.xcf b/dummies/mapview.xcf
deleted file mode 100644
index cf643e1..0000000
Binary files a/dummies/mapview.xcf and /dev/null differ
diff --git a/dummies/mapview_800.png b/dummies/mapview_800.png
deleted file mode 100644
index 5173125..0000000
Binary files a/dummies/mapview_800.png and /dev/null differ
diff --git a/dummies/mapview_800.xcf b/dummies/mapview_800.xcf
deleted file mode 100644
index 47d5ccf..0000000
Binary files a/dummies/mapview_800.xcf and /dev/null differ
diff --git a/dummies/occupants.png b/dummies/occupants.png
deleted file mode 100644
index e1a29ca..0000000
Binary files a/dummies/occupants.png and /dev/null differ
diff --git a/dummies/occupants.svg b/dummies/occupants.svg
deleted file mode 100644
index ed4486c..0000000
--- a/dummies/occupants.svg
+++ /dev/null
@@ -1,454 +0,0 @@
-
-
-
-
diff --git a/dummies/occupants.xcf b/dummies/occupants.xcf
deleted file mode 100644
index c584d9a..0000000
Binary files a/dummies/occupants.xcf and /dev/null differ
diff --git a/dummies/occupants_800.png b/dummies/occupants_800.png
deleted file mode 100644
index 70b0d9f..0000000
Binary files a/dummies/occupants_800.png and /dev/null differ
diff --git a/dummies/occupants_800.xcf b/dummies/occupants_800.xcf
deleted file mode 100644
index eb7c497..0000000
Binary files a/dummies/occupants_800.xcf and /dev/null differ
diff --git a/dummies/ujack.png b/dummies/ujack.png
deleted file mode 100644
index d542490..0000000
Binary files a/dummies/ujack.png and /dev/null differ
diff --git a/dummies/ujack.xcf b/dummies/ujack.xcf
deleted file mode 100644
index a02e5df..0000000
Binary files a/dummies/ujack.xcf and /dev/null differ
diff --git a/dummies/unknown.png b/dummies/unknown.png
deleted file mode 100644
index da3ac5b..0000000
Binary files a/dummies/unknown.png and /dev/null differ
diff --git a/dummies/unknown.xcf b/dummies/unknown.xcf
deleted file mode 100644
index b1806e5..0000000
Binary files a/dummies/unknown.xcf and /dev/null differ
diff --git a/followup.cljs b/followup.cljs
deleted file mode 100644
index 836d622..0000000
--- a/followup.cljs
+++ /dev/null
@@ -1,72 +0,0 @@
-(ns youyesyet.views.followup
- (:require [reagent.core :as r]
- [re-frame.core :refer [reg-sub subscribe]]
-;; [re-frame-forms.core :as form]
-;; [re-frame-forms.input :as input]
-;; [re-com.core :refer [h-box v-box box gap single-dropdown input-text checkbox label title hyperlink-href p]]
-;; [re-com.dropdown :refer [filter-choices-by-keyword single-dropdown-args-desc]]
- [youyesyet.ui-utils :as ui]
-))
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;;
-;;;; youyesyet.views.followup: followup-request view for youyesyet.
-;;;;
-;;;; This program is free software; you can redistribute it and/or
-;;;; modify it under the terms of the GNU General Public License
-;;;; as published by the Free Software Foundation; either version 2
-;;;; of the License, or (at your option) any later version.
-;;;;
-;;;; This program is distributed in the hope that it will be useful,
-;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;;; GNU General Public License for more details.
-;;;;
-;;;; You should have received a copy of the GNU General Public License
-;;;; along with this program; if not, write to the Free Software
-;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-;;;; USA.
-;;;;
-;;;; Copyright (C) 2016 Simon Brooke for Radical Independence Campaign
-;;;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-
-;;; The pattern from the re-com demo (https://github.com/Day8/re-com) is to have
-;;; one source file/namespace per view. Each namespace contains a function 'panel'
-;;; whose output is an enlive-style specification of the view to be redered.
-;;; I propose to follow this pattern. This file will (eventually) provide the followup-request view.
-
-;;; See https://github.com/simon-brooke/youyesyet/blob/master/doc/specification/userspec.md#followup-request-form
-
-(defn panel
- "Generate the followup-request panel."
- []
- (js/console.log (str "Rendering follow-up form"))
-
- (let [issue @(subscribe [:issue])
- issues @(subscribe [:issues])
- elector @(subscribe [:elector])
- address @(subscribe [:address])
- form (form/make-form {:elector (:id elector)
- :issue (:id issue)})]
- [:div
- [:h1 "Followup Request"]
- (let [selected-elector-id (r/atom (:id elector))
- selected-issue (r/atom (:id issue))]
- [:form {}
- [:p.widget
- [:label {:for "elector"} "Elector"]
- [single-dropdown
- :id elector
- :choices (:electors address)
- :model selected-elector-id
- :label-fn #(:name %)]]
- [:p.widget
- [:label {:for "issue"} "Issue"]
- [single-dropdown
- :id issue
- :choices (map #({:id % :label %}) (keys issues))
- :model issue]]
-
- ])]))
diff --git a/src/cljs/youyesyet/canvasser_app/core.cljs b/src/cljs/youyesyet/canvasser_app/core.cljs
index f750122..ee22dc1 100644
--- a/src/cljs/youyesyet/canvasser_app/core.cljs
+++ b/src/cljs/youyesyet/canvasser_app/core.cljs
@@ -125,6 +125,9 @@
(secretary/defroute "/followup" []
(rf/dispatch [:set-active-page :followup]))
+(secretary/defroute "/gdpr" []
+ (rf/despatch [:set-active-page :gdpr]))
+
(secretary/defroute "/issues" []
(rf/dispatch [:set-active-page :issues]))
@@ -159,6 +162,7 @@
(defn init! []
(rf/dispatch-sync [:initialize-db])
+ (get-current-location)
(load-interceptors!)
(hook-browser-navigation!)
(mount-components))
diff --git a/src/cljs/youyesyet/canvasser_app/handlers.cljs b/src/cljs/youyesyet/canvasser_app/handlers.cljs
index 2b7596a..5d70dc0 100644
--- a/src/cljs/youyesyet/canvasser_app/handlers.cljs
+++ b/src/cljs/youyesyet/canvasser_app/handlers.cljs
@@ -233,6 +233,7 @@
(.getCurrentPosition
(.-geolocation js/navigator)
(fn [position]
+ (js/console.log "Current location is: " + position)
(dispatch [:set-latitude (.-latitude (.-coords position))])
(dispatch [:set-longitude (.-longitude (.-coords position))])))
(js/console.log "Geolocation not available"))
diff --git a/src/cljs/youyesyet/canvasser_app/views/gdpr.cljs b/src/cljs/youyesyet/canvasser_app/views/gdpr.cljs
index b28369c..f4e377c 100644
--- a/src/cljs/youyesyet/canvasser_app/views/gdpr.cljs
+++ b/src/cljs/youyesyet/canvasser_app/views/gdpr.cljs
@@ -31,7 +31,7 @@
;; OK, the idea here is a GDPR consent form to be signed by the elector
-(defn gdpr-panel-render
+(defn gdpr-render
[]
(let [elector @(subscribe [:elector])]
[:div
@@ -51,10 +51,19 @@
[:p [:i "If you do not consent, we will store your voting intention
only against your electoral district, and not link it to you"]]]]
[:tr
- [:td {:id "signature-pad"}
- [:canvas]]]]]]
+ [:td
+ [:canvas {:id "signature-pad" :style "width: 100%; min-width 300px; min-height 200px;"}]]]]]]
(ui/big-link "I consent" :target "#elector") ;; TODO: need to save the signature
(ui/big-link "I DO NOT consent" :target "#elector")]))
+(defn gdpr-did-mount
+ []
+ (js/SignaturePad (.getElementById js/document "signature-pad")))
+
+(defn panel
+ "A reagent class for the GDPR consent form"
+ []
+ (reagent/create-class {:reagent-render gdpr-render
+ :component-did-mount gdpr-did-mount}))