[24556] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
| 2 | <CollectionConfig xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
---|
| 3 | <metadataList>
|
---|
| 4 | <metadata lang="en" name="creator"/>
|
---|
| 5 | <metadata lang="en" name="maintainer"/>
|
---|
| 6 | <metadata lang="en" name="public">true</metadata>
|
---|
| 7 | </metadataList>
|
---|
| 8 | <displayItemList>
|
---|
| 9 | <displayItem assigned="true" lang="en" name="name">Pei-Jones-Flat</displayItem>
|
---|
| 10 | </displayItemList>
|
---|
| 11 | <search type="mgpp">
|
---|
| 12 | <level name="document">
|
---|
| 13 | <displayItem lang="en" name="name">document</displayItem>
|
---|
| 14 | </level>
|
---|
| 15 | <level name="section">
|
---|
| 16 | <displayItem lang="en" name="name">section</displayItem>
|
---|
| 17 | </level>
|
---|
| 18 | <defaultLevel name="section"/>
|
---|
| 19 | <index name="text">
|
---|
| 20 | <displayItem lang="en" name="name">text</displayItem>
|
---|
| 21 | </index>
|
---|
| 22 | <index name="Title">
|
---|
| 23 | <displayItem lang="en" name="name">titles</displayItem>
|
---|
| 24 | </index>
|
---|
| 25 | <index name="Source">
|
---|
| 26 | <displayItem lang="en" name="name">filenames</displayItem>
|
---|
| 27 | </index>
|
---|
| 28 | <index name="Plugin"/>
|
---|
| 29 | <defaultIndex name="text"/>
|
---|
| 30 | <indexOption>
|
---|
| 31 | <option name="accentfold"/>
|
---|
| 32 | <option name="casefold"/>
|
---|
| 33 | <option name="stem"/>
|
---|
| 34 | </indexOption>
|
---|
| 35 | <searchType name="plain"/>
|
---|
| 36 | <searchType name="simpleform"/>
|
---|
| 37 | <searchType name="advancedform"/>
|
---|
| 38 | <format><gsf:template match="documentNode"><td valign="top"><gsf:link type="document"><gsf:icon type="document"/></gsf:link></td><td><gsf:switch><gsf:metadata name="Title" select="ancestors" separator=": "/><gsf:when test="exists"><gsf:metadata name="Title" select="ancestors" separator=": "/>:</gsf:when></gsf:switch><gsf:link type="document"><gsf:metadata name="Title"/></gsf:link></td></gsf:template> </format>
|
---|
| 39 | </search>
|
---|
| 40 | <infodb type="gdbm"/>
|
---|
| 41 | <import>
|
---|
| 42 | <pluginList>
|
---|
| 43 | <plugin name="ZIPPlugin"/>
|
---|
| 44 | <plugin name="GreenstoneXMLPlugin"/>
|
---|
| 45 | <plugin name="TextPlugin"/>
|
---|
| 46 | <plugin name="HTMLPlugin"/>
|
---|
| 47 | <plugin name="EmailPlugin"/>
|
---|
| 48 | <plugin name="PDFPlugin"/>
|
---|
| 49 | <plugin name="RTFPlugin"/>
|
---|
| 50 | <plugin name="WordPlugin"/>
|
---|
| 51 | <plugin name="PostScriptPlugin"/>
|
---|
| 52 | <plugin name="PowerPointPlugin"/>
|
---|
| 53 | <plugin name="ExcelPlugin"/>
|
---|
[24802] | 54 | <plugin name="PagedImagePlugin"/>
|
---|
[24556] | 55 | <plugin name="ImagePlugin"/>
|
---|
| 56 | <plugin name="ISISPlugin"/>
|
---|
| 57 | <plugin name="NulPlugin"/>
|
---|
| 58 | <plugin name="OAIPlugin"/>
|
---|
[24730] | 59 | <plugin name="HTMLImagePlugin"/>
|
---|
[24556] | 60 | <plugin name="MetadataXMLPlugin"/>
|
---|
| 61 | <plugin name="ArchivesInfPlugin"/>
|
---|
| 62 | <plugin name="DirectoryPlugin"/>
|
---|
| 63 | </pluginList>
|
---|
| 64 | </import>
|
---|
| 65 | <browse>
|
---|
| 66 | <classifier name="List">
|
---|
| 67 | <option name="-metadata" value="dc.Title;Title"/>
|
---|
| 68 | <option name="-partition_type_within_level" value="approximate_size"/>
|
---|
[24630] | 69 | <option name="-bookshelf_type" value="never"/>
|
---|
[24556] | 70 | </classifier>
|
---|
| 71 | <classifier name="AZCompactList">
|
---|
| 72 | <option name="-metadata" value="Source"/>
|
---|
| 73 | <option name="-removesuffix" value="(?i)\\..*"/>
|
---|
[24630] | 74 | <option name="-buttonname" value="Source"/>
|
---|
[24556] | 75 | </classifier>
|
---|
[24784] | 76 | <format>
|
---|
| 77 | <gsf:template match="documentNode">
|
---|
| 78 | <td valign="top">
|
---|
| 79 | <gsf:link type="document">
|
---|
| 80 | <gsf:icon type="document"/>
|
---|
| 81 | </gsf:link>
|
---|
| 82 | </td>
|
---|
| 83 | <td valign="top">
|
---|
| 84 | <gsf:link type="source">
|
---|
| 85 | <gsf:choose-metadata>
|
---|
| 86 | <gsf:metadata name="thumbicon"/>
|
---|
| 87 | <gsf:metadata name="srcicon"/>
|
---|
| 88 | </gsf:choose-metadata>
|
---|
| 89 | </gsf:link>
|
---|
| 90 | </td>
|
---|
| 91 | <td valign="top">
|
---|
| 92 | <gsf:choose-metadata>
|
---|
| 93 | <gsf:metadata name="dc.Title"/>
|
---|
| 94 | <gsf:metadata name="exp.Title"/>
|
---|
| 95 | <gsf:metadata name="Title"/>
|
---|
| 96 | <gsf:default>Untitled</gsf:default>
|
---|
| 97 | </gsf:choose-metadata>
|
---|
| 98 | <gsf:switch>
|
---|
| 99 | <gsf:metadata name="Source"/>
|
---|
| 100 | <gsf:when test="exists">
|
---|
| 101 | <br/><i>(<gsf:metadata name="Source"/>)</i>
|
---|
| 102 | </gsf:when>
|
---|
| 103 | </gsf:switch>
|
---|
| 104 | </td>
|
---|
| 105 | </gsf:template>
|
---|
| 106 |
|
---|
| 107 | <gsf:template match="classifierNode">
|
---|
| 108 | <td valign="top">
|
---|
| 109 | <gsf:link type="classifier">
|
---|
| 110 | <gsf:icon type="classifier"/>
|
---|
| 111 | </gsf:link>
|
---|
| 112 | </td>
|
---|
| 113 | <td valign="top">
|
---|
| 114 | <gsf:metadata name="srclink"/>
|
---|
| 115 | <gsf:choose-metadata>
|
---|
| 116 | <gsf:metadata name="thumbicon"/>
|
---|
| 117 | <gsf:metadata name="srcicon"/>
|
---|
| 118 | </gsf:choose-metadata>
|
---|
| 119 | <gsf:metadata name="/srclink"/>
|
---|
| 120 | </td>
|
---|
| 121 | <td valign="top">
|
---|
| 122 | <gsf:choose-metadata>
|
---|
| 123 | <gsf:metadata name="dc.Title"/>
|
---|
| 124 | <gsf:metadata name="exp.Title"/>
|
---|
| 125 | <gsf:metadata name="Title"/>
|
---|
| 126 | <gsf:default>Untitled</gsf:default>
|
---|
| 127 | </gsf:choose-metadata>
|
---|
| 128 | <gsf:switch>
|
---|
| 129 | <gsf:metadata name="Source"/>
|
---|
| 130 | <gsf:when test="exists">
|
---|
| 131 | <br/><i>(<gsf:metadata name="Source"/>)</i>
|
---|
| 132 | </gsf:when>
|
---|
| 133 | </gsf:switch>
|
---|
| 134 | </td>
|
---|
| 135 | </gsf:template>
|
---|
| 136 |
|
---|
| 137 | <gsf:template match="classifierNode" mode="horizontal">
|
---|
| 138 | <gsf:link type="horizontal">
|
---|
| 139 | <gsf:metadata name="Title"/>
|
---|
| 140 | </gsf:link>
|
---|
| 141 | </gsf:template>
|
---|
| 142 | </format>
|
---|
[24556] | 143 | </browse>
|
---|
| 144 | <display>
|
---|
[24730] | 145 | <format>
|
---|
[24790] | 146 | <gsf:option name="sideBar" value="false"/>
|
---|
[24730] | 147 | <xsl:template name="additionalHeaderContent">
|
---|
| 148 | <!-- jQuery must be included before Annotator -->
|
---|
| 149 | <script src="sites/localsite/collect/peijones/js/annotator/lib/vendor/jquery.js"><xsl:text> </xsl:text></script>
|
---|
| 150 |
|
---|
| 151 | <!-- If you're sure your users will only be using browsers modern
|
---|
| 152 | enough to have their own JSON.parse and JSON.stringify
|
---|
| 153 | implementations you can skip this -->
|
---|
| 154 | <script src="sites/localsite/collect/peijones/js/annotator/lib/vendor/json2.js"><xsl:text> </xsl:text></script>
|
---|
| 155 |
|
---|
[24798] | 156 | <script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator-full.min.js"><xsl:text> </xsl:text></script>
|
---|
[24730] | 157 | <!-- The main Annotator script -->
|
---|
[24798] | 158 | <!--<script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.min.js"><xsl:text> </xsl:text></script> -->
|
---|
[24730] | 159 |
|
---|
| 160 | <!-- Annotator's styling and images -->
|
---|
| 161 | <link rel="stylesheet" type="text/css" href="sites/localsite/collect/peijones/js/annotator/pkg/annotator.min.css"/>
|
---|
| 162 |
|
---|
| 163 | <!-- The following plugins are entirely optional -->
|
---|
| 164 |
|
---|
| 165 | <!-- The Store plugin. Saves annotations to a remote backend -->
|
---|
[24798] | 166 | <!-- <script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.store.min.js"><xsl:text> </xsl:text></script> -->
|
---|
[24730] | 167 |
|
---|
| 168 | <!-- The Auth plugin. Allows users of Annotator to authenticate themselves
|
---|
| 169 | to the remote backend -->
|
---|
[24798] | 170 | <!--<script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.auth.min.js"><xsl:text> </xsl:text></script> -->
|
---|
[24730] | 171 | <!-- The Permissions plugin. See who created which annotation and create
|
---|
| 172 | annotations as a specified user -->
|
---|
[24798] | 173 | <!--<script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.permissions.min.js"><xsl:text> </xsl:text></script> -->
|
---|
[24730] | 174 |
|
---|
| 175 | <!-- The Tags plugin. Edit and display tag keywords on annotations -->
|
---|
[24798] | 176 | <!--<script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.tags.min.js"><xsl:text> </xsl:text></script> -->
|
---|
[24730] | 177 |
|
---|
| 178 | <!-- The Markdown plugin. Treat annotation text as Markdown -->
|
---|
[24798] | 179 | <!-- <script src="sites/localsite/collect/peijones/js/annotator/lib/vendor/showdown.js"><xsl:text> </xsl:text></script> -->
|
---|
| 180 | <!-- <script src="sites/localsite/collect/peijones/js/annotator/pkg/annotator.markdown.min.js"><xsl:text> </xsl:text></script> -->
|
---|
[24730] | 181 |
|
---|
[24769] | 182 | <!-- Photo note scripts -->
|
---|
| 183 | <script type="text/javascript" src="sites/localsite/collect/peijones/js/documentmaker/BrowserDetect.js"><xsl:text> </xsl:text></script>
|
---|
| 184 | <script type="text/javascript" src="sites/localsite/collect/peijones/js/documentmaker/PhotoNotes-1.5.js"><xsl:text> </xsl:text></script>
|
---|
| 185 | <link rel="stylesheet" type="text/css" href="sites/localsite/collect/peijones/style/PhotoNotes-1.5.css"/>
|
---|
[24730] | 186 |
|
---|
[24769] | 187 | <!-- Zoom scripts -->
|
---|
[24730] | 188 | <!--<script src="interfaces/{$interface_name}/js/jquery-1.4.2.js" type="text/javascript"><xsl:text> </xsl:text></script>-->
|
---|
| 189 | <script src="sites/localsite/collect/peijones/js/documentmaker/zoomer.jquery.js" type="text/javascript"><xsl:text> </xsl:text></script> <link href="sites/localsite/collect/peijones/style/style.css" rel="stylesheet" type="text/css"/>
|
---|
[24769] | 190 | <script type="text/javascript">
|
---|
| 191 | <xsl:text disable-output-escaping="yes">
|
---|
| 192 | _zoomEnabled = true;
|
---|
[24730] | 193 | function readyImagesForZoom()
|
---|
[24769] | 194 | {
|
---|
| 195 | var noZoom = document.getElementById("noZoom");
|
---|
| 196 | var wrap = document.getElementById("wrap");
|
---|
| 197 | if(!noZoom || !wrap)
|
---|
| 198 | {
|
---|
| 199 | return;
|
---|
| 200 | }
|
---|
[24730] | 201 | var smallImageDiv = document.getElementById("small");
|
---|
| 202 | var smallImage = smallImageDiv.getElementsByTagName("img")[0];
|
---|
[24769] | 203 | smallImageDiv.style.width = smallImageWidth + "px";
|
---|
| 204 | smallImageDiv.style.height = smallImageHeight + "px";
|
---|
| 205 | var multiplier = largeImageHeight / smallImageHeight;
|
---|
[24730] | 206 | $("#wrap").anythingZoomer({
|
---|
| 207 | expansionSize:50,
|
---|
| 208 | speedMultiplier:multiplier
|
---|
[24769] | 209 | });
|
---|
| 210 |
|
---|
| 211 | noZoom.onclick = function(){addZoom();}
|
---|
| 212 | document.getElementById("overlay").onclick = function(){removeZoom();}
|
---|
| 213 |
|
---|
| 214 | removeZoom();
|
---|
[24730] | 215 | }
|
---|
| 216 | function addZoom()
|
---|
[24769] | 217 | {
|
---|
| 218 | if(!_zoomEnabled)
|
---|
| 219 | {
|
---|
| 220 | return;
|
---|
| 221 | }
|
---|
| 222 |
|
---|
[24730] | 223 | var wrapper = document.getElementById("wrap");
|
---|
| 224 | var noZoom = document.getElementById("noZoom");
|
---|
[24769] | 225 |
|
---|
| 226 | if(!noZoom || !wrapper)
|
---|
| 227 | {
|
---|
| 228 | return;
|
---|
| 229 | }
|
---|
| 230 |
|
---|
[24730] | 231 | noZoom.style.display = "none";
|
---|
| 232 | wrapper.style.display = "block";
|
---|
| 233 | var option = document.getElementById("zoomOption");
|
---|
[24769] | 234 | if(option)
|
---|
| 235 | {
|
---|
| 236 | option.setAttribute("onclick", "removeZoom();");
|
---|
| 237 | }
|
---|
[24730] | 238 | }
|
---|
| 239 | function removeZoom()
|
---|
| 240 | {
|
---|
[24769] | 241 | if(!_zoomEnabled)
|
---|
| 242 | {
|
---|
| 243 | return;
|
---|
| 244 | }
|
---|
| 245 |
|
---|
[24730] | 246 | var wrapper = document.getElementById("wrap");
|
---|
| 247 | var noZoom = document.getElementById("noZoom");
|
---|
[24769] | 248 |
|
---|
| 249 | if(!noZoom || !wrapper)
|
---|
| 250 | {
|
---|
| 251 | return;
|
---|
| 252 | }
|
---|
| 253 |
|
---|
[24730] | 254 | wrapper.style.display = "none";
|
---|
| 255 | noZoom.style.display = "block";
|
---|
| 256 | var option = document.getElementById("zoomOption");
|
---|
[24769] | 257 | if(option)
|
---|
| 258 | {
|
---|
| 259 | option.setAttribute("onclick", "addZoom();");
|
---|
| 260 | }
|
---|
| 261 | }
|
---|
[24730] | 262 | </xsl:text>
|
---|
[24769] | 263 | </script>
|
---|
[24730] | 264 | <script text="text/javascript">
|
---|
| 265 | <xsl:text disable-output-escaping="yes">
|
---|
[24769] | 266 |
|
---|
| 267 | var _posCount = 0;
|
---|
| 268 | var _notes;
|
---|
| 269 | function initNotes()
|
---|
[24730] | 270 | {
|
---|
[24769] | 271 | /* create the Photo Note Container */
|
---|
| 272 | _notes = new PhotoNoteContainer(document.getElementById("noZoom"));
|
---|
| 273 | getNotes();
|
---|
| 274 | }
|
---|
| 275 |
|
---|
| 276 | function deleteFunction(note)
|
---|
| 277 | {
|
---|
| 278 | var callback =
|
---|
| 279 | {
|
---|
| 280 | success: function(response)
|
---|
| 281 | {
|
---|
| 282 | var updateURL = gs.siteMetadata.siteURL.replace("8080","9090") + gs.xsltParams.library_name + "?a=s&sa=c";
|
---|
| 283 |
|
---|
| 284 | var updateCallback =
|
---|
| 285 | {
|
---|
| 286 | success: function(response){},
|
---|
| 287 | failed: function(){alert("Failed in deleteFunction() to update Greenstone server with: " + updateURL);}
|
---|
| 288 | };
|
---|
| 289 |
|
---|
| 290 |
|
---|
| 291 | YAHOO.util.Connect.asyncRequest("GET", updateURL, updateCallback);
|
---|
| 292 | },
|
---|
| 293 | failed: function(){ alert("Failed in deleteFunction() with note id: " + note.id)},
|
---|
| 294 | };
|
---|
| 295 |
|
---|
| 296 | var status = true;
|
---|
| 297 |
|
---|
| 298 | if (note && note.id && note.id > 0) {
|
---|
| 299 | var metaposStr = note.id - 1;
|
---|
| 300 |
|
---|
| 301 | var url = gs.siteMetadata.siteURL.replace("8080","9090") + "cgi-bin/metadata-server.pl?a=remove-metadata&site=localsite&c=" + gs.cgiParams.c + "&d=" + gs.cgiParams.d + "&metaname=gsimg.photoNote&metapos=" + metaposStr;
|
---|
| 302 | YAHOO.util.Connect.asyncRequest("GET", url, callback);
|
---|
| 303 | }
|
---|
| 304 | else {
|
---|
| 305 | alert("Failed to find valid note data to delete");
|
---|
| 306 | status = false;
|
---|
| 307 | }
|
---|
| 308 |
|
---|
| 309 | return status;
|
---|
| 310 | }
|
---|
| 311 |
|
---|
| 312 | function saveFunction(note)
|
---|
| 313 | {
|
---|
| 314 | var callback =
|
---|
| 315 | {
|
---|
| 316 | success: function(response)
|
---|
| 317 | {
|
---|
| 318 | var updateURL = gs.siteMetadata.siteURL.replace("8080","9090") + gs.xsltParams.library_name + "?a=s&sa=c";
|
---|
| 319 |
|
---|
| 320 | var updateCallback =
|
---|
| 321 | {
|
---|
| 322 | success: function(response){},
|
---|
| 323 | failed: function(reponse){ alert("Failed in saveFunction() to update Greenstone server with: " + updateURL);}
|
---|
| 324 | };
|
---|
| 325 |
|
---|
| 326 |
|
---|
| 327 | YAHOO.util.Connect.asyncRequest("GET", updateURL, updateCallback);
|
---|
| 328 | },
|
---|
| 329 | failed: function(reponse){ alert("Failed in saveFunction() with note id: " + note.id)},
|
---|
| 330 | };
|
---|
| 331 |
|
---|
| 332 | var jsonVal = '{"caption":"' + note.text + '", "area":{"x":' + note.rect.left + ', "y":' + note.rect.top + ', "width":' + note.rect.width + ', "height":' + note.rect.height + '}}';
|
---|
| 333 | var metaposStr = (note && note.id && note.id > 0) ? note.id - 1 : _posCount;
|
---|
| 334 |
|
---|
| 335 | var saveURL = gs.siteMetadata.siteURL.replace("8080","9090") + "cgi-bin/metadata-server.pl?a=set-metadata&site=localsite&c=" + gs.cgiParams.c + "&d=" + gs.cgiParams.d + "&metaname=gsimg.photoNote&metavalue=" + jsonVal + "&metapos=" + metaposStr;
|
---|
| 336 | YAHOO.util.Connect.asyncRequest("GET", saveURL, callback);
|
---|
| 337 |
|
---|
| 338 | return 1;
|
---|
| 339 | }
|
---|
| 340 |
|
---|
| 341 | function getNotes()
|
---|
| 342 | {
|
---|
| 343 | if(gs.variables.photoNotes == null || gs.variables.photoNotes == undefined)
|
---|
| 344 | {
|
---|
| 345 | console.log("No photo notes");
|
---|
| 346 | return;
|
---|
| 347 | }
|
---|
| 348 |
|
---|
| 349 | for(var i = 0; i < gs.variables.photoNotes.length; i++)
|
---|
| 350 | {
|
---|
| 351 | var note = gs.variables.photoNotes[i];
|
---|
| 352 | if(!note)
|
---|
| 353 | {
|
---|
| 354 | continue;
|
---|
| 355 | }
|
---|
| 356 | var newNote = new PhotoNote(note.caption, i+1, new PhotoNoteRect(note.area.x,note.area.y,note.area.width,note.area.height));
|
---|
| 357 | newNote.onsave = saveFunction;
|
---|
| 358 | newNote.ondelete = deleteFunction;
|
---|
| 359 | _notes.AddNote(newNote);
|
---|
| 360 | _posCount++;
|
---|
| 361 | }
|
---|
| 362 |
|
---|
| 363 | addNoteOverAndOutHandlers();
|
---|
| 364 | }
|
---|
| 365 |
|
---|
| 366 | function AddNote()
|
---|
| 367 | {
|
---|
| 368 | var newNote = new PhotoNote('Add note text here...',_posCount+1,new PhotoNoteRect(10,10,50,50));
|
---|
| 369 | newNote.onsave = saveFunction;
|
---|
| 370 | newNote.ondelete = deleteFunction;
|
---|
| 371 | _notes.AddNote(newNote);
|
---|
| 372 | _posCount++;
|
---|
| 373 |
|
---|
| 374 | addNoteOverAndOutHandlers();
|
---|
| 375 | newNote.Select();
|
---|
| 376 | }
|
---|
| 377 |
|
---|
| 378 | function addNoteOverAndOutHandlers()
|
---|
| 379 | {
|
---|
| 380 | var divs = document.getElementsByTagName("DIV");
|
---|
| 381 | for(var i = 0; i < divs.length; i++)
|
---|
| 382 | {
|
---|
| 383 | if(divs[i].getAttribute("class") && divs[i].getAttribute("class").search("fn-area") != -1)
|
---|
| 384 | {
|
---|
| 385 | divs[i].onmouseover = function(){_zoomEnabled = false;}
|
---|
| 386 | divs[i].onmouseout = function(){_zoomEnabled = true;}
|
---|
| 387 | }
|
---|
| 388 | }
|
---|
| 389 | }
|
---|
| 390 |
|
---|
| 391 | window.onload = function(){initNotes(); readyImagesForZoom(); initAnnotator();};
|
---|
| 392 | </xsl:text>
|
---|
| 393 | </script>
|
---|
[24798] | 394 |
|
---|
[24769] | 395 | <script text="text/javascript">
|
---|
| 396 | <xsl:text disable-output-escaping="yes">
|
---|
| 397 | function initAnnotator()
|
---|
[24798] | 398 | {
|
---|
[24730] | 399 | jQuery(function ($) {
|
---|
[24798] | 400 | if (typeof $.fn.annotator !== 'function') {
|
---|
| 401 | alert("Ooops! it looks like you haven't built the Annotator concatenation file. " + "Either download a tagged release from GitHub, or modify the Cakefile to point " + "at your copy of the YUI compressor and run `cake package`.");
|
---|
| 402 | } else {
|
---|
| 403 | /*
|
---|
| 404 | jQuery('#gs-document-text').annotator()
|
---|
| 405 | .annotator('addPlugin', 'Store', {
|
---|
| 406 | prefix: 'http://annotateit.org/api',
|
---|
| 407 | annotationData: {'uri':document.URL}
|
---|
| 408 | })
|
---|
| 409 | .annotator('addPlugin', 'Auth', {
|
---|
| 410 | userId: 'papitha', // Your AnnotateIt username
|
---|
| 411 | consumerKey: '39fc339cf058bd22176771b3e33c5dac', // Your Account Key
|
---|
| 412 | authToken: '852b7fc25396d2aedf9aeb44dd58518faa679dbf027892164bfb81900bd09741' // Your Auth Token
|
---|
| 413 | });
|
---|
| 414 | */
|
---|
[24730] | 415 |
|
---|
[24798] | 416 | jQuery(function ($) {
|
---|
| 417 | // Include AnnotateIt credentials to load the store plugin.
|
---|
| 418 | $('#gs-document-text').annotator().annotator('setupPlugins', {
|
---|
| 419 | userId: 'papitha',
|
---|
| 420 | userName: 'Papitha',
|
---|
| 421 | accountId: '39fc339cf058bd22176771b3e33c5dac',
|
---|
| 422 | authToken: '852b7fc25396d2aedf9aeb44dd58518faa679dbf027892164bfb81900bd09741',
|
---|
| 423 | }, {
|
---|
[24802] | 424 | Store:
|
---|
| 425 | {
|
---|
[24817] | 426 | prefix: 'http://localhost:5000',
|
---|
[24802] | 427 | annotationData: {'uri':gs.cgiParams.c + "-" + gs.cgiParams.d},
|
---|
| 428 | loadFromSearch: {'uri':gs.cgiParams.c + "-" + gs.cgiParams.d}
|
---|
| 429 | }
|
---|
[24798] | 430 | });
|
---|
| 431 | });
|
---|
| 432 | }
|
---|
[24730] | 433 | });
|
---|
| 434 | }
|
---|
| 435 | </xsl:text>
|
---|
| 436 | </script>
|
---|
| 437 | </xsl:template>
|
---|
[24784] | 438 |
|
---|
| 439 | <xsl:template name="documentImage">
|
---|
[24769] | 440 | <!-- Get the photo notes for this document node -->
|
---|
[24730] | 441 | <gsf:variable-struct name="photoNotes">
|
---|
| 442 | <gsf:metadata multiple="true" name="gsimg.photoNote" separator=", "/>
|
---|
| 443 | </gsf:variable-struct>
|
---|
[24769] | 444 |
|
---|
| 445 | <!-- Get details about the image for zooming -->
|
---|
[24730] | 446 | <h3>
|
---|
| 447 | <gsf:choose-metadata>
|
---|
| 448 | <gsf:metadata name="dc.Title"/>
|
---|
| 449 | <gsf:metadata name="ex.Title"/>
|
---|
| 450 | </gsf:choose-metadata>
|
---|
| 451 | </h3>
|
---|
| 452 | <xsl:variable name="imageWidth">
|
---|
[24769] | 453 | <gsf:choose-metadata>
|
---|
| 454 | <gsf:metadata name="ImageWidth"/>
|
---|
| 455 | <gsf:default>-1</gsf:default>
|
---|
| 456 | </gsf:choose-metadata>
|
---|
[24730] | 457 | </xsl:variable>
|
---|
| 458 | <xsl:variable name="imageHeight">
|
---|
[24769] | 459 | <gsf:choose-metadata>
|
---|
| 460 | <gsf:metadata name="ImageHeight"/>
|
---|
| 461 | <gsf:default>-1</gsf:default>
|
---|
| 462 | </gsf:choose-metadata>
|
---|
[24730] | 463 | </xsl:variable>
|
---|
| 464 | <xsl:variable name="screenImageWidth">
|
---|
[24769] | 465 | <gsf:choose-metadata>
|
---|
| 466 | <gsf:metadata name="ScreenWidth"/>
|
---|
| 467 | <gsf:default>-1</gsf:default>
|
---|
| 468 | </gsf:choose-metadata>
|
---|
[24730] | 469 | </xsl:variable>
|
---|
| 470 | <xsl:variable name="screenImageHeight">
|
---|
[24769] | 471 | <gsf:choose-metadata>
|
---|
| 472 | <gsf:metadata name="ScreenHeight"/>
|
---|
| 473 | <gsf:default>-1</gsf:default>
|
---|
| 474 | </gsf:choose-metadata>
|
---|
[24730] | 475 | </xsl:variable>
|
---|
| 476 | <script type="text/javascript">
|
---|
| 477 | <xsl:text>largeImageHeight =</xsl:text><xsl:value-of select="$imageHeight"/><xsl:text>;</xsl:text>
|
---|
| 478 | <xsl:text>largeImageWidth =</xsl:text><xsl:value-of select="$imageWidth"/><xsl:text>;</xsl:text>
|
---|
[24769] | 479 | <xsl:text>smallImageHeight =</xsl:text><xsl:value-of select="$screenImageHeight"/><xsl:text>;</xsl:text>
|
---|
| 480 | <xsl:text>smallImageWidth =</xsl:text><xsl:value-of select="$screenImageWidth"/><xsl:text>;</xsl:text>
|
---|
[24730] | 481 | </script>
|
---|
| 482 | <div id="noZoom" style="display:block;">
|
---|
[24802] | 483 | <img style="width: {$screenImageWidth}; height: {$screenImageHeight};">
|
---|
| 484 | <xsl:attribute name="src">
|
---|
| 485 | <xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<gsf:metadata select="root" name="assocfilepath"/>/<gsf:metadata name="Screen"/>
|
---|
| 486 | </xsl:attribute>
|
---|
| 487 | </img>
|
---|
| 488 | <!--
|
---|
[24730] | 489 | <gsf:metadata name="screenicon"/>
|
---|
[24802] | 490 | -->
|
---|
[24730] | 491 | </div>
|
---|
[24798] | 492 | <!--<xsl:if test="$imageHeight != -1">-->
|
---|
[24784] | 493 | <div id="wrap" style="display:none; width: {$screenImageWidth}; height: {$screenImageHeight};">
|
---|
[24802] | 494 | <div id="small" style="width: {$screenImageWidth}; height: {$screenImageHeight};">
|
---|
| 495 | <!--
|
---|
| 496 | <gsf:metadata name="screenicon"/>
|
---|
| 497 | -->
|
---|
| 498 | <img style="width: {$screenImageWidth}; height: {$screenImageHeight};">
|
---|
| 499 | <xsl:attribute name="src">
|
---|
| 500 | <xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<gsf:metadata select="root" name="assocfilepath"/>/<gsf:metadata name="Screen"/>
|
---|
| 501 | </xsl:attribute>
|
---|
| 502 | </img>
|
---|
| 503 | </div>
|
---|
[24769] | 504 | <div id="mover">
|
---|
| 505 | <div id="overlay"><xsl:text> </xsl:text></div>
|
---|
| 506 | <div id="large">
|
---|
| 507 | <img style="width: {$imageWidth}; height: {$imageHeight};">
|
---|
| 508 | <xsl:attribute name="src">
|
---|
[24802] | 509 | <xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<gsf:metadata select="root" name="assocfilepath"/>/<gsf:metadata name="srclinkFile"/>
|
---|
[24769] | 510 | </xsl:attribute>
|
---|
| 511 | </img>
|
---|
| 512 | </div>
|
---|
[24730] | 513 | </div>
|
---|
| 514 | </div>
|
---|
[24769] | 515 | <input type="button" value="Tag Photo!" style="margin-left:30px;" onclick="AddNote();" />
|
---|
[24798] | 516 | <!--</xsl:if>-->
|
---|
[24784] | 517 | </xsl:template>
|
---|
| 518 |
|
---|
[24730] | 519 | </format>
|
---|
| 520 | </display>
|
---|
[24556] | 521 | <replaceListRef id="gs2-standard"/>
|
---|
| 522 | <replaceListRef id="gs2-image"/>
|
---|
| 523 | <serviceRackList>
|
---|
| 524 | <!-- comment out the following serviceRack if you want to disable OAI for this collection -->
|
---|
| 525 | <serviceRack name="OAIPMH">
|
---|
| 526 | <ListMetadataFormats>
|
---|
| 527 | <!--What metadata sets to support is collection specific. To support other metadata schema, simply add a metadataFormat element here.
|
---|
| 528 | The support of unqualified Dublin Core metadata set is mandatory in the oai specification.
|
---|
| 529 | -->
|
---|
| 530 | <metadataFormat metadataPrefix="oai_dc">
|
---|
| 531 | <metadataPrefix>oai_dc</metadataPrefix>
|
---|
| 532 | <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</schema>
|
---|
| 533 | <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace>
|
---|
| 534 | <!--<metadataElements>dc.Title,dc.Creator,dc.Subject,dc.Description,dc.Publisher,dc.Contributor,dc.Date,dc.Type,dc.Format,dc.Identifier,dc.Source,dc.Language,dc.Relation,dc.Coverage,dc.Rights</metadataElements>
|
---|
| 535 | -->
|
---|
| 536 | <mappingList>
|
---|
| 537 | <!--
|
---|
| 538 | The mapping is in the form: <publicly supported metadata name>,<mapped metadata name>, short as <A>,<B>
|
---|
| 539 | The first metadata name is medatory; if there is no mapped name followed, then the first name must be used by the records and
|
---|
| 540 | searchable in the database, otherwise it is the mapped name stored in the database. The number of mapping elements matches the
|
---|
| 541 | number of external metadata of the records. If only one name is present, the returned metadata will use this name plus the retrieved value;
|
---|
| 542 | if both <A>,<B> are present, the returned metadata will use <A>'s name plus <B>'s value retrieved from database.
|
---|
| 543 |
|
---|
| 544 | **Bear in mind: if this mapping list is not present, the standard dc. metadata names (15 in total) will be used to retrieve metadata in the database.
|
---|
| 545 |
|
---|
| 546 | **The only case when this mapping is not present is that: 1. this metadata format is oai_dc; 2. the metadata is also stored in the database by Dublin Core's names.
|
---|
| 547 | -->
|
---|
| 548 | <mapping>dc.Title,Title</mapping>
|
---|
| 549 | <!-- This mapping example means that the dc.Title is requested and the value of the metadata Title, which is used in this repository, is returned as response. -->
|
---|
| 550 | </mappingList>
|
---|
| 551 | </metadataFormat>
|
---|
| 552 | </ListMetadataFormats>
|
---|
| 553 | </serviceRack>
|
---|
| 554 | </serviceRackList>
|
---|
| 555 | </CollectionConfig>
|
---|