/
StatPlanet_Cloud.html
178 lines (160 loc) · 7.61 KB
/
StatPlanet_Cloud.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>StatPlanet</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="js/custom-bootstrap.css">
<link href="js/gridstack.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="js/main.css">
<link rel="stylesheet" href="js/splashscreen.css">
</head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="container">
<!-- Example row of columns -->
<div class="row">
<div class="col-md-15" id="statsilk-container"></div>
</div>
<div class="splash-container"></div>
</div> <!-- /container -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
// **** CONFIGURATION *************************************************
var data_file = "data/data.txt";
var settings_file = "data/settings.txt";
var map_file = "map/map.txt";
//document.write("<div class='logo'><img src='js/logo.png' align='top'></div>");
// ********************************************************************
</script>
<script>
(function ($) {
// Splash Plugin.
$.fn.splash = function (options) {
var defaults = {
startButton: true,
buttonText:"Start",
title: "StatPlanet",
subTitle: "",
description: "",
footer: '',
images: ["js/logo.png"],
template: '<div class="splash-content">\
<div class="splash-title"></div>\
<div class="splash-sub-title"></div>\
<div class="splash-content">\
<div class="splash-progress"></div>\
<div class="splash-description"></div>\
<div class="splash-images"></div>\
<div class="splash-footer"></div>\
</div>\
</div>'
}, root = this;
// Extend our default options with those provided.
var opts = $.extend({}, defaults, options);
root.init = function () {
console.log('init splash');
root.append(opts.template);
root.find('.splash-title').html('<h1>' + opts.title + '</h1>');
root.find('.splash-sub-title').html('<h3>' + opts.subTitle + '</h3>');
root.find('.splash-description').html(opts.description);
root.find('.splash-footer').html(opts.footer);
if (opts.images && opts.images.length) {
for (var i = 0, im = opts.images, len = im.length; i < len; i++) {
$('<img />').attr('src', im[i]).appendTo(root.find('.splash-images'));
}
}
};
root.close = function(){
root.hide();
};
root.init();
return {
startButton: opts.startButton,
buttonText:opts.buttonText,
progressElem:root.find('.splash-progress'),
close:function(){root.close()}
};
};
})(jQuery);
var objSplash = $('.splash-container').splash({startButton: false});
paceOptions = {
ajax: true,
document: true,
target: '.splash-progress',
elements: {
selectors: ['#statsilk-container']
}
};
</script>
<script src="js/modernizr.min.js"></script>
<script src="js/preloadjs.min.js"></script>
<script>
if (navigator.userAgent.indexOf("Firefox") > 0) {
} else {
document.write("<p align='center'>The <a href='https://www.mozilla.org/en-US/firefox/new/'>Firefox browser</a> is required to run StatPlanet Cloud from your desktop. Once published online StatPlanet Cloud will run in any web browser.</p><p align='center'><strong><a href='https://www.mozilla.org/en-US/firefox/new/'>Download Firefox</a></strong>");
}
var preload = new createjs.LoadQueue(true);
preload.on("progress", handleFileProgress);
preload.on("complete", loadComplete);
paceOptions = {
ajax:true,
document: false,
elements: {
selectors: ['#statsilk-container']
}
};
var manifest = [
{src: "js/bootstrap.min.js"},
{src: "js/jquery.smartmenus.js"},
{src: "js/highcharts.js"},
{src: "js/highcharts-more.js"},
{src: "js/highcharts-map.js"},
{src: "js/highcharts-export-clientside.js"},
{src: "js/highcharts-export-clientside2.js"},
{src: "js/highcharts-export-csv.js"},
{src: map_file},
{src: "js/jquery-ui.min.js"},
{src: "js/lodash.min.js"},
{src: "js/gridstack.min.js"},
{src: "js/jquery.blockUI.min.js"},
{src: "js/ion.rangeSlider.min.js"},
{src: "js/list.min.js"},
{src: "js/list.fuzzysearch.min.js"},
{src: "statplanet-cloud.js"}
];
preload.loadManifest(manifest);
function handleFileProgress() {}
function loadComplete() {
$(function () {
Pace.on('hide', function () {
console.log(objSplash.startButton);
if (objSplash.hasOwnProperty('startButton') && objSplash.startButton == true) {
$('<button class="app-start-button">'+objSplash.buttonText+'</button>').appendTo(objSplash.progressElem).on('click', function(){objSplash.close()});
} else {
objSplash.close();
}
});
Pace.track(function () {
$('#statsilk-container').statsilk({
gridstackOptions:{
cellHeight: 10,
verticalMargin: 10,
},
dataFile: data_file,
settingsFile: settings_file,
mapDataFile:map_file,
startupParams:'r=1',
chartColor:'#337ab7',
tempMapData:"Statplanet.maps['custom/map']",
});
});
});
}
</script>
</body>
</html>