+
diff --git a/www/pages/myroute.html b/www/pages/myroute.html
new file mode 100644
index 0000000..0d34af0
--- /dev/null
+++ b/www/pages/myroute.html
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
Notes
+ {{#if notes}}
+
+ {{else}}
+
+
+
Press add to add a note.
+
+ {{/if}}
+
+
+
+
\ No newline at end of file
diff --git a/www/pages/myroute/editnote.html b/www/pages/myroute/editnote.html
new file mode 100644
index 0000000..ede7e89
--- /dev/null
+++ b/www/pages/myroute/editnote.html
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Address
+
+
+
+
+
+
+
+ Options
+ {{#each toggles}}
+
+
+
+ {{name}}
+
+
+
+
+
+
+
+
+
+ {{/each}}
+
+ Notes
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/www/routes.js b/www/routes.js
index 663211b..669bd63 100644
--- a/www/routes.js
+++ b/www/routes.js
@@ -52,7 +52,6 @@ var routes = [
dropdownPlaceholderText: '',
source: function (query, render) {
var streets = searchAutofill(query, $("input[name=number]").val());
-
render(streets);
}
});
@@ -71,7 +70,6 @@ var routes = [
on: {
pageAfterIn: function () {
loadPackageList();
-
searchbar = app.searchbar.create({
el: '.package-list-searchbar',
searchContainer: '#addresslist',
@@ -101,6 +99,65 @@ var routes = [
}
}
},
+ {
+ path: '/myroute',
+ name: 'myroute',
+ async: function (routeTo, routeFrom, resolve, reject) {
+ var notes = false;
+ if (inStorage("notes")) {
+ notes = JSON.parse(getStorage("notes"));
+ if (notes.length == 0) {
+ notes = false;
+ }
+ }
+ resolve({
+ templateUrl: './pages/myroute.html'
+ }, {
+ context: {
+ notes: notes
+ }
+ });
+ },
+ on: {
+ pageAfterIn: function () {
+ // TODO: searchbar
+ }
+ },
+ routes: [
+ {
+ path: '/addnote',
+ async: function (routeTo, routeFrom, resolve, reject) {
+ var uuid = uuidv4();
+ resolve({
+ templateUrl: './pages/myroute/editnote.html'
+ }, {
+ context: {
+ noteid: uuid,
+ title: "Add Note",
+ toggles: SETTINGS.routenotetoggles,
+ note: {
+ id: uuid,
+ number: "",
+ street: "",
+ notes: "",
+ toggles: {}
+ }
+ }
+ });
+ },
+ },
+ {
+ path: '/editnote',
+ templateUrl: './pages/myroute/editnote.html',
+ options: {
+ context: {
+ title: "Edit Note",
+ toggles: SETTINGS.routenotetoggles
+ }
+ }
+ }
+ ]
+ },
{
path: '/login',
templateUrl: './pages/login.html',
@@ -131,7 +188,6 @@ var routes = [
async: function (routeTo, routeFrom, resolve, reject) {
if (localStorage.getItem("scanevents") != null && localStorage.getItem("scanevents") != "[]") {
var entries = JSON.parse(localStorage.getItem("scanevents"));
-
for (i in entries) {
entries[i].event = entries[i].event.join('
');
}
@@ -260,7 +316,7 @@ var routes = [
link: true,
onclick: "logout()"
},
- );
+ );
} else {
settings.push(
{
@@ -288,7 +344,6 @@ var routes = [
link: true
}
);
-
if (platform_type == "cordova" && cordova.platformId != "browser") {
settings.push({
setting: "wakelock",
@@ -337,7 +392,6 @@ var routes = [
onclick: "openBrowser('https://netsyms.com/legal?pk_campaign=PackageHelperApp')",
link: true
});
-
resolve({
templateUrl: './pages/settings.html'
}, {
@@ -399,7 +453,6 @@ var routes = [
slider: true
}
];
-
resolve({
templateUrl: './pages/settings.html'
}, {
@@ -481,7 +534,6 @@ var routes = [
onclick: ""
}
];
-
resolve({
templateUrl: './pages/settings.html'
}, {
diff --git a/www/settings.js b/www/settings.js
index a3f91b2..8285cc4 100644
--- a/www/settings.js
+++ b/www/settings.js
@@ -301,6 +301,20 @@ var SETTINGS = {
]
}
],
+ routenotetoggles: [
+ {
+ name: "Vacant",
+ id: "vacant"
+ },
+ {
+ name: "Outside delivery radius",
+ id: "undeliverable"
+ },
+ {
+ name: "On hold",
+ id: "hold"
+ }
+ ],
synckeyblacklist: [
"username", "password", "trackingcodehistory", "packages",
"user_latitude", "user_longitude", "geocode_cache", "scanevents",