Skip to content

Commit 869a945

Browse files
cache error on init plot; clear appcache timeout properly
1 parent a069815 commit 869a945

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

cache.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# version 60
2+
# version 63
33

44
# gogole maps files
55
http://maps.google.com/maps/api/js?v=3.10&sensor=false&key=AIzaSyCOqkcNey4CCyG4X0X5qxHAhCgD8g5DwXg

js/app.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@ if(
1111
|| navigator.userAgent.match(/BlackBerry/i)
1212
) is_mobile = true;
1313

14+
$.ajaxSetup({ cache: true });
15+
1416
// handle cachin events and display a loading bar
1517
var loadReload = false;
1618
var loadComplete = function(e) {
19+
clearTimeout(initTimer);
20+
1721
if(loadReload && e.type == 'updateready') {
1822
if(confirm("Reload app?")) {
1923
window.location.href = window.location.href;
@@ -32,12 +36,11 @@ function trackerInit() {
3236
$('header,#main,#map').show(); // interface elements
3337

3438
if(!is_mobile) {
35-
$('<script type="text/javascript" language="javascript" src="js/init_plot.js"></script>').appendTo('body');
39+
$.getScript("js/init_plot.js", function() { checkSize(); if(!map) load(); });
3640
$('#telemetry_graph').addClass("main_screen").attr('style','');
41+
return;
3742
}
3843
checkSize();
39-
40-
4144
if(!map) load();
4245
}
4346

js/tracker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ function addPosition(position) {
718718
};
719719

720720
// deep copy yaxes config for graph
721-
$.each($.extend(false, plot_options.yaxes, {}), function(k,v) { vehicle_info.graph_yaxes.push(v) });
721+
if(plot) $.each($.extend(false, plot_options.yaxes, {}), function(k,v) { vehicle_info.graph_yaxes.push(v) });
722722

723723
vehicles.push(vehicle_info);
724724
}

0 commit comments

Comments
 (0)