1 | # this file must be UTF-8 encoded
|
---|
2 |
|
---|
3 | package document
|
---|
4 |
|
---|
5 | #######################################################################
|
---|
6 | # macros set from within the server
|
---|
7 | #######################################################################
|
---|
8 |
|
---|
9 | _imagethispage_ {}
|
---|
10 | _httpprevarrow_ {}
|
---|
11 | _httpnextarrow_ {}
|
---|
12 | _pagetitle_ {}
|
---|
13 | _phindclassifier_ {}
|
---|
14 | _collageclassifier_ {}
|
---|
15 |
|
---|
16 | # custom header for individual document
|
---|
17 | _documentheader_ {}
|
---|
18 |
|
---|
19 | #custom css links for individual document
|
---|
20 | _csslink_{
|
---|
21 | <link rel="stylesheet" href="_cssfilelink_" type="text/css"
|
---|
22 | charset="UTF-8" _linktagend_
|
---|
23 | <link rel="alternate stylesheet" href="_httpstyle_/preview-document.css"
|
---|
24 | type="text/css"
|
---|
25 | title="Preview Document" charset="UTF-8" media="screen" _linktagend_
|
---|
26 | <link rel="stylesheet" href="_httpstyle_/print-document.css" type="text/css"
|
---|
27 | charset="UTF-8" media="print" _linktagend_
|
---|
28 | }
|
---|
29 |
|
---|
30 | #######################################################################
|
---|
31 | # page content
|
---|
32 | #######################################################################
|
---|
33 |
|
---|
34 | _tocopen_ {<div class="top" _tocopenextra_>}
|
---|
35 | _tocclose_ {</div>}
|
---|
36 |
|
---|
37 | _nextsearchresult_ {_If_("_cgiargsrn_" ne "0",<li id="nextresult"><a href="_httpquery_&ifl=1&ifln=_cgiargsrn_">_textnextsearchresult_</a></li>)}
|
---|
38 |
|
---|
39 | _prevsearchresult_ {_If_("_cgiargsrp_" ne "0",<li id="prevresult"><a href="_httpquery_&ifl=1&ifln=_cgiargsrp_">_textprevsearchresult_</a></li>)}
|
---|
40 |
|
---|
41 | _content_ {
|
---|
42 | _optnavigationbar_
|
---|
43 |
|
---|
44 | _If_(_phindclassifier__collageclassifier_,
|
---|
45 | <p style="text-align: center;">
|
---|
46 | _phindclassifier_
|
---|
47 | _collageclassifier_
|
---|
48 | </p>
|
---|
49 | )
|
---|
50 |
|
---|
51 | _If_("_cgiargcl_" eq "search",
|
---|
52 | <ul id="searchresults">
|
---|
53 | _prevsearchresult_
|
---|
54 | _nextsearchresult_
|
---|
55 | </ul>)
|
---|
56 |
|
---|
57 | <div class="document">
|
---|
58 |
|
---|
59 |
|
---|
60 | }
|
---|
61 |
|
---|
62 | # Dublin Core Metadata Element Set, Version 1.1
|
---|
63 | _textTitlepage_ {_texticonhtitle_}
|
---|
64 | _textCreatorpage_ {_texticonhcreat_}
|
---|
65 | _textSubjectpage_ {_texticonhsubj_}
|
---|
66 | _textDescriptionpage_ {_texticonhdesc_}
|
---|
67 | _textPublisherpage_ {_texticonhpubl_}
|
---|
68 | _textContributorpage_ {_texticonhcontr_}
|
---|
69 | _textDatepage_ {_texticonhdate_}
|
---|
70 | _textTypepage_ {_texticonhtype_}
|
---|
71 | _textFormatpage_ {_texticonhform_}
|
---|
72 | _textIdentifierpage_ {_texticonhident_}
|
---|
73 | _textSourcepage_ {_texticonhsrc_}
|
---|
74 | _textLanguagepage_ {_texticonhlang_}
|
---|
75 | _textRelationpage_ {_texticonhrel_}
|
---|
76 | _textCoveragepage_ {_texticonhcover_}
|
---|
77 | _textRightspage_ {_texticonhright_}
|
---|
78 |
|
---|
79 | _textTopage_ {_texticonhto_}
|
---|
80 | _textFrompage_ {_texticonhfrom_}
|
---|
81 | _textSeriespage_ {_texticonhser_}
|
---|
82 | _textHowtopage_ {_texticonhhow_}
|
---|
83 | _textOrganizationpage_ {_texticonhorg_}
|
---|
84 | _textBrowsepage_ {_texticonhbrwse_}
|
---|
85 | _textCollagepage_ {_texticonhcoll_}
|
---|
86 | _textPeoplepage_ {_texticonhpeople_}
|
---|
87 | _textAcronympage_ {_texticonhacronym_}
|
---|
88 | _textPhrasepage_ {_texticonhphrases_}
|
---|
89 | _textArtistpage_ {_texticonhartist_}
|
---|
90 | _textKeywordpage_ {_texticonhkw_}
|
---|
91 | _textVolumepage_ {_texticonhvol_}
|
---|
92 | _textCaptionspage_ {_texticonhcapt_}
|
---|
93 | _textCountriespage_ {_texticonhcount_}
|
---|
94 |
|
---|
95 | #######################################################################
|
---|
96 | # navigation arrows
|
---|
97 | #
|
---|
98 | #######################################################################
|
---|
99 |
|
---|
100 | # these two may be reset to "" by the server
|
---|
101 | _navarrowsbottom_ {_navarrows_}
|
---|
102 | _navarrowstop_ {_navarrows_}
|
---|
103 |
|
---|
104 | _navarrows_ {<center>
|
---|
105 | <table width=_pagewidth_ cellpadding=0 cellspacing=0 border=0>
|
---|
106 | <tr><td align=left valign=top>
|
---|
107 | _prevarrow_
|
---|
108 | </td><td align=right valign=top>
|
---|
109 | _nextarrow_
|
---|
110 | </td></tr></table>
|
---|
111 | </center>
|
---|
112 | }
|
---|
113 |
|
---|
114 | _prevarrow_ {_If_(_httpprevarrow_,<a href="_httpprevarrow_">_iconprev_</a>)}
|
---|
115 | _nextarrow_ {_If_(_httpnextarrow_,<a href="_httpnextarrow_">_iconnext_</a>)}
|
---|
116 |
|
---|
117 | _navarrows_ [v=1] {<p>
|
---|
118 | _prevarrow_<br>
|
---|
119 | _nextarrow_
|
---|
120 | }
|
---|
121 |
|
---|
122 | #######################################################################
|
---|
123 | # section for adding user comments: consists of form and its javascript
|
---|
124 | #######################################################################
|
---|
125 |
|
---|
126 | # associated javascript function loadUserComments is in style.dm's _globalscripts_ macro
|
---|
127 | _usercomments_ {
|
---|
128 | _If_(_cgiargd_,
|
---|
129 | <div id="usercomments"></div>
|
---|
130 | )
|
---|
131 | }
|
---|
132 |
|
---|
133 |
|
---|
134 | # Display the add-user-comment form on actual document pages and not when browsing/searching
|
---|
135 | # This means the form should only be displayed on pages where the _cgiargd_ (the docid) is set
|
---|
136 |
|
---|
137 | # For getting the submitbutton to make Ajax calls, see
|
---|
138 | # http://stackoverflow.com/questions/4264091/input-type-submit-instead-of-input-type-button-with-ajax
|
---|
139 | # http://stackoverflow.com/questions/8869341/ajax-form-submit-with-submit-button
|
---|
140 |
|
---|
141 | _addusercomment_ {
|
---|
142 |
|
---|
143 | _If_(_cgiargd_,
|
---|
144 |
|
---|
145 | <form name="AddUserCommentForm">
|
---|
146 | <p>_textcommentusername_ <input type="text" name="username"></p>
|
---|
147 | <p>
|
---|
148 | _textaddusercomment_
|
---|
149 | <textarea name="comment" rows="10" cols="70"></textarea>
|
---|
150 | <input type=hidden name="d" value="_cgiargd_">
|
---|
151 | </p>
|
---|
152 |
|
---|
153 | <input type="submit" value="_textaddcomment_" onclick="addUserComment(document.AddUserCommentForm.username.value, document.AddUserCommentForm.comment.value, document.AddUserCommentForm.d.value, document); return false;">
|
---|
154 | <label id="usercommentfeedback"></label>
|
---|
155 | </form>
|
---|
156 | )
|
---|
157 |
|
---|
158 | <script type="text/javascript">
|
---|
159 |
|
---|
160 | // Unused. Replaced in favour of call to escape() in setMetaArray function that calls urlPostSync
|
---|
161 | // http://stackoverflow.com/questions/6020714/escape-html-using-jquery
|
---|
162 | function safeHTML(str) \{
|
---|
163 | return str.replace("&", "&").replace("<", "<").replace(">", ">").replace('"',""").replace("'","'").replace("/", "/"); //"\\""
|
---|
164 | \}
|
---|
165 |
|
---|
166 |
|
---|
167 | function addUserComment(_username, _comment, _docid, doc) \{
|
---|
168 |
|
---|
169 | // don't add empty strings for name/comment
|
---|
170 |
|
---|
171 | // http://stackoverflow.com/questions/498970/how-do-i-trim-a-string-in-javascript
|
---|
172 | var trimmed_username=_username.replace(/^\s+|\s+$/g, '');
|
---|
173 | var trimmed_comment = _comment.replace(/^\s+|\s+$/g, '');
|
---|
174 |
|
---|
175 | if(!trimmed_username || !trimmed_comment) \{
|
---|
176 | doc.AddUserCommentForm.comment.value = "";
|
---|
177 | doc.AddUserCommentForm.username.value = "";
|
---|
178 | doc.getElementById("usercommentfeedback").innerHTML = "_text-is-empty_";
|
---|
179 | return;
|
---|
180 | \}
|
---|
181 |
|
---|
182 | // Need to the add user comment meta of username, timestamp and comment to the
|
---|
183 | // topmost section of the document. So only get the docId up to any period mark:
|
---|
184 | var period = _docid.indexOf(".");
|
---|
185 | if(period != -1) \{
|
---|
186 | _docid = _docid.substring(0, period);
|
---|
187 | \}
|
---|
188 |
|
---|
189 |
|
---|
190 | // Want to store username, timestamp and comment in import/metadata.xml, archives/doc.xml
|
---|
191 | // and index/col.gdb.
|
---|
192 |
|
---|
193 | // For getting the current time, see
|
---|
194 | // http://stackoverflow.com/questions/3830244/get-current-date-time-in-seconds
|
---|
195 | var _timestamp = new Date().getTime(); // div by 1000 to get seconds. valueOf() may return string
|
---|
196 |
|
---|
197 | //alert("username:" + _username
|
---|
198 | //+ "\\ncomment: " + _comment
|
---|
199 | //+ "\\ncollection: " + collection
|
---|
200 | //+ "\\ndocid: " + _docid
|
---|
201 | //+ "\\ntimestamp: " + _timestamp);
|
---|
202 |
|
---|
203 |
|
---|
204 | // Entity encode the values before storing (at least <, >, /. And single and double quote, ampersand)
|
---|
205 | // http://stackoverflow.com/questions/6020714/escape-html-using-jquery
|
---|
206 | // setMetadataArray escapes the entire JSON, is that better than escaping individually here?
|
---|
207 | //_docid = escape(_docid);
|
---|
208 | //_timestamp = escape(_timestamp);
|
---|
209 | //_username = escape(_username); //safeHTML(_username);
|
---|
210 | //_comment = escape(_comment); //safeHTML(_comment);
|
---|
211 |
|
---|
212 | // Use this if making individual api calls to set username meta, then timestamp then comment meta
|
---|
213 | // GSAPI already knows the collection
|
---|
214 | //gsapi.setMetadata(_docid, "username", null, _username, "accumulate", "import|archives|index");
|
---|
215 | //gsapi.setMetadata(_docid, "usertimestamp", null, _timestamp, "accumulate", "import|archives|index");
|
---|
216 | //gsapi.setMetadata(_docid, "usercomment", null, _comment, "accumulate", "import|archives|index");
|
---|
217 |
|
---|
218 |
|
---|
219 | // Use the new JSON metatable format to set username, timestamp and comment meta for docid in one go
|
---|
220 |
|
---|
221 | // For creating the JSON object that gets turned into a string, see
|
---|
222 | // http://msdn.microsoft.com/en-us/library/ie/cc836459%28v=vs.94%29.aspx
|
---|
223 | // http://jsfiddle.net/qmacro/W54hy/
|
---|
224 |
|
---|
225 | var username_rec = \{
|
---|
226 | metaname: "username",
|
---|
227 | metavals: [_username]
|
---|
228 | \};
|
---|
229 |
|
---|
230 | var timestamp_rec = \{
|
---|
231 | metaname: "usertimestamp",
|
---|
232 | metavals: [_timestamp]
|
---|
233 | \};
|
---|
234 |
|
---|
235 | var comment_rec = \{
|
---|
236 | metaname: "usercomment",
|
---|
237 | metavals: [_comment]
|
---|
238 | \};
|
---|
239 |
|
---|
240 | var doc_rec = \{
|
---|
241 | docid: _docid,
|
---|
242 | metatable: [username_rec, timestamp_rec, comment_rec],
|
---|
243 | metamode: "accumulate"
|
---|
244 | \};
|
---|
245 |
|
---|
246 | var docArray = [doc_rec];
|
---|
247 |
|
---|
248 | //alert(JSON.stringify(docArray));
|
---|
249 |
|
---|
250 | // GSAPI already knows the collection
|
---|
251 | gsapi.setMetadataArray(docArray, "accumulate", "import|archives|index");
|
---|
252 | doc.AddUserCommentForm.comment.value = "";
|
---|
253 | doc.AddUserCommentForm.username.value = "";
|
---|
254 | doc.getElementById("usercommentfeedback").innerHTML = "_textcommentsubmitted_";
|
---|
255 |
|
---|
256 | // update display of existing user comments to show the newly added comment
|
---|
257 | var usercommentdiv = document.getElementById("usercomments");
|
---|
258 | if(usercommentdiv != undefined) \{
|
---|
259 | displayInUserCommentList(usercommentdiv, _username, _timestamp, _comment);
|
---|
260 | \}
|
---|
261 | \}
|
---|
262 | </script>
|
---|
263 | }
|
---|
264 |
|
---|
265 |
|
---|
266 | #######################################################################
|
---|
267 | # the goto form
|
---|
268 | #######################################################################
|
---|
269 |
|
---|
270 | _gotoform_ {
|
---|
271 | <form name="GotoForm" method="get" action="_gwcgi_">
|
---|
272 | <input type=hidden name="e" value="_decodedcompressedoptions_">
|
---|
273 | <input type=hidden name="d" value="_cgiargd_">
|
---|
274 | <input type=hidden name="cl" value="_cgiargcl_">
|
---|
275 | <input type="text" name="gp" size="3" maxlength="4">
|
---|
276 | <input type="submit" value="_textgoto_">
|
---|
277 | </form>
|
---|
278 | }
|
---|
279 |
|
---|
280 | _textnumpages_ { <i>(_1_ _pages_)</i>}
|
---|
281 | _parentarrow_ {}
|
---|
282 | _prevtitle_ {}
|
---|
283 | _nexttitle_ {}
|
---|
284 |
|
---|
285 | #######################################################################
|
---|
286 | # the phind applet
|
---|
287 | #
|
---|
288 | # The phind applet is only required on phind classifier pages.
|
---|
289 | # Consequently, the _phindclassifier_ macro is not usually set. On screens
|
---|
290 | # where it is required, _phindclassifier_ resolves to _phindapplet_, and
|
---|
291 | # the following macro is loaded into the web page.
|
---|
292 | #######################################################################
|
---|
293 |
|
---|
294 | _phindapplet_ {
|
---|
295 | <APPLET CODEBASE="_httpjava_" CODE="org.nzdl.gsdl.Phind.Phind.class" ARCHIVE="Phind.jar" WIDTH=500 HEIGHT=400>
|
---|
296 | <PARAM NAME=library VALUE="_gwcgi_?e=_compressedoptions_">
|
---|
297 | <PARAM NAME=phindcgi VALUE="_gwcgi_?a=phind">
|
---|
298 | <PARAM NAME=collection VALUE="_cgiargc_">
|
---|
299 | <PARAM NAME=classifier VALUE="_phindnumber_">
|
---|
300 |
|
---|
301 | <PARAM NAME=orientation VALUE="vertical">
|
---|
302 | <PARAM NAME=depth VALUE="2">
|
---|
303 | <PARAM NAME=resultorder VALUE="L,l,E,e,D,d">
|
---|
304 | <PARAM NAME=textorientation VALUE="_textorientation_">
|
---|
305 | <PARAM NAME=backdrop VALUE="_httpimg_/phindbg1.jpg">
|
---|
306 | <PARAM NAME=fontsize VALUE="10">
|
---|
307 | <PARAM NAME=blocksize VALUE="10">
|
---|
308 |
|
---|
309 | The Phind java applet.
|
---|
310 | </APPLET>
|
---|
311 | }
|
---|
312 |
|
---|
313 | _collageapplet_ {
|
---|
314 | <applet CODEBASE="_httpjava_"
|
---|
315 | code="org.nzdl.gsdl.GsdlCollageApplet.GsdlCollageApplet.class"
|
---|
316 | archive="GsdlCollageApplet.jar"
|
---|
317 | width="_collagexdim_" height="_collageydim_">
|
---|
318 |
|
---|
319 | <param name="gwcgi" value="_gwcgi_">
|
---|
320 | <param name="collection" value="_cgiargc_">
|
---|
321 | <param name="classifier" value="_cgiargcl_.1">
|
---|
322 |
|
---|
323 | <param name="hrefMustHave" value="cl=_cgiargcl_.1">
|
---|
324 | <param name="imageMustNotHave" value="hl=\%x=\%gt=\%gc=\%.pr">
|
---|
325 |
|
---|
326 | <param name="imageType" value="_collageimageType_">
|
---|
327 | <param name="verbosity" value="_collageverbosity_">
|
---|
328 | <param name="maxDepth" value="_collagemaxDepth_">
|
---|
329 | <param name="maxDisplay" value="_collagemaxDisplay_">
|
---|
330 | <param name="refreshDelay" value="_collagerefreshDelay_">
|
---|
331 | <param name="isJava2" value="_collageisJava2_">
|
---|
332 | <param name="bgcolor" value="_collagebgcolor_">
|
---|
333 | <param name="documentroot" value="_httpimg_">
|
---|
334 | </applet>
|
---|
335 |
|
---|
336 | <center>
|
---|
337 | _collagecaption_
|
---|
338 | </center>
|
---|
339 | }
|
---|
340 |
|
---|
341 |
|
---|
342 | _flashbook_ {
|
---|
343 | <div id="bookdiv">
|
---|
344 | </div>
|
---|
345 |
|
---|
346 | <script type="text/javascript">
|
---|
347 | var myWidth = "100%";
|
---|
348 | myHeight = 800;
|
---|
349 |
|
---|
350 | var img_cover = '_httpassocdir_/_thisOID_/cover.jpg';
|
---|
351 | var doc_url = document.URL;
|
---|
352 | doc_url = doc_url.replace(/(&|\\?)book=[a-z]+/gi,'');
|
---|
353 | doc_url += '&book=flashxml';
|
---|
354 |
|
---|
355 | var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;//get windows or not
|
---|
356 | //Only for Windows computers because Greenstone webserver doesn't allow us to pass parameters to Flash.
|
---|
357 | //These methods is called by the Flash program to get all the necessary parameters for the book
|
---|
358 | //However, it will only work for IE 5.0 and later, Firefox 1.0 and later, Mozilla 1.7.5 and later
|
---|
359 | //Netscape 8.0 and later, Safari 1.3 and later
|
---|
360 | function getDocURL() \{ return doc_url; \}
|
---|
361 | function getImgCover() \{ return img_cover; \}
|
---|
362 | function getStageW() \{ return -1; \}
|
---|
363 | function getStageH() \{ return -1; \}
|
---|
364 |
|
---|
365 |
|
---|
366 | var flash_plug_html = "";
|
---|
367 | flash_plug_html += '<OBJECT align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \\n';
|
---|
368 | flash_plug_html += ' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" \\n';
|
---|
369 | flash_plug_html += ' height="';
|
---|
370 | flash_plug_html += myHeight + '" id="Book" swLiveConnect="true" align="middle"\\n';
|
---|
371 | flash_plug_html += ' width="';
|
---|
372 | flash_plug_html += myWidth + '">\\n';
|
---|
373 |
|
---|
374 | flash_plug_html += ' <PARAM name="allowScriptAccess" value="always" />\\n';
|
---|
375 | flash_plug_html += ' <PARAM name="movie" value="_httpflash_/Book.swf';
|
---|
376 | if (isWin == false)
|
---|
377 | \{
|
---|
378 | flash_plug_html += '?src_image=' + escape(img_cover);
|
---|
379 | flash_plug_html += '&doc_url=' + escape(doc_url);
|
---|
380 | \}
|
---|
381 | flash_plug_html += '" />\\n';
|
---|
382 | flash_plug_html += ' <PARAM name="quality" value="high" />\\n';
|
---|
383 | flash_plug_html += ' <PARAM name="bgcolor" value="#FFFFFF" />\\n';
|
---|
384 | flash_plug_html += ' <EMBED align="middle" \\n';
|
---|
385 | flash_plug_html += ' allowScriptAccess="always" swLiveConnect="true" \\n';
|
---|
386 | flash_plug_html += ' bgcolor="#FFFFFF" height="';
|
---|
387 | flash_plug_html += myHeight + '" name="Book" \\n';
|
---|
388 | flash_plug_html += ' pluginspage="http://www.macromedia.com/go/getflashplayer" \\n';
|
---|
389 | flash_plug_html += ' quality="high" \\n';
|
---|
390 | flash_plug_html += ' src=\\'_httpflash_/Book.swf';
|
---|
391 | if (isWin == false)
|
---|
392 | \{
|
---|
393 | flash_plug_html += '?src_image=' + escape(img_cover);
|
---|
394 | flash_plug_html += '&doc_url=' + escape(doc_url);
|
---|
395 | \}
|
---|
396 | flash_plug_html += '\\'\\n';
|
---|
397 | flash_plug_html += ' type="application/x-shockwave-flash" width="';
|
---|
398 | flash_plug_html += myWidth + '" />\\n';
|
---|
399 | flash_plug_html += '</OBJECT>\\n';
|
---|
400 |
|
---|
401 | var flash_div = document.getElementById("bookdiv");
|
---|
402 | flash_div.innerHTML = flash_plug_html;
|
---|
403 | </script>
|
---|
404 | }
|
---|
405 |
|
---|
406 | #######################################################################
|
---|
407 | # icons
|
---|
408 | #######################################################################
|
---|
409 |
|
---|
410 | _iconsmalltext_ {<img src="_httpiconsmtext_" class="icon" width=_widthsmtext_ height=_heightsmtext_ alt="_texticonsmalltext_" title="_texticonsmalltext_">}
|
---|
411 | _iconsmalltext_ [v=1] {<small><b>_texticonsmalltext2_</b></small>}
|
---|
412 |
|
---|
413 | _iconarrowsmalltext_ {<img src="_httpiconasmtext_" class="icon" width=_widthasmtext_ height=_heightasmtext_ alt="_texticonsmalltext_" title="_texticonsmalltext_">}
|
---|
414 | _iconarrowsmalltext_ [v=1] {<small><b>->_texticonsmalltext2_</b></small>}
|
---|
415 |
|
---|
416 | _iconclosedfolder_ {<img src="_httpiconclsdfldr_" class="icon" width=_widthclsdfldr_ height=_heightclsdfldr_ alt="_texticonclosedfolder_" title="_texticonclosedfolder_">}
|
---|
417 | _iconclosedfolder_ [v=1] {<small><b>_texticonclosedfolder2_</b></small>}
|
---|
418 |
|
---|
419 | _iconarrowclosedfolder_ {<img src=_httpiconaclsdfdr_" class="icon" width=_widthaclsdfdr_ height=_heightaclsdfdr_ alt="_texticonclosedfolder_" title="_texticonclosedfolder_">}
|
---|
420 | _iconarrowclosedfolder_ [v=1] {<small><b>->_texticonclosedfolder2_</b></small>}
|
---|
421 |
|
---|
422 | _iconopenfolder_ {<img src="_httpiconopenfldr_" class="icon" width=_widthopenfldr_ height=_heightopenfldr_ alt="_texticonopenfolder_" title="_texticonopenfolder_">}
|
---|
423 | _iconopenfolder_ [v=1] {<small><b>_texticonopenfolder2_</b></small>}
|
---|
424 |
|
---|
425 | _iconarrowopenfolder_ {<img src="_httpiconaopenfdr_" class="icon" width=_widthaopenfdr_ height=_heightaopenfdr_ alt="_texticonopenfolder_" title="_texticonopenfolder_">}
|
---|
426 | _iconarrowopenfolder_ [v=1] {<small><b>->_texticonopenfolder2_</b></small>}
|
---|
427 |
|
---|
428 | _iconarrowclosedbook_ {<img src="_httpiconabook_" width=_widthabook_ height=_heightabook_ class="icon" alt="_texticonclosedbook_" title="_texticonclosedbook_">}
|
---|
429 | _iconarrowclosedbook_ [v=1] {<small><b>->_texticonclosedbook_: </b></small>}
|
---|
430 |
|
---|
431 | _iconopenbook_ {<img src="_httpiconopenbook_" width=_widthopenbook_ height=_heightopenbook_ class="icon" alt="_texticonopenbook_" title="_texticonopenbook_">}
|
---|
432 | _iconopenbook_ [v=1] {<small><b>_texticonopenbook_: </b></small>}
|
---|
433 |
|
---|
434 | _iconarrowopenbook_ {<img src="_httpiconaopenbk_" width=_widthaopenbk_ height=_heightaopenbk_ class="icon" alt="_texticonopenbook_" title="_texticonopenbook_">}
|
---|
435 | _iconarrowopenbook_ [v=1] {<small><b>->_texticonopenbook_: </b></small>}
|
---|
436 |
|
---|
437 | _iconopenbookshelf_ {<img src="_httpiconbshelf_" class="icon" width=_widthbshelf_ height=_heightbshelf_ alt="_texticonopenbookshelf_" title="_texticonopenbookshelf_">}
|
---|
438 | _iconopenbookshelf_ [v=1] {<small><b>_texticonopenbookshelf_: </b></small>}
|
---|
439 |
|
---|
440 | _iconarrowopenbookshelf_ {<img src="_httpiconabshelf_" class="icon" width=_widthabshelf_ height=_heightabshelf_ alt="_texticonopenbookshelf_" title="_texticonopenbookshelf_">}
|
---|
441 | _iconarrowopenbookshelf_ [v=1] {<small><b>->_texticonopenbookshelf_: </b></small>}
|
---|
442 |
|
---|
443 | _iconclosedbookshelf_ {<img src="_httpiconbshelf_" class="icon" width=_widthbshelf_ height=_heightbshelf_ alt="_texticonclosedbookshelf_" title="_texticonclosedbookshelf_">}
|
---|
444 | _iconclosedbookshelf_ [v=1] {<small><b>_texticonclosedbookshelf_: </b></small>}
|
---|
445 |
|
---|
446 | _iconarrowclosedbookshelf_ {<img src="_httpiconabshelf_" class="icon" width=_widthabshelf_ height=_heightabshelf_ alt="_texticonclosedbookshelf_" title="_texticonclosedbookshelf_">}
|
---|
447 | _iconarrowclosedbookshelf_ [v=1] {<small><b>->_texticonclosedbookshelf_: </b></small>}
|
---|
448 |
|
---|
449 | _iconpointer_ {<img src="_httpiconarrrght_" class="icon" width=_widtharrrght_ height=_heightarrrght_>}
|
---|
450 | _iconpointer_ [v=1] {<small><b>_texticonpointer_-> </b></small>}
|
---|
451 |
|
---|
452 | _iconwarning_ {<img src="_httpiconwarning_" width="_widthwarning_" height="_heightwarning_" class="icon" align="left">}
|
---|
453 | _iconwarning_ [v=1] {_texticonwarning_}
|
---|
454 |
|
---|
455 |
|
---|
456 | #######################################################################
|
---|
457 | # images
|
---|
458 | #######################################################################
|
---|
459 |
|
---|
460 | _coverimage_ {<img alt="Cover Image" onError="src='_httpimg_/blank.gif'" src="_httpassocdir_/_thisOID_/cover.jpg">}
|
---|
461 |
|
---|
462 | _docbutton_ {<div class="button"><span class="button" title="_3_"><a href="_1_">_2_</a></span></div>
|
---|
463 | }
|
---|
464 |
|
---|
465 | # can't use _docbutton_ macro for detach button as we need to include target
|
---|
466 | _imagedetach_ {<div class="button"><span class="button"><a href="_httpcurrentdocument_&x=1" target="\_blank" title="_texticondetach_">_textDETACH_</a></span></div>}
|
---|
467 |
|
---|
468 | _imageprint_{<div class="button"><span class="button"><a href="javascript:print_preview()">_textPRINT_</a></span></div>}
|
---|
469 |
|
---|
470 |
|
---|
471 | _imagehighlight_ {_docbutton_(_httpcurrentdocument_&hl=1&gc=_cgiarggc_&gt=_cgiarggt_,_textHIGHLIGHT_,_texticonhighlight_)}
|
---|
472 |
|
---|
473 | _imagenohighlight_ {_docbutton_(_httpcurrentdocument_&hl=0&gc=_cgiarggc_&gt=_cgiarggt_,_document:textNOHIGHLIGHT_,_document:texticonnohighlight_)}
|
---|
474 |
|
---|
475 | _imagecontracttoc_ {_docbutton_(_httpcurrentdocument_&gc=0,_textCONTRACTCONTENTS_,_texticoncontracttoc_)}
|
---|
476 |
|
---|
477 | _imageexpandtoc_ {_docbutton_(_httpcurrentdocument_&gc=1,_textEXPANDCONTENTS_,_texticonexpandtoc_)}
|
---|
478 |
|
---|
479 | _imagecontracttext_ {_docbutton_(_httpcurrentdocument_&gt=0,_textCONTRACT_,_texticoncontracttext_)}
|
---|
480 |
|
---|
481 | _imageexpandtext_ {_docbutton_(_httpcurrentdocument_&gt=1,_textEXPANDTEXT_,_texticonexpandtext_)}
|
---|
482 |
|
---|
483 | _imagecont_ {_docbutton_(_httpcurrentdocument_&gt=2,_textCONTINUE_,_texticoncont_)}
|
---|
484 |
|
---|
485 |
|
---|
486 | #######################################################################
|
---|
487 | # print preview script
|
---|
488 | #######################################################################
|
---|
489 |
|
---|
490 |
|
---|
491 | _pagescriptextra_{
|
---|
492 |
|
---|
493 | var style_display_old;
|
---|
494 | var show = true;
|
---|
495 | var toc_top;
|
---|
496 |
|
---|
497 | function has_toc(){
|
---|
498 | var div_nodes = document.getElementsByTagName("div");
|
---|
499 | for (var i=0;i < div_nodes.length ; i++ )\{
|
---|
500 | var div_node = div_nodes[i];
|
---|
501 | if (div_node.className =="toc" && div_node.childNodes.length > 1)
|
---|
502 | \{
|
---|
503 | return true;
|
---|
504 | \}
|
---|
505 | \}
|
---|
506 |
|
---|
507 | return false;
|
---|
508 | \}
|
---|
509 |
|
---|
510 | function hide_toc()\{
|
---|
511 | var div_nodes = document.getElementsByTagName("div");
|
---|
512 | for (var i=0;i < div_nodes.length ; i++ )\{
|
---|
513 | var div_node = div_nodes[i];
|
---|
514 | if (div_node.className =="toc")
|
---|
515 | \{
|
---|
516 | style_display_old = div_node.style.display;
|
---|
517 | toc_top = document.getElementById("toc_top");
|
---|
518 | if (toc_top)
|
---|
519 | div_node.parentNode.insertBefore(toc_top,div_node);
|
---|
520 | div_node.style.display = "none";
|
---|
521 | \};
|
---|
522 | \}
|
---|
523 |
|
---|
524 | \}
|
---|
525 |
|
---|
526 |
|
---|
527 | function show_toc()\{
|
---|
528 |
|
---|
529 | var div_nodes = document.getElementsByTagName("div");
|
---|
530 | for (var i=0;i < div_nodes.length ; i++ )\{
|
---|
531 | var div_node = div_nodes[i];
|
---|
532 | if (div_node.className =="toc")
|
---|
533 | \{
|
---|
534 | div_node.style.display = style_display_old;
|
---|
535 | if (toc_top)
|
---|
536 | div_node.insertBefore(toc_top,div_node.firstChild);
|
---|
537 | \};
|
---|
538 | \}
|
---|
539 |
|
---|
540 | \}
|
---|
541 |
|
---|
542 |
|
---|
543 | function switch_toc()\{
|
---|
544 | var toc_link = document.getElementById("toc_link");
|
---|
545 | while (toc_link.hasChildNodes()) \{
|
---|
546 | toc_link.removeChild(toc_link.firstChild);
|
---|
547 | \}
|
---|
548 | if (show)\{
|
---|
549 | toc_link.appendChild(document.createTextNode('_textshowcontents_'));
|
---|
550 | show = false;
|
---|
551 | hide_toc();
|
---|
552 | \}
|
---|
553 | else\{
|
---|
554 | toc_link.appendChild(document.createTextNode('_texthidecontents_'));
|
---|
555 | show = true;
|
---|
556 | show_toc();
|
---|
557 | \}
|
---|
558 |
|
---|
559 | \}
|
---|
560 |
|
---|
561 | function print_preview() \{
|
---|
562 | // Switch the stylesheet
|
---|
563 | setActiveStyleSheet("Preview Document");
|
---|
564 | add_print_message();
|
---|
565 | \}
|
---|
566 |
|
---|
567 | function add_print_message()\{
|
---|
568 | if (document.getElementById)\{
|
---|
569 | var print_message = document.createElement('ul');
|
---|
570 | print_message.id = 'print-message';
|
---|
571 | print_message.className = "printmessage";
|
---|
572 |
|
---|
573 | var cancel_print_link = document.createElement('li');
|
---|
574 | cancel_print_link.className = "cancelprint"
|
---|
575 | cancel_print_link.onclick = function()\{ cancel_print(); return false;\};
|
---|
576 | cancel_print_link.appendChild(document.createTextNode('_textreturnoriginal_'));
|
---|
577 | print_message.appendChild(cancel_print_link);
|
---|
578 |
|
---|
579 |
|
---|
580 | var print_link = document.createElement('li');
|
---|
581 | print_link.onclick = function()\{ window.print(); return false;\};
|
---|
582 | print_link.appendChild(document.createTextNode('_textprintpage_'));
|
---|
583 | print_message.appendChild(print_link);
|
---|
584 |
|
---|
585 | if (has_toc())\{
|
---|
586 | var toc_link = document.createElement('li');
|
---|
587 | toc_link.id = "toc_link";
|
---|
588 | toc_link.onclick = function()\{ switch_toc(); return false;\};
|
---|
589 | toc_link.appendChild(document.createTextNode('_texthidecontents_'));
|
---|
590 | print_message.appendChild(toc_link);
|
---|
591 | \}
|
---|
592 |
|
---|
593 | //insert the print message node
|
---|
594 | var div_nodes = document.getElementsByTagName("div");
|
---|
595 | for (var i=0;i < div_nodes.length ; i++ )\{
|
---|
596 | var div_node = div_nodes[i];
|
---|
597 | if (div_node.className =="document")\{
|
---|
598 | var parent = div_node.parentNode;
|
---|
599 | parent.insertBefore(print_message,div_node);
|
---|
600 | \}
|
---|
601 | \}
|
---|
602 | \}
|
---|
603 |
|
---|
604 | \}
|
---|
605 |
|
---|
606 |
|
---|
607 | function cancel_print() \{
|
---|
608 | // Destroy the preview message
|
---|
609 | var print_message = document.getElementById('print-message');
|
---|
610 | var parent = print_message.parentNode;
|
---|
611 | parent.removeChild(print_message);
|
---|
612 |
|
---|
613 | show_toc();
|
---|
614 | // Switch back stylesheet
|
---|
615 | setActiveStyleSheet("default");
|
---|
616 | \}
|
---|
617 |
|
---|
618 | function setActiveStyleSheet(title) \{
|
---|
619 | var i, a, main;
|
---|
620 | for(i=0; (a = document.getElementsByTagName("link")[i]); i++) \{
|
---|
621 | if(a.getAttribute("rel").indexOf("style") != -1
|
---|
622 | && a.getAttribute("title")) \{
|
---|
623 | a.disabled = true;
|
---|
624 | if(a.getAttribute("title") == title) a.disabled = false;
|
---|
625 | \}
|
---|
626 | \}
|
---|
627 | \}
|
---|
628 |
|
---|
629 | }
|
---|
630 |
|
---|
631 |
|
---|
632 | #######################################################################
|
---|
633 | # headers/footers
|
---|
634 | #######################################################################
|
---|
635 |
|
---|
636 |
|
---|
637 | # header overridden for text pages
|
---|
638 | _textheader_ {_cgihead_
|
---|
639 | _htmlhead_
|
---|
640 | _startspacer_
|
---|
641 |
|
---|
642 | <!-- document:textheader -->
|
---|
643 | <div id="banner">
|
---|
644 | <div class="pageinfo"><p class="bannerlinks">_globallinks_</p></div>
|
---|
645 | <div class="collectimage">_imagecollection_</div>
|
---|
646 | </div>
|
---|
647 | <div class="bannerextra">_pagebannerextra_</div>
|
---|
648 | }
|
---|
649 |
|
---|
650 | _textheader_ [v=1] {_cgihead_
|
---|
651 | _htmlhead_
|
---|
652 | _globallinks_
|
---|
653 | }
|
---|
654 |
|
---|
655 | _footer_ {
|
---|
656 | </div> <!-- document:footer -->
|
---|
657 |
|
---|
658 | <div class="navarrowsbottom">
|
---|
659 | _navarrowsbottom_
|
---|
660 | </div>
|
---|
661 |
|
---|
662 | <center>
|
---|
663 | <table width=_pagewidth_ cellpadding=0 cellspacing=0 border=0>
|
---|
664 | <tr><td align=left valign=top>
|
---|
665 | <div class="commentssection">
|
---|
666 | _usercomments_
|
---|
667 | _addusercomment_
|
---|
668 | </div>
|
---|
669 | </td></tr></table>
|
---|
670 | </center>
|
---|
671 |
|
---|
672 | _endspacer__htmlfooter_
|
---|
673 | }
|
---|
674 |
|
---|
675 |
|
---|
676 |
|
---|
677 |
|
---|
678 | package Global
|
---|
679 |
|
---|
680 | # Social network support
|
---|
681 | # Defined here in document, as the most likely place this will be used in
|
---|
682 | # within a document view, however its package is 'Global' because you
|
---|
683 | # might equally want this in a search or browse list
|
---|
684 |
|
---|
685 | # _1_ = e.g. title
|
---|
686 | # _2_ = [srclink] or left empty. If left empty, then it will share the internal GS document
|
---|
687 |
|
---|
688 | _sharemescript_ {
|
---|
689 | <script type="text/javascript">
|
---|
690 | var a2a_config = a2a_config || \{ \};
|
---|
691 | a2a_config.linkname = "_1_";
|
---|
692 |
|
---|
693 | _If_(_2_,
|
---|
694 | var srclink = \'_2_\';
|
---|
695 |
|
---|
696 | //If metadata value is a valid URL that starts with xxx://
|
---|
697 | // (e.g. any protocol\, http, https\, ftp ...) then that will be the link to share
|
---|
698 | if (srclink.match(/^[^:]+:\\\/\\\//i)) \{
|
---|
699 | a2a_config.linkurl = srclink;
|
---|
700 | \}
|
---|
701 | else \{
|
---|
702 | //if metadata value is [srclink] then we have to cut off the 'href' tag label
|
---|
703 | var href = srclink.match(/href=\"([^\"]*)\"/);
|
---|
704 | a2a_config.linkurl = gsapi.fullDomainURL(href[1]);
|
---|
705 | \}
|
---|
706 | ,
|
---|
707 | //if no metadata was passed as link\, then the GS version of the document will be used.
|
---|
708 | a2a_config.linkurl = gsapi.fullDomainURL("_gwcgi_")+ "?c=_cgiargc_&a=d&d=_cgiargd_";
|
---|
709 | )
|
---|
710 |
|
---|
711 | </script>
|
---|
712 | }
|
---|
713 |
|
---|
714 | _shareme_ {
|
---|
715 |
|
---|
716 | <div style=\'padding-left:50px;\' class=\'a2a_kit a2a_default_style\'>
|
---|
717 | _sharemescript_(_1_,_2_)
|
---|
718 | <center>
|
---|
719 | <a class=\'a2a_dd\' href=\'http://www.addtoany.com/share_save\'>Share</a>
|
---|
720 | <span class=\"a2a_divider\"></span>
|
---|
721 | <a class=\'a2a_button_facebook\'></a>
|
---|
722 | <a class=\'a2a_button_twitter\'></a>
|
---|
723 | <a class=\'a2a_button_email\'></a>
|
---|
724 | <a class=\'a2a_button_linkedin\'></a>
|
---|
725 | </center>
|
---|
726 | <script type=\"text/javascript\" src=\"http://static.addtoany.com/menu/page.js\"></script>
|
---|
727 | </div>
|
---|
728 |
|
---|
729 | }
|
---|
730 |
|
---|
731 | _sharemesmall_ {
|
---|
732 |
|
---|
733 | <span style=\'padding-left:8px;\' class=\'a2a_kit a2a_default_style\'>
|
---|
734 | _sharemescript_(_1_,_2_)
|
---|
735 | <a class=\'a2a_dd\' href=\'http://www.addtoany.com/share_save\'>Share</a>
|
---|
736 | <script type=\"text/javascript\" src=\"http://static.addtoany.com/menu/page.js\"></script>
|
---|
737 | </span>
|
---|
738 |
|
---|
739 | }
|
---|