Changeset 37061 for gs3-installations


Ignore:
Timestamp:
2022-12-25T18:18:36+13:00 (16 months ago)
Author:
davidb
Message:

gotoPage CGI param added in; JS code updated to add in a section number to openannotation-list.json URL to correctly handle newer situation of very canvas/page needing to have its own separate annotation-list JSON file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes/js/document_viewer.js

    r37055 r37061  
    297297function createMirador3Viewer()
    298298{
     299    var doc_url = new URL(window.location);
     300    var goto_page = doc_url.searchParams.get('gotoPage') || 1;
     301
     302    var canvas_index = goto_page -1;
    299303   
    300304    var mirador3_config = {
     
    304308        }
    305309    },
    306     "window" : { "panels" : { "annotations": true, "attribution": true } },
     310    "window" : { "panels": { "annotations": true, "attribution": true },
     311             "defaultSideBarPanel": "annotations",
     312             "sideBarOpenByDefault": true           
     313           },
    307314
    308315    //"annotations": {
     
    328335        {
    329336        "loadedManifest": "https://intermuse.sowemustthink.space/greenstone3/sample-manifest.json",
    330         "canvasIndex": 0,
     337        "canvasIndex": canvas_index,
    331338        "thumbnailNavigationPosition": 'far-bottom'
    332339        }
     
    460467
    461468    var assocfilepath = gs.documentMetadata['assocfilepath'];
     469
     470    var simple_doc_type = (gs.documentMetadata.docType == "simple");
    462471   
    463472    for (var i=0; i<iiif_doc_images.length; i++) {
     
    471480    var iiifimg_y_dim = iiif_doc_image.y_dim;
    472481    var iiifimg_label = iiif_doc_image.chosen_title;
     482
     483    var opt_section = (simple_doc_type) ? "" : section;
    473484   
    474485    var iiif_canvas = {
     
    485496                {
    486497                    //"@id": "https://iiif.harvardartmuseums.org/manifests/object/299843/list/47174896",
    487             "@id": "https://intermuse.sowemustthink.space/greenstone3/library/sites/intermuse/collect/programmes/index/assoc/"+assocfilepath+"/openannotation-list.json",
     498            "@id": "https://intermuse.sowemustthink.space/greenstone3/library/sites/intermuse/collect/programmes/index/assoc/"+assocfilepath+"/openannotation-list"+opt_section+".json",
    488499                    "@type": "sc:AnnotationList"
    489500                }
Note: See TracChangeset for help on using the changeset viewer.