Skip to content

Commit

Permalink
Issue #156
Browse files Browse the repository at this point in the history
  • Loading branch information
bkop-ds committed Nov 28, 2023
1 parent 3796645 commit 4f16320
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
12 changes: 12 additions & 0 deletions confluence.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ import { footerTemplate } from "./src/components/footer.js";
import { renderDescription, renderDescriptionNotSignedIn } from "./src/pages/description.js";
import { dataDictionaryTemplate } from "./src/pages/dictionary.js";
import { showPreview } from "./src/components/boxPreview.js";
import { confluenceEventsPage, eventsBody } from './src/pages/events.js';

/**
* 1. add Scientifix comitte to menu
Expand Down Expand Up @@ -662,6 +663,17 @@ const manageHash = async () => {
confluenceResources();
hideAnimation();
}
else if(hash === '#events/meetings') {
const element = document.getElementById('events');
if(!element) return;
if(element.classList.contains('navbar-active')) return;
assignNavbarActive(element, 1);
document.title = 'Confluence - Events';
showAnimation();
confluenceDiv.innerHTML = confluenceEventsPage();
await eventsBody();
hideAnimation();
}
// else if (hash === "#contact") {
// const element = document.getElementById("contactBCRPP");
// if (!element) return;
Expand Down
8 changes: 8 additions & 0 deletions src/components/navBarMenuItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ export const navBarMenutemplate = () => {
<a class="dropdown-item nav-link nav-menu-links dropdown-menu-links pl-4" href="https://github.com/Breast-Cancer-Risk-Prediction-Project" target="_blank" id="BCRPP_github">BCRPP GitHub</a>
</div>
</div>
<div class="grid-elements dropdown">
<button class="nav-link nav-menu-links dropdown-toggle dropdown-btn white-font" title="Confluence" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Events
</button>
<div class="dropdown-menu navbar-dropdown" aria-labelledby="navbarDropdown">
<a class="dropdown-item nav-link nav-menu-links dropdown-menu-links" href="#events/meetings" id="events">Meetings</a>
</div>
</div>
<div class="grid-elements dropdown">
<button class="nav-link nav-menu-links dropdown-toggle dropdown-btn white-font" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Explore Data
Expand Down
9 changes: 1 addition & 8 deletions src/pages/dataRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
showCommentsDropDown,
getChairApprovalDate,
uploadFile,
filePreviewer
} from "../shared.js";
import { addEventToggleCollapsePanelBtn } from "./description.js";
import { showPreview } from "../components/boxPreview.js";
Expand Down Expand Up @@ -1450,14 +1451,6 @@ const addEventPreviewFile = () => {
});
};

export const filePreviewer = (fileId, divId) => {
const access_token = JSON.parse(localStorage.parms).access_token;
const preview = new Box.Preview();
preview.show(fileId, access_token, {
container: divId,
});
};

export const daccSection = (activeTab) => {
let authChair =
emailforChair.indexOf(JSON.parse(localStorage.parms).login) !== -1;
Expand Down
9 changes: 9 additions & 0 deletions src/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -1884,6 +1884,15 @@ export const handleRangeRequests = async () => {
});
};

export const filePreviewer = (fileId, divId) => {
const access_token = JSON.parse(localStorage.parms).access_token;
const preview = new Box.Preview();
preview.show(fileId, access_token, {
container: divId
});

}

export const applicationURLs = {
dev: "https://episphere.github.io/bcrpDataPlatform",
stage: "https://epidataplatforms-stage.cancer.gov/bcrp",
Expand Down

0 comments on commit 4f16320

Please sign in to comment.