Commit 1238d972 by Jorem Magcawas

Merge branch 'feature-feedbackfix' into 'development'

Feature feed-back fix merge to development See merge request !21
parents d957e5b3 1d835085
window.onclick = (event) => {
if (event.path[0].id == 'pause') {
disableForm();
}
if (event.path[0].id == 'continue') {
enableForm();
}
}
function disableForm() {
var element = document.getElementById("TiffViewer_ButtonContainer");
element.style.visibility = 'hidden';
}
function enableForm() {
var element = document.getElementById("TiffViewer_ButtonContainer");
element.style.visibility = 'visible';
}
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
<link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@300&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Ubuntu:wght@300&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" /> <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
<script src="./config.js"></script> <script src="./config.js"></script>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" <script src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
...@@ -30,14 +30,14 @@ ...@@ -30,14 +30,14 @@
</head> </head>
<script> <script>
if(sessionStorage.getItem('user_id') === null ) { if (sessionStorage.getItem('user_id') === null) {
window.location.href = "./login.html"; window.location.href = "./login.html";
} else { } else {
fetchConfig(); fetchConfig();
} }
</script> </script>
<!-- <script> <!-- <script>
window.onload = function () { window.onload = function () {
window.indexedDB.deleteDatabase("ImageDatabase"); window.indexedDB.deleteDatabase("ImageDatabase");
...@@ -70,8 +70,9 @@ ...@@ -70,8 +70,9 @@
<div id='pauseBtn'> <div id='pauseBtn'>
<button id='pause'>Pause</button> <button id='pause'>Pause</button>
</div> </div>
<form id='fields' style="display: flex; flex-direction:column;" onsubmit="submitForm(event);return false"></form> <form id='fields' autocomplete="off" style="display: flex; flex-direction:column;"
onsubmit="submitForm(event);return false"></form>
<div id="counter"></div> <div id="counter"></div>
</aside> </aside>
<!-- Embed viewer --> <!-- Embed viewer -->
...@@ -88,7 +89,7 @@ ...@@ -88,7 +89,7 @@
<div id="TiffViewerModal"> <div id="TiffViewerModal">
<!-- Modal content --> <!-- Modal content -->
<div class="TiffModalContent"> <div class="TiffModalContent">
<div class="bar"> <div class="bar">
...@@ -148,6 +149,7 @@ ...@@ -148,6 +149,7 @@
</script> </script>
<script src="./src/endSession/endSession.js"></script> <script src="./src/endSession/endSession.js"></script>
<script src="./src/tiffViewer/tiffViewer.js"></script> <script src="./src/tiffViewer/tiffViewer.js"></script>
<script src="./src/highlight/highlight.js"></script> <script src="./disable.js"></script>
<!-- <script src="./src/highlight/highlight.js"></script> -->
</html> </html>
\ No newline at end of file
record_no,filename,speed,eoe_timestamp,avg_speed record_no,filename,speed,eoe_timestamp,avg_speed
1,0001SVI_0005.tif,5817.8106659862215,10/5/2022 8:45:10 AM,5817.8106659862215 1,0001SVI_0004.tif,993.2382007734232,10/5/2022 3:07:22 PM,993.2382007734232
2,0001SVI_0004.tif,5461.165048543689,10/5/2022 8:45:22 AM,5639.487857264956 \ No newline at end of file
3,0001SVI_0006.tif,7064.017660044151,10/5/2022 8:45:37 AM,6114.331124858021
4,0001SVI_0007.tif,8726.459071415251,10/5/2022 8:45:50 AM,6767.363111497329
5,0001SVI_0008.tif,2627.6093620748384,10/5/2022 8:46:12 AM,5939.412361612831
6,0001SVI_0009.tif,198.992214982345,10/5/2022 8:53:46 AM,4982.67567050775
7,0001SVI_0019.tif,5804.579168010318,10/5/2022 8:53:57 AM,5100.09045586526
8,0001SVI_0022.tif,292.5877763328999,10/5/2022 8:58:33 AM,4499.1526209237145
9,0001SVI_0025.tif,6424.399740428294,10/5/2022 8:58:51 AM,4713.068967535334
\ No newline at end of file
...@@ -65,7 +65,6 @@ const startMetricCapture = () => { ...@@ -65,7 +65,6 @@ const startMetricCapture = () => {
window.onclick = (event) => { window.onclick = (event) => {
if (event.path[0].id == 'pause') { if (event.path[0].id == 'pause') {
console.log("im paused");
pauseMetricCapture(); pauseMetricCapture();
} }
} }
...@@ -102,7 +101,7 @@ const showMetricCapture = () => { ...@@ -102,7 +101,7 @@ const showMetricCapture = () => {
let time_spent = ((Date.now() - time_start) / 1000) - time_pause_spent; let time_spent = ((Date.now() - time_start) / 1000) - time_pause_spent;
let rate = ((key_strokes / time_spent) * 3600).toFixed(0); let rate = ((key_strokes / time_spent) * 3600).toFixed(0);
rate >= ALLOWED_KPH ? obj.className = "green" : obj.className = "red"; rate >= ALLOWED_KPH ? obj.className = "green" : obj.className = "red";
obj.innerHTML = rate + " kph"; // immediately apply start value obj.innerHTML = (rate < 0 ? 0 : rate) + " kph"; // immediately apply start value
} }
interval = setTimeout(showMetricCapture, 1000); interval = setTimeout(showMetricCapture, 1000);
} }
...@@ -203,6 +202,7 @@ function promptPaused() { ...@@ -203,6 +202,7 @@ function promptPaused() {
message.innerHTML = 'Session Paused'; message.innerHTML = 'Session Paused';
var okButton = document.createElement('button'); var okButton = document.createElement('button');
okButton.setAttribute("id", "continue");
okButton.innerHTML = 'continue'; okButton.innerHTML = 'continue';
okButton.onclick = function () { okButton.onclick = function () {
promptMain.style.display = 'none'; promptMain.style.display = 'none';
......
...@@ -98,6 +98,10 @@ const displayFields = async (parentID) => { ...@@ -98,6 +98,10 @@ const displayFields = async (parentID) => {
}); });
dropdowns.on('select2:close', handleDropdown) dropdowns.on('select2:close', handleDropdown)
}) })
// upon enbaling highligh.js moved to highlight.js file
$(document).ready(function () {
$('form:first *:input[type!=hidden]:first').focus(); // Run code
});
} catch(err) { } catch(err) {
console.log(err) console.log(err)
...@@ -143,7 +147,7 @@ const inputString = (key, validation) => { ...@@ -143,7 +147,7 @@ const inputString = (key, validation) => {
const input = document.createElement('input') const input = document.createElement('input')
input.setAttribute('id', `${key}`) input.setAttribute('id', `${key}`)
input.setAttribute('type', 'text') input.setAttribute('type', 'text')
input.setAttribute('autocomplete', 'on') input.setAttribute('autocomplete', 'off')
input.addEventListener('focusout', handleInput) input.addEventListener('focusout', handleInput)
fieldLength ? input.setAttribute('maxLength', `${fieldLength}`) : null fieldLength ? input.setAttribute('maxLength', `${fieldLength}`) : null
...@@ -172,7 +176,7 @@ const inputNumeric = (key, validation) => { ...@@ -172,7 +176,7 @@ const inputNumeric = (key, validation) => {
const input = document.createElement('input') const input = document.createElement('input')
input.setAttribute('id', `${key}`) input.setAttribute('id', `${key}`)
input.setAttribute('type', 'text') input.setAttribute('type', 'text')
input.setAttribute('autocomplete', 'on') input.setAttribute('autocomplete', 'off')
input.setAttribute('pattern', '[0-9/-]+') input.setAttribute('pattern', '[0-9/-]+')
input.addEventListener('focusout', handleInput) input.addEventListener('focusout', handleInput)
......
...@@ -616,6 +616,6 @@ function TIFFViewer(xhr, TiffViewerImageName) { ...@@ -616,6 +616,6 @@ function TIFFViewer(xhr, TiffViewerImageName) {
div.scrollTop += 20; div.scrollTop += 20;
} }
}); });
initHighlight(); // initHighlight();
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment