Add notary info page and service area map

master
Skylar Ittner 2 years ago
parent 853289dd4b
commit c68aa1eacf

@ -136,7 +136,7 @@ $("body").on("popup:open", "#dasLocationMapPopup", function () {
});
}
} else {
// Fall back to something
showWebGLErrorMessage();
}
trackPageView("/dropandsend/locations_popup", $("#dasLocationMapPopup .navbar .navbar-inner .title").first().text());

@ -26,6 +26,9 @@ var app = new Framework7({
touch: {
tapHold: true
},
statusbar: {
enabled: false
},
init: false,
initOnDeviceReady: false,
routes: routes

@ -5,4 +5,12 @@
*/
var dropboxMap = null;
var dropboxMap = null;
var serviceAreaMap = null;
function showWebGLErrorMessage() {
app.dialog.alert("Well, this is awkward. Your device doesn't support displaying the map. If your \n\
device is less than 5 years old, that's not normal. Some hints for a tech expert: WebGL 3D support \n\
not detected in system embedded browser. Check the system webview is up to date and \n\
working. WebGL is often broken in the official Android Emulator.", "Sorry!");
}

@ -288,7 +288,7 @@ function initCordova() {
evt.preventDefault();
});
$("body").on("click", "a[href^='tel:'],a[href^='sms:']", function (evt) {
$("body").on("click", "a[href^='tel:'],a[href^='sms:'],a[href^='mailto:']", function (evt) {
window.open($(this).attr("href"), "_system");
evt.preventDefault();
});
@ -338,7 +338,7 @@ function initNW() {
evt.preventDefault();
});
$("body").on("click", "a[href^='tel:'],a[href^='sms:']", function (evt) {
$("body").on("click", "a[href^='tel:'],a[href^='sms:'],a[href^='mailto:']", function (evt) {
require('nw.gui').Shell.openExternal($(this).attr("href"));
evt.preventDefault();
});
@ -370,7 +370,7 @@ function initBrowser() {
evt.preventDefault();
});
$("body").on("click", "a[href^='tel:'],a[href^='sms:']", function (evt) {
$("body").on("click", "a[href^='tel:'],a[href^='sms:'],a[href^='mailto:']", function (evt) {
window.open($(this).attr("href"), "_blank");
evt.preventDefault();
});

@ -0,0 +1,185 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
function loadServiceAreaMap() {
if (MapControl.supported()) {
if (serviceAreaMap == null) {
var mapboxel = document.getElementById("mapbox-servicearea");
serviceAreaMap = new MapControl(mapboxel, true);
serviceAreaMap.reloadMap();
serviceAreaMap.mapObj.on('load', function () {
serviceAreaMap.mapObj.jumpTo({center: [-112.005, 46.589], zoom: 9});
serviceAreaMap.mapObj.addSource('servicearea', {
'type': 'geojson',
'data': {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"label": "Notary"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-111.94158554077148,
46.75621029973824
],
[
-112.09058761596678,
46.73880181507399
],
[
-112.11393356323242,
46.594849313729064
],
[
-112.13109970092773,
46.53135096527468
],
[
-112.05350875854492,
46.51410624997797
],
[
-111.92647933959961,
46.50819926727706
],
[
-111.83721542358398,
46.537491596723235
],
[
-111.79738998413086,
46.63800459887636
],
[
-111.86948776245116,
46.738095947110935
],
[
-111.94158554077148,
46.75621029973824
]
]
]
}
},
{
"type": "Feature",
"properties": {
"label": "Courier"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-111.40274047851562,
46.2957133089894
],
[
-111.42059326171874,
46.49082901981415
],
[
-111.62109375,
46.64755071082884
],
[
-111.80923461914062,
46.800999519926314
],
[
-111.92184448242188,
46.991494313050424
],
[
-111.90261840820312,
47.09537035351024
],
[
-112.02346801757812,
47.15236927446393
],
[
-112.24456787109375,
47.09163058564968
],
[
-112.38704681396484,
46.93901161506044
],
[
-112.39013671875,
46.72856582519053
],
[
-112.36953735351562,
46.53052428878426
],
[
-112.16285705566406,
46.430285240839964
],
[
-112.02896118164061,
46.35522171093644
],
[
-111.6815185546875,
46.31089291474789
],
[
-111.47415161132812,
46.29761098988109
],
[
-111.40274047851562,
46.2957133089894
]
]
]
}
}
]
}
});
serviceAreaMap.mapObj.addLayer({
'id': 'courierservicearea',
'type': 'fill',
'source': 'servicearea',
'paint': {
'fill-color': '#005387',
'fill-opacity': 0.4
},
'filter': ['==', 'label', 'Courier']
});
serviceAreaMap.mapObj.addLayer({
'id': 'notaryservicearea',
'type': 'fill',
'source': 'servicearea',
'paint': {
'fill-color': '#008733',
'fill-opacity': 0.4
},
'filter': ['==', 'label', 'Notary']
});
});
}
} else {
showWebGLErrorMessage();
}
}
function openServiceAreaExtraChargeInfo() {
app.dialog.alert("If you need a notary outside the green zone, the travel fee will be calculated \n\
using the current IRS mileage rate. If you need courier service outside the blue zone, we can accomodate \n\
but our delivery window guarantees will not apply.", "Info");
}

