-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
186 lines (155 loc) · 6.63 KB
/
index.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
179
180
181
182
183
184
185
186
<!DOCTYPE html>
<html lang="en">
<!--
Copyright 2022 STACK360 LLC
All rights reserved.
See stack360.io
System built utilizing the Kiss Web Development Framework (kissweb.org)
-->
<head>
<title>Stack360</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel='shortcut icon' href='Stack360_tab-icon-13.png?nocache=20230811' type='image/x-icon'/>
<link rel="stylesheet" href="vendor/css/normalize.css?nocache=20230811" type="text/css"/>
<link rel="stylesheet" href="styles/common.css?nocache=20230811" type="text/css"/>
<link rel="stylesheet" href="styles/global.css?nocache=20230811" type="text/css"/>
<script src="vendor/js/ckeditor.js?nocache=20230811"></script>
<!-- ng-Grid dependencies -->
<script src="vendor/js/ag-grid-community.min.noStyle.js?nocache=20230811"></script>
<link rel="stylesheet" href="vendor/css/ag-grid.css?nocache=20230811">
<link rel="stylesheet" href="vendor/css/ag-theme-balham.css?nocache=20230811">
<link rel="stylesheet" href="kiss/theme/default-theme.css?nocache=20230811"/>
<!-- <script src="vendor/tinymce/tinymce.min.js" referrerpolicy="origin"></script> -->
<style>
html, body {
height: 100%;
background-repeat: no-repeat;
font-weight: normal;
}
.ck-powered-by {
display: none;
}
</style>
<!-- Load the necessary scripts -->
<script>
// cache control
const softwareVersion = "XXXXXXXXX"; // version of the entire system
const releaseDate = "";
const controlCache = false; // normally true but use false during debugging
/**
* Load a JavaScript file
*/
function getScript(url) {
return new Promise(function (resolve, reject) {
const head = document.getElementsByTagName("head")[0];
const script = document.createElement("script");
script.type = "text/javascript";
script.src = url + (controlCache ? '?ver=' + softwareVersion : '');
// Handle Script loading
{
let done = false;
// Attach handlers for all browsers
script.onload = script.onreadystatechange = function () {
if (!done && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) {
done = true;
// Handle memory leak in IE
script.onload = script.onreadystatechange = null;
resolve();
} else {
console.log("getScript: error loading " + url);
reject();
}
};
script.onerror = function () {
console.log("getScript: error loading " + url);
reject();
};
}
head.appendChild(script);
});
}
/**
* Load the login UI.
*/
function startup() {
const afterLoad = function () {
Utils.softwareVersion = softwareVersion;
Utils.controlCache = controlCache;
loadScript("framework.js", function () {
loadScript("index.js", () => {
//console.log("`index.js` loaded...")
});
});
};
let numLoaded = 0;
const loadScript = function (script, fun) {
if (fun)
getScript(script).then(fun);
else {
numLoaded++;
//console.log('numLoaded++');
getScript(script).then(function () {
//console.log('numLoaded--');
if (!--numLoaded) {
//console.log("running afterLoad");
afterLoad();
}
});
}
};
const loadUtils = function () {
loadScript("scripts/Utils.js");
loadScript("kiss/DateUtils.js");
loadScript("kiss/DateTimeUtils.js");
loadScript("kiss/TimeUtils.js");
loadScript("kiss/NumberUtils.js");
loadScript("kiss/AGGrid.js");
loadScript("kiss/Editor.js");
loadScript("scripts/Server.js");
loadScript("vendor/js/xml2js.min.js");
loadScript("scripts/AWS.js");
loadScript("scripts/ADWS.js");
loadScript("scripts/Grid.js");
loadScript("scripts/TabContainer.js");
loadScript("scripts/TreeView.js");
loadScript("scripts/app.js");
};
// Utilize browser cache to the fullest when version hasn't changed.
$.ajaxSetup({cache: controlCache});
const getURLParameter = function (sParam) {
const sPageURL = window.location.search.substring(1);
const sURLVariables = sPageURL.split('&');
for (let i = 0; i < sURLVariables.length; i++) {
let sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] === sParam)
return sParameterName[1];
}
};
if (controlCache) {
const now = getURLParameter("now");
let urlArgs = window.location.search.substring(1);
if (now) {
const diff = Math.abs(((new Date()).getTime() - Number(now)) / 1000);
if (diff > 30) {
window.onbeforeunload = null;
urlArgs = urlArgs.replaceAll(/now=[^&]*&*/g, '');
window.location.href = 'index.html?now=' + (new Date()).getTime() + (urlArgs ? '&' + urlArgs : '');
} else {
loadUtils();
}
} else {
window.onbeforeunload = null;
window.location.href = 'index.html?now=' + (new Date()).getTime() + (urlArgs ? '&' + urlArgs : '');
}
} else
loadUtils();
}
</script>
</head>
<body onload="startup()">
<!--scripts-->
<script src="vendor/js/jquery-3.4.1.min.js"></script>
</body>
</html>