|
|
@ -63,7 +63,8 @@ function openTrackingHistory(code) {
|
|
|
|
url: SETTINGS.trackingapi,
|
|
|
|
url: SETTINGS.trackingapi,
|
|
|
|
dataType: 'json',
|
|
|
|
dataType: 'json',
|
|
|
|
data: {
|
|
|
|
data: {
|
|
|
|
code: trackingcode
|
|
|
|
code: trackingcode,
|
|
|
|
|
|
|
|
nocache: (refresh ? "1" : "")
|
|
|
|
},
|
|
|
|
},
|
|
|
|
timeout: 15 * 1000,
|
|
|
|
timeout: 15 * 1000,
|
|
|
|
success: function (resp) {
|
|
|
|
success: function (resp) {
|
|
|
@ -76,14 +77,14 @@ function openTrackingHistory(code) {
|
|
|
|
var infocontext = resp;
|
|
|
|
var infocontext = resp;
|
|
|
|
|
|
|
|
|
|
|
|
infocontext.current.location.display = locationArrayToString(infocontext.current.location);
|
|
|
|
infocontext.current.location.display = locationArrayToString(infocontext.current.location);
|
|
|
|
infocontext.current.date = timestampToDateTimeString(infocontext.current.date);
|
|
|
|
infocontext.current.date = infocontext.current.nicetime;
|
|
|
|
infocontext.current.status = trackingStatusToNiceString(infocontext.current.status, true);
|
|
|
|
infocontext.current.status = trackingStatusToNiceString(infocontext.current.status, true);
|
|
|
|
infocontext.addresses.from = locationArrayToString(infocontext.addresses.from);
|
|
|
|
infocontext.addresses.from = locationArrayToString(infocontext.addresses.from);
|
|
|
|
infocontext.addresses.to = locationArrayToString(infocontext.addresses.to);
|
|
|
|
infocontext.addresses.to = locationArrayToString(infocontext.addresses.to);
|
|
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < infocontext.history.length; i++) {
|
|
|
|
for (var i = 0; i < infocontext.history.length; i++) {
|
|
|
|
infocontext.history[i].location.display = locationArrayToString(infocontext.history[i].location);
|
|
|
|
infocontext.history[i].location.display = locationArrayToString(infocontext.history[i].location);
|
|
|
|
infocontext.history[i].date = timestampToDateTimeString(infocontext.history[i].date);
|
|
|
|
infocontext.history[i].date = infocontext.history[i].nicetime;
|
|
|
|
infocontext.history[i].status = trackingStatusToNiceString(infocontext.history[i].status, true);
|
|
|
|
infocontext.history[i].status = trackingStatusToNiceString(infocontext.history[i].status, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -120,7 +121,7 @@ function openTrackingHistory(code) {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
app.dialog.alert(resp.message, "Error");
|
|
|
|
app.dialog.alert(resp.msg, "Error");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
error: function (jqXHR, status, errorThrown) {
|
|
|
|
error: function (jqXHR, status, errorThrown) {
|
|
|
|