root/other-projects/nz-flag-design/trunk/main-form/kiwiana/index.jsp @ 29964

Revision 29964, 2.7 KB (checked in by davidb, 5 years ago)

Generates dynamic list of kiwiana images to use

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<!--
14    <script src="../../similarity-2d/js-lib/Colour.js"></script>
15-->
16
17    <script src="display-svg.js"></script>
18
19    <script>
20      $(function() {
21
22        if (!is_jsp_active) {
23          var mess = "<div>Web server is not JSP active.  Unable to display dynamic list of Kiwiana images</div>";
24          $('#kiwianaArea').append(mess);
25        }
26     
27        displayFlags(img_list,$('#kiwianaArea'));
28
29      });
30    </script>
31
32
33    <title>Kiwiana Shape Library</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="../../similarity-2d/flag-functions.jsp" %>
51
52      <!-- If JSP active, sets 'is_jsp_active' to true -->
53      <%@include file="list-kiwiana.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="kiwianaArea"></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>
74      function 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/*
85      console.log("*** mode = " + mode);
86      if (mode && mode == "nz") {
87        document.getElementById('go-to-nz-dl').style.display="block";
88        //$('#go-to-nz-dl').show();
89      }
90      else {
91        document.getElementById('go-to-dl').style.display="block";
92        //$('#go-to-dl').show();
93      }     
94*/
95
96    </script>
97
98  </body>
99
100</html>
Note: See TracBrowser for help on using the browser.