Skip to content

Commit

Permalink
Merge pull request #40 from kwheelan/28-fringe-calcs
Browse files Browse the repository at this point in the history
Dynamic fringe updates
  • Loading branch information
kwheelan authored Jul 23, 2024
2 parents cfba306 + f151ba4 commit 3cd6f10
Show file tree
Hide file tree
Showing 15 changed files with 293 additions and 246 deletions.
194 changes: 0 additions & 194 deletions index.html

This file was deleted.

8 changes: 4 additions & 4 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>

<!-- JS excel library -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.17.4/xlsx.full.min.js"></script>

</head>

<body>

<!-- Page header -->
Expand Down Expand Up @@ -71,14 +70,16 @@ <h3 id="prompt"></h3>
<!-- </form> -->
</div>

<!-- Placeholder for tooltip -->
<div id="tooltip"></div>

<!-- Add new row button -->
<div class="row">
<div id='add-btn-div'>
<button class="btn btn-add" id="add-btn"></button>
</div>
</div>


<!-- Summary page accordion -->
<div id='accordion-div'>
<div id='baseline-accordion' class="summary-container">
Expand All @@ -100,7 +101,6 @@ <h3 id="supp-title" class="accordion-title">
</div>
</div>


<!-- Navigation buttons -->
<div class="row">
<div class="col-md-12">
Expand Down
6 changes: 4 additions & 2 deletions src/js/components/body/body.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import './body.css';

import Welcome from '../../components/welcome/welcome.js'
import { Accordion } from '../accordion/accordion.js';
import { FileUpload } from '../file_upload/file_upload.js';
import Accordion from '../accordion/accordion.js';
import FileUpload from '../file_upload/file_upload.js';
import Modal from '../modal/modal.js';
import NavButtons from '../nav_buttons/nav_buttons.js';
import Prompt from '../prompt/prompt.js';
import Sidebar from '../sidebar/sidebar.js';
import Table from '../table/table.js';
import Tooltip from '../tooltip/tooltip.js';

function resetPage() {
// hide everything in the body
Expand All @@ -20,6 +21,7 @@ function resetPage() {
Sidebar.hide();
Accordion.hide();
FileUpload.hide();
Tooltip.hide();
// disable next button
NavButtons.Next.disable();
Prompt.Buttons.reset();
Expand Down
4 changes: 3 additions & 1 deletion src/js/components/file_upload/file_upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,6 @@ function readXL(event) {
};
reader.readAsArrayBuffer(file); // Read the file as an ArrayBuffer
}
}
}

export default FileUpload;
7 changes: 6 additions & 1 deletion src/js/components/table/subcomponents/cells.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ function getCellValue(row, className) {
// return text in cell
function getCellText(row, className) {
var cell = row.querySelector(`.${className}`);
return cell.textContent;
if (cell) {
return cell.textContent;
} else {
//console.log(`Error retrieving cell text for class ${className}`);
return '';
}
}

function updateTableCell(row, col_class, new_value){
Expand Down
4 changes: 3 additions & 1 deletion src/js/components/table/subcomponents/columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ function assignColumnClasses(columnDefinitions) {
}

// show the column
showColumnByTitle(column.title);
if (!column.hide){
showColumnByTitle(column.title);
}
});
}

Expand Down
37 changes: 37 additions & 0 deletions src/js/components/tooltip/tooltip.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#tooltip {
position: absolute;
background-color: black;
color: white;
padding: 5px;
border-radius: 3px;
visibility: hidden;
white-space: nowrap;
font-size: 14px;
z-index: 1000;
max-width: 300px;
word-wrap: break-word;
white-space: normal;
}

.tooltip-cell {
/* color: blue; */
/* text-decoration: underline; */
cursor: pointer;
}

.tooltip-cell .info-icon {
margin-left: 5px;
color: var(--spiritgreen);
font-size: 15px;
}

.tooltip-cell:hover {
background-color: #f0f0f0; /* Change background on hover */
}

.detail {
color: blue;
color: var(--spiritgreen);
text-decoration: underline;
margin-left: 5px;
}
Loading

0 comments on commit 3cd6f10

Please sign in to comment.