Skip to content

Commit

Permalink
Merge pull request #927 from gbengaoluwadahunsi/labellingHtml-W3C
Browse files Browse the repository at this point in the history
Labelling html updated to W3C standards
  • Loading branch information
birm authored Apr 1, 2024
2 parents f15f334 + 2cdc75a commit dca6889
Showing 1 changed file with 81 additions and 79 deletions.
160 changes: 81 additions & 79 deletions apps/labeling/labeling.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,57 +37,57 @@
</script>

<!-- message queue js -->
<script type='text/javascript' src='../../components/messagequeue/messagequeue.js'></script>
<script type='text/javascript' src='../../components/camessage/camessage.js'></script>
<script type='text/javascript' src='../../components/loading/loading.js' ></script>
<script type='text/javascript' src='../../components/toolbar/toolbar.js' ></script>
<script src='../../components/messagequeue/messagequeue.js'></script>
<script src='../../components/camessage/camessage.js'></script>
<script src='../../components/loading/loading.js' ></script>
<script src='../../components/toolbar/toolbar.js' ></script>
<!-- modalbox -->
<script type='text/javascript' src='../../components/modalbox/modalbox.js'></script>
<script type='text/javascript' src='../../common/colorpicker/color-picker.js' ></script>
<script type='text/javascript' src='../../common/FileSaver.min.js' ></script>
<script type='text/javascript' src='../../common/jszip.min.js' ></script>
<script src='../../components/modalbox/modalbox.js'></script>
<script src='../../common/colorpicker/color-picker.js' ></script>
<script src='../../common/FileSaver.min.js' ></script>
<script src='../../common/jszip.min.js' ></script>
<!-- open seadragon lib-->
<script type='text/javascript' src='../../core/openseadragon/openseadragon.js' ></script>
<script type='text/javascript' src='../../core/openseadragon-imaginghelper.min.js'></script>
<script type='text/javascript' src='../../core/openseadragon-scalebar.js'></script>
<script type='text/javascript' src='../../core/openseadragonzoomlevels.js'></script>
<script src='../../core/openseadragon/openseadragon.js' ></script>
<script src='../../core/openseadragon-imaginghelper.min.js'></script>
<script src='../../core/openseadragon-scalebar.js'></script>
<script src='../../core/openseadragonzoomlevels.js'></script>

<!-- util.js -->
<script type='text/javascript' src='../../common/util.js'></script>
<script src='../../common/util.js'></script>
<!-- core (package/ext) libs -->
<script type='text/javascript' src='../../common/DrawHelper.js'></script>
<script type='text/javascript' src='../../common/simplify.js'></script>
<script type='text/javascript' src='../../common/paths.js'></script>
<script type='text/javascript' src='../../common/ajv.js'></script>
<script src='../../common/DrawHelper.js'></script>
<script src='../../common/simplify.js'></script>
<script src='../../common/paths.js'></script>
<script src='../../common/ajv.js'></script>
<!-- IDB helper -->
<script type='text/javascript' src='../../common/idb.js'></script>
<script type='text/javascript' src='../../core/StatesHelper.js'></script>
<script type='text/javascript' src='../../core/Validation.js'></script>
<script type='text/javascript' src='../../core/Store.js'></script>
<script type='text/javascript' src='../../core/CaMic.js'></script>
<script type='text/javascript' src='../../core/extension/openseadragon-canvas-draw-overlay.js'></script>
<script type='text/javascript' src='../../core/extension/openseadragon-overlays-manage.js'></script>
<script type='text/javascript' src='../../core/extension/openseadragon-measurement-tool/openseadragon-measurement-tool.js'></script>
<script type='text/javascript' src='../../core/extension/openseadragon-zoom-control/openseadragon-zoom-control.js'></script>
<script type='text/javascript' src='../../core/extension/openseadragon-labeling/openseadragon-labeling.js'></script>
<script src='../../common/idb.js'></script>
<script src='../../core/StatesHelper.js'></script>
<script src='../../core/Validation.js'></script>
<script src='../../core/Store.js'></script>
<script src='../../core/CaMic.js'></script>
<script src='../../core/extension/openseadragon-canvas-draw-overlay.js'></script>
<script src='../../core/extension/openseadragon-overlays-manage.js'></script>
<script src='../../core/extension/openseadragon-measurement-tool/openseadragon-measurement-tool.js'></script>
<script src='../../core/extension/openseadragon-zoom-control/openseadragon-zoom-control.js'></script>
<script src='../../core/extension/openseadragon-labeling/openseadragon-labeling.js'></script>
<!-- init data -->

