Mercurial > hg > ismi-richfaces
annotate src/main/webapp/public/publicCodex.jsp @ 215:26138384984c
update more instances of IIIF server URL.
author | casties |
---|---|
date | Sat, 15 Jan 2022 16:09:55 +0100 |
parents | 111fc1d17019 |
children | 93d33f138c9e |
rev | line source |
---|---|
7 | 1 <%@ page contentType="text/html; charset=UTF-8" %> |
2 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
3 <%@page import="org.mpi.openmind.repository.bo.Entity"%> | |
4 <%@page import="de.mpiwg.itgroup.diva.jsp.JSPDigitalization"%> | |
5 | |
6 | |
7 <html> | |
8 <head> | |
9 <title>Codex Details</title> | |
10 | |
11 <link href="../imageServer/resources/css/diva4ismi.css" type="text/css" rel="stylesheet" /> | |
12 <link href="../imageServer/resources/css/bootstrap.css" type="text/css" rel="stylesheet" /> | |
13 <link href="../imageServer/resources/css/bootstrap-responsive.min.css" type="text/css" rel="stylesheet"> | |
14 <link href="../imageServer/resources/css/style.css" type="text/css" rel="stylesheet"> | |
15 <link href="../imageServer/resources/css/diva.min.css" type="text/css" rel="stylesheet" /> | |
16 | |
17 | |
18 <script type="text/javascript" src="../imageServer/resources/js/jquery.min.js"></script> | |
206
111fc1d17019
update publicWitness and publicCodex for new Diva viewer.
casties
parents:
50
diff
changeset
|
19 <script type="text/javascript" src="../imageServer/resources/js/diva.js"></script> |
111fc1d17019
update publicWitness and publicCodex for new Diva viewer.
casties
parents:
50
diff
changeset
|
20 <script type="text/javascript" src="../imageServer/resources/js/plugins/simple-auth.js"></script> |
7 | 21 <script type="text/javascript" src="../imageServer/resources/js/bootstrap.min.js"></script> |
22 <script type="text/javascript" src="../imageServer/resources/js/typeahead.js"></script> | |
23 <script type="text/javascript" src="../imageServer/resources/js/ismiUtils.js"></script> | |
24 <script type="text/javascript" src="../imageServer/resources/js/diva4ismi.js"></script> | |
25 | |
26 <jsp:useBean id="codexPage" class="de.mpiwg.itgroup.ismi.publicView.pages.CodexDynamicPage" scope="session" /> | |
27 <jsp:setProperty name="codexPage" property="request" value="${pageContext.request}" /> | |
28 <jsp:setProperty name="codexPage" property="response" value="${pageContext.response}" /> | |
29 | |
30 <%codexPage.init(); | |
31 if(!codexPage.isErrorLoading()){ | |
32 response.sendRedirect("../public/publicCodices.xhtml"); | |
33 }else{ | |
34 %> | |
35 | |
36 | |
37 <script type="text/javascript"> | |
38 | |
39 $(document).ready(function () { | |
40 | |
41 function getURLParams() | |
42 { | |
43 var urlParams = {}, | |
44 match, | |
45 pl = /\+/g, // Regex for replacing addition symbol with a space | |
46 search = /([^&=]+)=?([^&]*)/g, | |
47 decode = function (s) { return decodeURIComponent(s.replace(pl, " ")); }, | |
48 query = window.location.search.substring(1); | |
49 while (match = search.exec(query)) | |
50 { | |
51 urlParams[decode(match[1])] = decode(match[2]); | |
52 } | |
53 | |
54 return urlParams; | |
55 } | |
56 | |
57 $('#table-titles-in-codex').on('click', '.show-title-details', function(ev){ | |
206
111fc1d17019
update publicWitness and publicCodex for new Diva viewer.
casties
parents:
50
diff
changeset
|
58 var dv = window.divaInstance; |
7 | 59 var start_page = $(this).data('start'); |
60 | |
61 if(start_page){ | |
206
111fc1d17019
update publicWitness and publicCodex for new Diva viewer.
casties
parents:
50
diff
changeset
|
62 dv.gotoPageByIndex(start_page); |
7 | 63 ev.preventDefault(); |
64 }else{ | |
65 alert("No page assigned to this title."); | |
66 } | |
67 var titleId = $(this).data('title-id'); | |
68 showTitleDetailsSmall(titleId); | |
10 | 69 var witnessId = $(this).data('witness-id'); |
70 showWitnessDetailsSmall(witnessId); | |
7 | 71 }); |
72 | |
10 | 73 $('#additional-information').on('click', |
74 '.title-details-show-more', function(ev){ | |
7 | 75 var titleId = $(this).data('title-id'); |
76 showTitleDetailsBig(titleId); | |
77 }); | |
78 | |
79 $('#additional-information').on('click', '.title-details-show-less', function(ev){ | |
80 var titleId = $(this).data('title-id'); | |
81 showTitleDetailsSmall(titleId); | |
82 }); | |
83 | |
10 | 84 $('#additional-information2').on('click', '.witness-details-show-more', function(ev){ |
7 | 85 var witnessId = $(this).data('witness-id'); |
86 showWitnessDetailsBig(witnessId); | |
87 }); | |
88 | |
10 | 89 $('#additional-information2').on('click', '.witness-details-show-less', function(ev){ |
7 | 90 var witnessId = $(this).data('witness-id'); |
91 showWitnessDetailsSmall(witnessId); | |
92 }); | |
93 | |
94 $('.ismi-fullscreen-icon').on('click', function(ev) { | |
95 | |
96 var jaja = $( this ).data('in-fullscreen-mode'); | |
97 var panel = $( "#attributesPanel" ); | |
98 if(jaja == true){ | |
99 //panel.css('backgroundColor','#EE178C'); | |
100 panel.css('left','0'); | |
101 panel.css('max-height','100%'); | |
102 panel.css('max-width','100%'); | |
103 panel.css('position','fixed'); | |
104 panel.css('top','0'); | |
105 panel.css('width','100%'); | |
106 panel.css('z-index','102'); | |
107 panel.css('overflow','scroll'); | |
108 | |
109 //panel.data('in-fullscreen-mode') = !panel.data('in-fullscreen-mode'); | |
110 $( this ).data('in-fullscreen-mode', false); | |
111 //alert("Fue true"); | |
112 } | |
113 if(jaja == false){ | |
114 | |
115 panel.css('left',''); | |
116 panel.css('max-height',''); | |
117 panel.css('max-width',''); | |
118 panel.css('position',''); | |
119 panel.css('top','0'); | |
120 panel.css('width',''); | |
121 panel.css('z-index',''); | |
122 panel.css('overflow',''); | |
123 | |
124 $( this ).data('in-fullscreen-mode', true); | |
125 } | |
126 }); | |
127 | |
128 | |
129 $('#page-jump').on('keypress', function(ev) | |
130 { | |
131 if (ev.which == '13') | |
132 { | |
206
111fc1d17019
update publicWitness and publicCodex for new Diva viewer.
casties
parents:
50
diff
changeset
|
133 var dv = window.divaInstance; |
7 | 134 var value = $(this).val(); |
206
111fc1d17019
update publicWitness and publicCodex for new Diva viewer.
casties
parents:
50
diff
changeset
|
135 var success = dv.gotoPageByIndex(value); |
7 | 136 |
137 if (!success) | |
138 { | |
139 if (!$('#page-jump-group').hasClass('error')) | |
140 { | |
141 $('#page-jump-group').addClass('error'); | |
142 $('#page-jump-controls').append('<span id="jump-error-help" class="help-inline">The page you specified is not valid.</span>'); | |
143 } | |
144 } | |
145 else | |
146 { | |
147 if ($('#page-jump-group').hasClass('error')) | |
148 { | |
149 $('#page-jump-group').removeClass('error'); | |
150 $('#jump-error-help').remove(); | |
151 } | |
152 } | |
153 | |
154 } | |
155 }); | |
156 | |
157 $('.go-to-witness-link').on('click', function(ev) { | |
206
111fc1d17019
update publicWitness and publicCodex for new Diva viewer.
casties
parents:
50
diff
changeset
|
158 var dv = window.divaInstance; |
7 | 159 var start_page = $(this).data('start'); |
160 | |
161 if(start_page){ | |
162 dv.gotoPageByNumber(start_page); | |
163 ev.preventDefault(); | |
164 }else{ | |
165 alert("No page assigned to this witness."); | |
166 } | |
167 | |
168 var witnessId = $(this).data('witness-id'); | |
169 showWitnessDetailsSmall(witnessId); | |
170 | |
171 }); | |
172 | |
173 function handlePageSwitch(idx, fn, divid) | |
174 { | |
175 // page number is what we're after, which is always | |
176 // page index + 1. | |
177 $('#current-page-idx').text(idx + 1); | |
178 $('#current-page-fn').text(fn); | |
179 } | |
180 | |
181 function handleDocumentLoaded(idx, fn) | |
182 { | |
183 var witnesses = {}; | |
184 | |
185 // we could do this with an ajax request, but we have | |
186 // the variables already here, we just need to get them | |
187 // from Django and not JS. | |
188 | |
189 var urlParams = getURLParams(); | |
190 if (urlParams.hasOwnProperty('witness')) | |
191 { | |
192 urlWitness = parseInt(urlParams['witness'], 10); | |
193 | |
194 // this won't be populated if the witness doesn't have a | |
195 // start page set. | |
196 if (witnesses.hasOwnProperty(urlWitness)) | |
197 { | |
198 this.gotoPageByNumber(witnesses[urlWitness]); | |
199 } | |
200 } | |
201 } | |
202 | |
206
111fc1d17019
update publicWitness and publicCodex for new Diva viewer.
casties
parents:
50
diff
changeset
|
203 window.divaInstance = new Diva('diva-wrapper', |
7 | 204 { |
215 | 205 objectData: "https://ismi.medeniyet.edu.tr/iiif/manifests/<%=codexPage.getDigiLabel()%>.json", |
206
111fc1d17019
update publicWitness and publicCodex for new Diva viewer.
casties
parents:
50
diff
changeset
|
206 plugins: [Diva.SimpleAuthPlugin], |
111fc1d17019
update publicWitness and publicCodex for new Diva viewer.
casties
parents:
50
diff
changeset
|
207 simpleAuthTokenUrl: divaGlobal.auth_token_url, |
111fc1d17019
update publicWitness and publicCodex for new Diva viewer.
casties
parents:
50
diff
changeset
|
208 simpleAuthLoginUrl: divaGlobal.auth_login_url, |
111fc1d17019
update publicWitness and publicCodex for new Diva viewer.
casties
parents:
50
diff
changeset
|
209 enableAutoTitle: false, |
111fc1d17019
update publicWitness and publicCodex for new Diva viewer.
casties
parents:
50
diff
changeset
|
210 enableGotoPage: false, |
111fc1d17019
update publicWitness and publicCodex for new Diva viewer.
casties
parents:
50
diff
changeset
|
211 zoomLevel: 1 |
7 | 212 }); |
213 | |
214 }); | |
215 | |
216 | |
217 </script> | |
218 <% } %> | |
219 </head> | |
220 | |
221 <body bgcolor=white> | |
222 | |
223 <% if(codexPage.isErrorLoading()) { %> | |
224 <input type='hidden' name='csrfmiddlewaretoken' value='psDBHsF5a1mttLSKeUgoUUVN3HL6f8Re' /> | |
225 <jsp:include page="header.jsp" /> | |
226 | |
227 <!-- | |
228 <div class="magnifiedAttributePanel"> | |
229 </div> | |
230 --> | |
42 | 231 |
7 | 232 <div class="custom-container"> |
233 | |
37
a3bf915b62fe
Added: PDF Download Button [top right of codex pages]
arussell
parents:
34
diff
changeset
|
234 |
7 | 235 <div class="row-fluid"> |
236 <div id="attributesPanel" class="span4 page" style="min-height: 700px;"> | |
237 | |
238 <a class="ismi-fullscreen-icon" href="#" data-in-fullscreen-mode="true"></a> | |
239 | |
34
9087a4623a08
Temporary Fix: Minor layout issues with info box on left of codex pages.
arussell
parents:
30
diff
changeset
|
240 <div class="attPanel" style="height: 700px; overflow: auto;"> |
9087a4623a08
Temporary Fix: Minor layout issues with info box on left of codex pages.
arussell
parents:
30
diff
changeset
|
241 |
7 | 242 <c:if test="${codexPage.getDigi() != null}"> |
243 | |
244 <input type="hidden" id="digi_id" value="${codexPage.getDigi().getId()}"> | |
34
9087a4623a08
Temporary Fix: Minor layout issues with info box on left of codex pages.
arussell
parents:
30
diff
changeset
|
245 |
9087a4623a08
Temporary Fix: Minor layout issues with info box on left of codex pages.
arussell
parents:
30
diff
changeset
|
246 <div class="divaBackgroud" style="overflow: auto;"> |
9087a4623a08
Temporary Fix: Minor layout issues with info box on left of codex pages.
arussell
parents:
30
diff
changeset
|
247 |
7 | 248 <!-- XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --> |
249 | |
250 <h4><%=codexPage.getDigiLabel()%></h4> | |
251 | |
252 <c:if test="${codexPage.getWitnessList().size() > 0}"> | |
253 <span class="titlePanel">Titles in this Codex</span> | |
254 | |
255 <table id="table-titles-in-codex" class="table table-bordered table-condensed divaPanel"> | |
256 <thead> | |
257 <tr> | |
258 <th class="tableHead">Title</th> | |
259 <th class="tableHead">Folios</th> | |
260 </tr> | |
261 </thead> | |
262 <tbody> | |
263 <c:forEach var="witness" items="${codexPage.getWitnessList()}"> | |
264 <tr> | |
265 <td class="tdTitle"> | |
266 <!-- href="${codexPage.getAppBean().getRoot()}/public/dynamicPage.xhtml?eid=${witness.titleId}" --> | |
267 <a class="show-title-details" | |
268 data-title-id="${witness.titleId}" | |
10 | 269 data-witness-id="${witness.id}" |
7 | 270 data-start="${witness.startPage}"> |
271 <c:out value="${witness.title}"/> | |
272 </a> | |
273 | |
274 </td> | |
275 <td class="columnCentered"> | |
276 <c:if test="${witness.startPage != null}"> | |
277 <a class="witness-new-window" data-witness-id="${witness.id}" data-start="${witness.startPage}" | |
278 href="${codexPage.getAppBean().getRoot()}/public/publicCodex.jsp?eid=${codexPage.getCurrentEntId()}&startPage=${witness.startPage}&imgFullscreen=true" | |
279 target="_blank"> | |
280 <img src="../resources/images/new_window-16.png"> | |
281 </a> | |
282 </c:if> | |
283 <a class="go-to-witness-link" data-witness-id="${witness.id}" data-start="${witness.startPage}" href="#"> | |
284 <c:out value="${witness.folios}"/> | |
285 </a> | |
286 | |
287 </td> | |
288 </tr> | |
289 </c:forEach> | |
290 </tbody> | |
291 </table> | |
292 </c:if> | |
293 | |
34
9087a4623a08
Temporary Fix: Minor layout issues with info box on left of codex pages.
arussell
parents:
30
diff
changeset
|
294 <div id="additional-information" style="overflow-x: auto;"> |
7 | 295 </div> |
296 | |
34
9087a4623a08
Temporary Fix: Minor layout issues with info box on left of codex pages.
arussell
parents:
30
diff
changeset
|
297 <div id="additional-information2" style="overflow-x: auto;"> |
10 | 298 </div> |
7 | 299 |
300 <span class="titlePanel">Codex Information</span> | |
301 <table class="table table-bordered table-condensed divaPanel"> | |
302 <tbody> | |
303 <c:forEach var="attLabel" items="${codexPage.getLabels()}"> | |
304 <tr> | |
305 <td class="tdTitle"> | |
306 <c:out value="${attLabel}"/> | |
307 <td> | |
308 <td > | |
309 <table class="tableContent"> | |
310 <tbody> | |
311 <c:forEach var="attValue" items="${codexPage.getAttMap().get(attLabel)}"> | |
312 <tr> | |
313 <td style="text-align: ${codexPage.getAttMapTextAlign().get(attLabel)};"> | |
314 <c:out value="${attValue}"/> | |
315 </td> | |
316 </tr> | |
317 </c:forEach> | |
318 </tbody> | |
319 </table> | |
320 <td> | |
321 </tr> | |
322 </c:forEach> | |
39 | 323 <c:if test="${codexPage.getReferenceList().size() > 0}"> |
324 <tr> | |
325 <td class="tdTitle">References</td><td></td><td> | |
326 <table class="tableContent"> | |
16
0d0a3b757981
fixes for bibliographic reference display (by dwinter).
casties
parents:
10
diff
changeset
|
327 <tbody> |
21
176a21acd008
fixed merge errors in WitnessTemplate. fixed non-resolved reference in codex info in publicCodex and publicWitness.
casties
parents:
19
diff
changeset
|
328 <c:forEach var="ref" items="${codexPage.getReferenceList().keySet()}" varStatus="loop"> |
16
0d0a3b757981
fixes for bibliographic reference display (by dwinter).
casties
parents:
10
diff
changeset
|
329 <tr> |
21
176a21acd008
fixed merge errors in WitnessTemplate. fixed non-resolved reference in codex info in publicCodex and publicWitness.
casties
parents:
19
diff
changeset
|
330 <td id="bibl-entry-codex-${loop.index}"> |
176a21acd008
fixed merge errors in WitnessTemplate. fixed non-resolved reference in codex info in publicCodex and publicWitness.
casties
parents:
19
diff
changeset
|
331 <c:out value="${ref}"/> |
176a21acd008
fixed merge errors in WitnessTemplate. fixed non-resolved reference in codex info in publicCodex and publicWitness.
casties
parents:
19
diff
changeset
|
332 <script>showBibliographyEntryFormatted("${ref}", null, "#bibl-entry-codex-${loop.index}")</script> |
176a21acd008
fixed merge errors in WitnessTemplate. fixed non-resolved reference in codex info in publicCodex and publicWitness.
casties
parents:
19
diff
changeset
|
333 </td> |
19 | 334 </tr> |
335 <tr> | |
21
176a21acd008
fixed merge errors in WitnessTemplate. fixed non-resolved reference in codex info in publicCodex and publicWitness.
casties
parents:
19
diff
changeset
|
336 <td> |
176a21acd008
fixed merge errors in WitnessTemplate. fixed non-resolved reference in codex info in publicCodex and publicWitness.
casties
parents:
19
diff
changeset
|
337 <c:out value="${codexPage.getReferenceList()[ref]}"/> |
176a21acd008
fixed merge errors in WitnessTemplate. fixed non-resolved reference in codex info in publicCodex and publicWitness.
casties
parents:
19
diff
changeset
|
338 </td> |
16
0d0a3b757981
fixes for bibliographic reference display (by dwinter).
casties
parents:
10
diff
changeset
|
339 </tr> |
0d0a3b757981
fixes for bibliographic reference display (by dwinter).
casties
parents:
10
diff
changeset
|
340 </c:forEach> |
0d0a3b757981
fixes for bibliographic reference display (by dwinter).
casties
parents:
10
diff
changeset
|
341 </tbody> |
0d0a3b757981
fixes for bibliographic reference display (by dwinter).
casties
parents:
10
diff
changeset
|
342 </table> |
39 | 343 </td> |
344 </tr> | |
345 </c:if> | |
7 | 346 </tbody> |
347 </table> | |
348 | |
349 </div> | |
350 </c:if> | |
351 </div> | |
352 </div> | |
353 <div class="span8"> | |
354 <input type='hidden' name='csrfmiddlewaretoken' value='psDBHsF5a1mttLSKeUgoUUVN3HL6f8Re' /> | |
30
672301480990
Fixed: Layout issues and discrepancies on "public codices" + "image server" pages
arussell
parents:
21
diff
changeset
|
355 <div id="diva-wrapper"></div> |
7 | 356 </div> |
357 </div> | |
358 </div> | |
359 | |
360 <% } %> | |
361 </body> | |
362 </html> |