-
Notifications
You must be signed in to change notification settings - Fork 83
/
index.html
222 lines (217 loc) · 8.38 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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta
name="Keywords"
content="GeoForm, GeoForm Template, Template, Map, Esri"
/>
<meta
name="description"
content="GeoForm is a configurable template for form based data editing of a Feature Service. This application allows users to enter data through a form instead of a map’s pop-up while leveraging the power of the Web Map and editable Feature Services."
/>
<meta name="author" content="esri" />
<!-- Facebook -->
<meta property="og:title" content="GeoForm" />
<meta property="og:image" content="images/item.png" />
<meta property="og:site_name" content="esri" />
<!-- Chrome for Android -->
<link rel="apple-touch-icon" href="images/apple-touch-icon.png" />
<title>GeoForm</title>
<!-- Bootstrap core CSS -->
<!-- Latest compiled and minified CSS -->
<link
rel="stylesheet"
type="text/css"
href="js/vendor/bootstrap/css/bootstrap.min.css"
/>
<link
rel="stylesheet"
type="text/css"
href="js/vendor/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css"
/>
<link
rel="stylesheet"
type="text/css"
href="https://js.arcgis.com/3.35/esri/css/esri.css"
/>
<link
rel="stylesheet"
type="text/css"
href="https://js.arcgis.com/3.35/dijit/themes/claro/claro.css"
/>
<link
rel="stylesheet"
type="text/css"
href="js/vendor/font-awesome/css/font-awesome.min.css"
/>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link id="rtlCSS" rel="stylesheet" />
<link href="js/vendor/select2/select2.min.css" rel="stylesheet" />
<link
href="js/vendor/touch-spinner/jquery.bootstrap-touchspin.min.css"
rel="stylesheet"
type="text/css"
/>
<script src="js/vendor/jquery.min.js"></script>
<script src="js/vendor/moment-with-langs.min.js"></script>
<!--
HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries
-->
<!--[if lt IE 9]>
<script src="js/vendor/html5shiv.min.js"></script>
<script src="js/vendor/respond.min.js"></script>
<![endif]-->
</head>
<body id="geoform" class="claro app-loading">
<a id="top"> <!-- Top of page --> </a>
<div class="loading-indicator">
<div class="icon-loading"></div>
<div class="loading-error">
<div class="alert alert-danger">
<span class="icon-frown"></span> <span id="loading_message"></span>
</div>
</div>
</div>
<div id="fullscreen_container" class="fullscreen-container"></div>
<div id="geoform-ie-message" class="container hidden">
<div class="row">
<div class="col-md-12 col-lg-10 col-lg-offset-1" style="margin-top: 20px;">
<div class="alert alert-warning alert-dismissible" role="alert">
<button id="geoform-ie-message-close" type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span></button>
<div id="geoform-ie-message-text"></div>
</div>
</div>
</div>
</div>
<div id="parentContainter" class="app-content"></div>
<script type="text/javascript">
var webgl = location.search.match(/webgl=([\w-]+)/)
? RegExp.$1.toLowerCase() === "false"
? 0
: 1
: 1;
var package_path = window.location.pathname.substring(
0,
window.location.pathname.lastIndexOf("/")
);
var dojoConfig = {
async: true,
has: {
"esri-featurelayer-webgl": webgl,
},
// The locationPath logic below may look confusing but all its doing is
// enabling us to load the api from a CDN and load local modules from the correct location.
packages: [
{
name: "application",
location: package_path + "/js",
},
{
name: "config",
location: package_path + "/config",
},
{
name: "arcgis_templates",
location: package_path + "/..",
},
{
name: "vendor",
location: package_path + "/js/vendor",
},
{
name: "Sanitizer",
location: package_path + "/js/vendor/sanitizer",
main: "arcgis-html-sanitizer.min"
},
{
name: "views",
location: package_path + "/views",
},
],
};
// Have to handle a locale parameter before dojo is loaded
if (location.search.match(/locale=([\w-]+)/)) {
dojoConfig.locale = RegExp.$1;
}
</script>
<script type="text/javascript" src="https://js.arcgis.com/3.35"></script>
<script
type="text/javascript"
src="js/vendor/offline/offline.min.js"
></script>
<script
type="text/javascript"
src="js/vendor/IndexedDBShim.min.js"
></script>
<script type="text/javascript">
require([
"config/templateConfig",
"application/template",
"application/main",
], function (templateOptions, Template, Main) {
// start template
var myTemplate = new Template(templateOptions);
// create my main application. Start placing your logic in the main.js file.
var myApp = new Main();
// create my main application. Start placing your logic in the main.js file.
myTemplate.startup().then(
function (config) {
if (config && config.isIE) {
var containerId = "geoform-ie-message";
var closeId = containerId + "-close";
var textId = containerId + "-text";
var hide = localStorage.getItem(containerId) || false;
if (!hide) {
var englishMsg = "You are using a browser that is deprecated. Some parts of this application may not work optimally or at all in this browser. Support for this browser will be discontinued in the future. Please use the latest versions of Google Chrome, Mozilla Firefox, Apple Safari, or Microsoft Edge. For more information on browser support, see our documentation. Provide your feedback through";
var notificationMessage = englishMsg + "<a href='https://community.esri.com/community/gis/web-gis/arcgisonline'> GeoNet, the Esri Community </a>";
var messageNode = document.getElementById(containerId);
var closeNode = document.getElementById(closeId);
var textNode = document.getElementById(textId);
closeNode.setAttribute("aria-label", config.i18n.user.close);
messageNode.classList.remove("hidden");
textNode.innerHTML = notificationMessage;
closeNode.addEventListener("click", function () {
messageNode.classList.add("hidden");
localStorage.setItem(containerId, true);
});
}
}
//The config object contains the following properties: helper services, (optionally)
//i18n, appid, webmap and any custom values defined by the application.
//In this example we have one called theme.
var appResponse = config.appResponse;
if (config.appResponse) {
delete config.appResponse;
}
if (config.edit && config.appid) {
// get the app builder code
require(["application/builder/builder"], function (builderMode) {
// create configuration app builder
var builder = new builderMode(config, appResponse);
// start it
builder.startup().otherwise(function (error) {
// something went wrong. Let's report it.
myApp.reportError(error);
});
});
} else {
// lets go!
myApp.startup(config, appResponse);
}
},
function (error) {
// something went wrong. Let's report it.
if (error && error.error && error.error === "application:origin-other") {
//display short org error
document.location.href = "../shared/origin/index.html?appUrl=" + error.appUrl;
} else {
myApp.reportError(error);
}
}
);
});
</script>
</body>
</html>