<!-- ods js -->
<!-- <script src='./js/uicallbacks.js'></script> -->
<!-- <script src='./js/dataloaders.js'></script> -->
<script type='text/javascript' src='../../common/PathdbMods.js'></script>
<script type='text/javascript' src='../../common/LocalStore.js'></script>
<script type='text/javascript' src='../../common/NanoBorbMods.js'></script>
<script type='text/javascript' src='../../common/dynamicLoadScript.js'></script>
<script type='text/javascript' src='./labeling.js'></script>
<script src='../../common/PathdbMods.js'></script>
<script src='../../common/LocalStore.js'></script>
<script src='../../common/NanoBorbMods.js'></script>
<script src='../../common/dynamicLoadScript.js'></script>
<script src='./labeling.js'></script>

<!-- Popper & tippy -->
<script src="https://unpkg.com/@popperjs/core@2"></script>
<script src="https://unpkg.com/tippy.js@6"></script>

<!-- Smartpen -->
<script type="text/javascript" src="../../common/enhance.js"></script>
<script type="text/javascript" src="../../common/smartpen/autoalign.js"></script>
<script src="../../common/enhance.js"></script>
<script src="../../common/smartpen/autoalign.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="../../common/smartpen/autoalign.css"/>
<!-- Smartpen end -->

Expand All @@ -99,50 +99,52 @@
<div id = 'ca_tools'></div>
<div id='modalbox'></div>
<div id ='main_viewer' class='main'></div>
</body>
<script type="text/javascript">
if(detectIE()){
createWarningText('You are using an <strong>IE/Edge</strong> browser that may be lead to erratic behavior on caMicroscope. Please switch to <a href="https://www.google.com/chrome/">Chrome</a>, <a href="https://www.mozilla.org/en-US/firefox/new/">Firefox</a> or <a href="https://www.apple.com/safari/">Safari</a> browser to improve your experience.');
}

Loading.open(document.body, 'CaMicroscope Is Initializing...');
// get slide id from url
const url = new URL(window.location.href);
$D.params = getUrlVars();

// no slide Id error
if($D.params && $D.params.slideId){
// normal initialization starts
document.addEventListener('DOMContentLoaded', initialize);
}else if ($D.params && ($D.params.slide || $D.params.specimen ||$D.params.study || $D.params.location)){
let STORE = new Store()
STORE.findSlide($D.params.slide, $D.params.study, $D.params.specimen, $D.params.location).then(x=>{
let offset = parseInt($D.params.offset,10) || 0;
if(x.length == 0 || offset >= x.length){
redirect($D.pages.table,'No Slide Found. Redirecting To Table.');
} else {
newParams = $D.params
delete newParams.data
delete newParams.slide
delete newParams.location
delete newParams.offset
newParams.slideId = x[offset]['_id']['$oid']
newUrl = window.location.href.split("?")[0] + "?" + objToParamStr(newParams)
window.location.href = newUrl
}
}).catch(e=>{
console.warn(e)
redirect($D.pages.table,'Redirecting To Table.');
})
// find the associated slideID
// open viewer with that slideID
}else{
redirect($D.pages.table,'Slide Id Is Undefined. Redirecting To Flex Table.');
}

// get states parameters
if($D.params.states){
$D.params.states = StatesHelper.decodeStates($D.params.states);
}
</script>
<script type="text/javascript">
if(detectIE()){
createWarningText('You are using an <strong>IE/Edge</strong> browser that may be lead to erratic behavior on caMicroscope. Please switch to <a href="https://www.google.com/chrome/">Chrome</a>, <a href="https://www.mozilla.org/en-US/firefox/new/">Firefox</a> or <a href="https://www.apple.com/safari/">Safari</a> browser to improve your experience.');
}

Loading.open(document.body, 'CaMicroscope Is Initializing...');
// get slide id from url
const url = new URL(window.location.href);
$D.params = getUrlVars();

// no slide Id error
if($D.params && $D.params.slideId){
// normal initialization starts
document.addEventListener('DOMContentLoaded', initialize);
}else if ($D.params && ($D.params.slide || $D.params.specimen ||$D.params.study || $D.params.location)){
let STORE = new Store()
STORE.findSlide($D.params.slide, $D.params.study, $D.params.specimen, $D.params.location).then(x=>{
let offset = parseInt($D.params.offset,10) || 0;
if(x.length == 0 || offset >= x.length){
redirect($D.pages.table,'No Slide Found. Redirecting To Table.');
} else {
newParams = $D.params
delete newParams.data
delete newParams.slide
delete newParams.location
delete newParams.offset
newParams.slideId = x[offset]['_id']['$oid']
newUrl = window.location.href.split("?")[0] + "?" + objToParamStr(newParams)
window.location.href = newUrl
}
}).catch(e=>{
console.warn(e)
redirect($D.pages.table,'Redirecting To Table.');
})
// find the associated slideID
// open viewer with that slideID
}else{
redirect($D.pages.table,'Slide Id Is Undefined. Redirecting To Flex Table.');
}

// get states parameters
if($D.params.states){
$D.params.states = StatesHelper.decodeStates($D.params.states);
}
</script>
</body>

</html>

0 comments on commit dca6889

Please sign in to comment.