aboutsummaryrefslogtreecommitdiff
path: root/mavigator-server/src/main/twirl/mavigator/views/app.scala.html
blob: 00459a951bb0b394915b49d84619ea0f0b94cc15 (plain) (blame)
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
@(appId: String)(args: (String, String)*)

<div id="scalajs-error" class="alert alert-danger" style="display: none;">
    <p><strong><i class="fa fa-bug"></i> Error! </strong> An uncaught exception occurred in the browser application,
	any information displayed on this website may be corrupt. This is NOT an error that should occur under normal
	operation, it is an indication of a bug in the software.</p>
    <p>The error was: "<span id="scalajs-error-message"></span>"
    </p>
</div>

<div id="@appId">
    <div class="loader">
	<i class="fa fa-spinner fa-spin"></i>
    </div>
</div>

<script type="text/javascript">
 document.addEventListener("DOMContentLoaded", function(event) {
     try {
	 var root0 = document.getElementById("@appId");

	 while (root0.firstChild) {
    	     root0.removeChild(root0.firstChild);
	 }

	 @{appId}().start({
	     root: root0,
	     assetsBase: "/assets",
	     args: @args.map{ case (key, value) =>
		 @key: "@value",
	     }
	 });

     } catch(err) {
	 document.getElementById("scalajs-error").style.display = "block";
	 document.getElementById("scalajs-error-message").innerHTML = err;
	 console.error(err);
	 throw err;
     }
 });
</script>

<script type="text/javascript" src="/assets/js/mavigator-dashboard-opt.js"></script>