Fix map.js to use markDelivered() (#13)
This commit is contained in:
parent
a571769ca4
commit
cf7d8a10e0
@ -38,27 +38,9 @@ function reloadMap() {
|
|||||||
*/
|
*/
|
||||||
$("#app").on("click", "#package-info-sheet #package-info-toggle-status", function () {
|
$("#app").on("click", "#package-info-sheet #package-info-toggle-status", function () {
|
||||||
var pid = $(this).data("packageid");
|
var pid = $(this).data("packageid");
|
||||||
if (typeof packages[pid].delivered == "undefined" || packages[pid].delivered == false) {
|
markDelivered(pid);
|
||||||
packages[pid].delivered = true;
|
map.updatePackageLayer(packages);
|
||||||
localStorage.setItem("packages", JSON.stringify(packages));
|
openPackageInfoSheet(packages[pid], true);
|
||||||
map.updatePackageLayer(packages);
|
|
||||||
openPackageInfoSheet(packages[pid], true);
|
|
||||||
} else {
|
|
||||||
app.dialog.confirm(
|
|
||||||
packages[pid].address,
|
|
||||||
"Mark Undelivered",
|
|
||||||
function () {
|
|
||||||
// undeliver
|
|
||||||
packages[pid].delivered = false;
|
|
||||||
localStorage.setItem("packages", JSON.stringify(packages));
|
|
||||||
map.updatePackageLayer(packages);
|
|
||||||
openPackageInfoSheet(packages[pid], true);
|
|
||||||
},
|
|
||||||
function () {
|
|
||||||
// cancel
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#app").on("click", "#package-info-sheet #package-info-get-directions", function () {
|
$("#app").on("click", "#package-info-sheet #package-info-get-directions", function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user