source: other-projects/nz-flag-design/trunk/similarity-2d/display-flags.jsp@ 29906

Last change on this file since 29906 was 29906, checked in by davidb, 9 years ago

Changes resulting from writing the TPDL submission

File size: 2.7 KB
Line 
1<%@ page contentType="text/html; charset=UTF-8" %>
2<!DOCTYPE html>
3<html>
4 <head>
5 <meta charset="utf-8"/>
6
7 <link rel="stylesheet" href="../js/jquery-ui-1.11.2.smoothness/jquery-ui.min.css" />
8 <link rel="stylesheet" href="style.css" />
9
10 <script src="../js/jquery-1.11.1.min.js"></script>
11 <script src="../js/jquery-ui-1.11.2.smoothness/jquery-ui.js"></script>
12
13 <script src="js-lib/Colour.js"></script>
14 <script src="flag-processing.js"></script>
15
16 <script>
17 $(function() {
18 $( "#progressBar" ).progressbar({
19 value: progressVal
20 });
21
22 if (!is_jsp_active) {
23 var mess = "<div>Web server is not JSP active. Unable to run flag comparison</div>";
24 $('#flagArea').append(mess);
25 }
26
27 displayFlags(img_list,$('#flagArea'),$('#progressArea'),$('#progressBar'));
28
29 });
30 </script>
31
32
33 <title>Display Flags</title>
34
35 </head>
36
37 <body>
38
39 <div style="display: none;">
40
41 <!--
42 Set up a fallback position in case this page is accessed outside
43 of a JSP context (i.e., the JSP blocks aren't executed)
44 -->
45 <script>
46 var is_jsp_active = false;
47 var img_list = [ "import/nz.gif" ];
48 </script>
49
50 <%@include file="flag-functions.jsp" %>
51
52 <!-- If JSP active, sets 'is_jsp_active' to true -->
53 <%@include file="list-flags.jsp" %>
54
55 </div>
56
57 <div id="progressArea" style="display: none;">
58 <span id="loadingLabel">Loading: </span>
59 <div id="progressBar"></div>
60 </div>
61
62 <div id="flagArea"></div>
63
64 <div id="go-to-dl" style="display: none;">
65 Visit the digital library collection of all the world's flags: <a href="/greenstone3/library/collection/world-flags/browse/CL1" target="dl">more ...</a>
66 </div>
67
68 <div id="go-to-nz-dl" style="display: none;">
69 Visit the digital library collection of alternative New Zealand flag deisgns: <a href="http://localhost:8383/greenstone3/library/collection/aotearoa/browse/CL1" target="dl">more ...</a>
70 </div>
71
72
73 <script>
74function getParameterByName(name) {
75 name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
76 var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
77 results = regex.exec(location.search);
78 return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
79}
80
81 //var mode = $.urlParam('mode');
82 var mode = getParameterByName('mode');
83
84 console.log("*** mode = " + mode);
85 if (mode && mode == "nz") {
86 document.getElementById('go-to-nz-dl').style.display="block";
87 //$('#go-to-nz-dl').show();
88 }
89 else {
90 document.getElementById('go-to-dl').style.display="block";
91 //$('#go-to-dl').show();
92 }
93
94 </script>
95
96 </body>
97
98</html>
Note: See TracBrowser for help on using the repository browser.