@ -67,6 +67,7 @@
<script src="assets/js/shop.js"></script>
<script src="assets/js/home.js"></script>
<script src="assets/js/crypto.js"></script>
<script src="assets/js/serviceareamap.js"></script>
<script src="routes.js"></script>
<script src="assets/js/main.js"></script>

@ -0,0 +1,55 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<div class="page" data-name="notary">
<div class="navbar">
<div class="navbar-bg"></div>
<div class="navbar-inner">
<div class="left">
<a class="link back" href="#">
<i class="icon icon-back"></i>
<span class="if-not-md">Back</span>
</a>
</div>
<div class="title">Notary</div>
</div>
</div>
<div class="page-content noselect">
<div class="row justify-content-center margin-top">
<div class="col-100 medium-90 xlarge-75 margin-horizontal">
<div class="row justify-content-center">
<div class="col-100 small-50 large-33 text-align-center">
<p>Get a notary public anywhere in the Helena area on your schedule.
$10 per document plus a $10 travel fee per trip.
<p>In the same visit we can send your notarized documents via tracked First Class mail,
Certified Mail, our same-day or one-hour express courier services,
or a variety of guaranteed overnight services from USPS, FedEx, and UPS.
<p>Got a PDF to sign? Don't print it out, we can notarize electronically!
Just email it to <a href="mailto:notary@helena.express">notary@helena.express</a>
any time before your appointment.
</div>
<div class="col-100 small-50 large-33 no-margin-vertical">
<div class="card">
<a class="button button-large" href="/appointment/notary"><i class="fad fa-calendar"></i> Book Appointment</a>
</div>
<div class="card">
<a class="button button-large" href="/servicearea"><i class="fad fa-map"></i> Service Area</a>
</div>
</div>
<div class="col-100 small-50 large-33 text-align-center margin-top text-color-gray">
<p>The travel fee is an amount not determined by law. By scheduling an
appointment, you agree to pay the travel fee described. We are not
licensed to practice law. We are not allowed to draft legal
records, give advice on legal matters, including immigration, or charge
a fee for those activities.
</div>
</div>
</div>
</div>
</div>
</div>

@ -0,0 +1,32 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<div class="page" data-name="servicearea">
<div class="navbar">
<div class="navbar-bg"></div>
<div class="navbar-inner">
<div class="left">
<a class="link back" href="#">
<i class="icon icon-back"></i>
<span class="if-not-md">Back</span>
</a>
</div>
<div class="title">Service Area</div>
</div>
</div>
<div class="toolbar toolbar-top">
<div class="toolbar-inner justify-content-start">
<span class="margin-horizontal-half">Legend:</span>
<span class="badge margin-horizontal-half padding-half" style="background-color: rgba(0,135,51,0.7)/*#008733*/;">Notary</span>
<span class="badge margin-horizontal-half padding-half" style="background-color: rgba(0,83,135,0.7)/*#005387*/;">Courier</span>
<a class="margin-horizontal-half link" href="#" onclick="openServiceAreaExtraChargeInfo()">Outside Service Area?</a>
</div>
</div>
<div class="page-content noselect">
<div id="mapbox-servicearea" style="width: 100%; height: calc(100vh - calc(var(--f7-navbar-height) + var(--f7-toolbar-height)));"></div>
</div>
</div>

@ -9,6 +9,8 @@ var pagesToCompile = [
"home",
"send",
"welcome",
"notary",
"servicearea",
"appointment",
"dropandsend",
"pickup",
@ -97,7 +99,7 @@ var routes = [
},
{
title: "Notarize a Document",
href: "/appointment/notary",
href: "/notary",
icon: "fa-duotone fa-file-signature",
text: "Book a mobile notary visit."
},
@ -160,6 +162,29 @@ var routes = [
}, {});
}
},
{
path: '/notary',
content: compiledPages.notary(),
name: 'notary',
on: {
pageAfterIn: function () {
}
}
},
{
path: '/servicearea',
content: compiledPages.servicearea(),
name: 'servicearea',
on: {
pageAfterIn: function () {
loadServiceAreaMap();
},
pageAfterOut: function () {
serviceAreaMap = null;
}
}
},
{
path: '/appointment',
name: 'appointment',

Loading…
Cancel
Save