Skip to content

Commit

Permalink
Merge pull request #14 from oncokb/release-v4
Browse files Browse the repository at this point in the history
Release SOP v4
  • Loading branch information
zhx828 authored May 30, 2024
2 parents 409a892 + f316289 commit e00ef40
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@
<span id="current-version-span"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="previousVersionDropdown">
<li><a class="dropdown-item" href="#" value="v4.0">Version 4.0</a></li>
<li><a class="dropdown-item" href="#" value="v3.1">Version 3.1</a></li>
<li><a class="dropdown-item" href="#" value="v3">Version 3</a></li>
<li><a class="dropdown-item" href="#" value="v3.0">Version 3.0</a></li>
<li><a class="dropdown-item" href="#" value="v2.2">Version 2.2</a></li>
<li><a class="dropdown-item" href="#" value="v2.1">Version 2.1</a></li>
<li><a class="dropdown-item" href="#" value="v2">Version 2</a></li>
<li><a class="dropdown-item" href="#" value="v2.0">Version 2.0</a></li>
<li><a class="dropdown-item" href="#" value="v1.1">Version 1.1</a></li>
</ul>
</div>
Expand All @@ -46,7 +47,7 @@
})

// get the version from url
let version = 'v3.1';
let version = 'v4';
if (window.location.search && window.location.search.length > 1) {
const versionParams = window.location.search.slice(1).split("&").filter(function (item) {
return item.startsWith("version=")
Expand All @@ -60,23 +61,27 @@
}

const sopFileName = {
'v4': 'OncoKB_Curation_Standard_Operating_Procedure_v4.pdf',
'v3.1': 'OncoKB_Curation_Standard_Operating_Procedure_v3_1.pdf',
'v3': 'OncoKB_Curation_Standard_Operating_Procedure_v3.pdf',
'v3.0': 'OncoKB_Curation_Standard_Operating_Procedure_v3.pdf',
'v2.2': 'OncoKB_Curation_Standard_Operating_Procedure_v2_2.pdf',
'v2.1': 'OncoKB_Curation_Standard_Operating_Procedure_v2_1.pdf',
'v2': 'OncoKB_Curation_Standard_Operating_Procedure_v2.pdf',
'v2.0': 'OncoKB_Curation_Standard_Operating_Procedure_v2.pdf',
'v1.1': 'OncoKB_Curation_Standard_Operating_Protocol_v1_1.pdf',
};

// show PDF
document.addEventListener("adobe_dc_view_sdk.ready", function () {
$('#current-version-span').text('Version ' + version.slice(1));

let fileNameKey = version;
if (version.endsWith('.0')) {
fileNameKey = version.substring(0, version.lastIndexOf('.0'));
}
const adobeDCView = new AdobeDC.View({clientId: "021af7308f8f45e486c2e021a38de8d8", divId: "adobe-dc-view"});
adobeDCView.previewFile({
content: {location: {url: sopFileName[version]}},
metaData: {fileName: sopFileName[version]}
content: {location: {url: sopFileName[fileNameKey]}},
metaData: {fileName: sopFileName[fileNameKey]}
}, {defaultViewMode: "FIT_PAGE", dockPageControls: false});
});
</script>
Expand Down
Binary file not shown.

0 comments on commit e00ef40

Please sign in to comment.