diff --git a/browserSpecific/js/actions.js b/browserSpecific/js/actions.js
index bc55f1e..7f65881 100644
--- a/browserSpecific/js/actions.js
+++ b/browserSpecific/js/actions.js
@@ -1,8 +1,9 @@
let audioBeepElement, audioElementClapping;
let os = getMobileOperatingSystem();
+let nMobile = (os === "iOS" || os === "Android");
function browserStartBeep() {
- if (isBeepEnabled === "true" && !(os === "iOS" || os === "Android")) {
+ if (!nMobile) {
if (green === 1 || yellow === 1 || red === 1) {
audioBeepElement.play();
setTimeout(function() {
@@ -15,14 +16,13 @@ function browserStartBeep() {
}
function browserStartVibrate() {
- if (isVibrateEnabled === "true")
- if (green === 1 || yellow === 1 || red === 1)
- if (hasVibrator)
- navigator.vibrate(1000);
+ if (green === 1 || yellow === 1 || red === 1)
+ if (hasVibrator)
+ navigator.vibrate(1000);
}
function browserStartClapping() {
- if (isClappingEnabled === "true" && !(os == "iOS" || os == "Android")) {
+ if (!nMobile) {
audioElementClapping.play();
setTimeout(function() {
audioElementClapping.pause();
@@ -31,33 +31,19 @@ function browserStartClapping() {
}
function browserStopClapping() {
- if (!(os === "iOS" || os === "Android"))
+ if (!nMobile)
audioElementClapping.pause();
}
-if (!(os === "iOS" || os === "Android")) {
+if (!nMobile) {
audioBeepElement = document.createElement('audio');
- audioBeepElement.setAttribute('src', './browserSpecific/sounds/beep.mp3');
-
- audioBeepElement.addEventListener('ended', function() {
- this.play();
- }, false);
-
- audioBeepElement.addEventListener("canplay", function() {});
-
- audioBeepElement.addEventListener("timeupdate", function() {});
+ audioBeepElement.src = './browserSpecific/sounds/beep.mp3';
+ audioBeepElement.load();
audioElementClapping = document.createElement('audio');
- audioElementClapping.setAttribute('src', './browserSpecific/sounds/clapping.mp3');
+ audioElementClapping.src = './browserSpecific/sounds/clapping.mp3';
+ audioElementClapping.load();
- audioElementClapping.addEventListener('ended', function() {
- this.play();
- }, false);
-
- audioElementClapping.addEventListener("canplay", function() {});
-
- audioElementClapping.addEventListener("timeupdate", function() {});
-
btnVibrate.style.display = 'none';
btnShare.style.display = 'none';
btnEmail.style.display = 'none';
@@ -79,4 +65,4 @@ function browserExport() {
});
doc.save();
}, 250);
-}
+}
\ No newline at end of file
diff --git a/browserSpecific/js/actions.min.js b/browserSpecific/js/actions.min.js
index 02e3304..f5b3549 100644
--- a/browserSpecific/js/actions.min.js
+++ b/browserSpecific/js/actions.min.js
@@ -1 +1 @@
-let audioBeepElement,audioElementClapping,os=getMobileOperatingSystem();function browserStartBeep(){"true"!==isBeepEnabled||"iOS"===os||"Android"===os||(1===green||1===yellow||1===red?(audioBeepElement.play(),setTimeout(function(){audioBeepElement.pause()},500)):audioBeepElement.pause())}function browserStartVibrate(){"true"===isVibrateEnabled&&(1===green||1===yellow||1===red)&&hasVibrator&&navigator.vibrate(1e3)}function browserStartClapping(){"true"!==isClappingEnabled||"iOS"==os||"Android"==os||(audioElementClapping.play(),setTimeout(function(){audioElementClapping.pause()},1500))}function browserStopClapping(){"iOS"===os||"Android"===os||audioElementClapping.pause()}"iOS"===os||"Android"===os?(btnClap.style.display="none",btnBeep.style.display="none"):(audioBeepElement=document.createElement("audio"),audioBeepElement.setAttribute("src","./browserSpecific/sounds/beep.mp3"),audioBeepElement.addEventListener("ended",function(){this.play()},!1),audioBeepElement.addEventListener("canplay",function(){}),audioBeepElement.addEventListener("timeupdate",function(){}),audioElementClapping=document.createElement("audio"),audioElementClapping.setAttribute("src","./browserSpecific/sounds/clapping.mp3"),audioElementClapping.addEventListener("ended",function(){this.play()},!1),audioElementClapping.addEventListener("canplay",function(){}),audioElementClapping.addEventListener("timeupdate",function(){}),btnVibrate.style.display="none",btnShare.style.display="none",btnEmail.style.display="none",document.body.insertBefore(audioBeepElement,document.getElementById("snackbarMsg")),document.body.insertBefore(audioElementClapping,document.getElementById("snackbarMsg")));function browserExport(){showSnackbar(lngObject.lblExportMsg),setTimeout(function(){var a=new jsPDF("l","pt","a4"),b=a.autoTableHtmlToJson(document.getElementById("tblResults"));a.autoTable(b.columns,b.data,{startY:60}),a.save()},250)}
\ No newline at end of file
+let audioBeepElement,audioElementClapping,os=getMobileOperatingSystem(),nMobile="iOS"===os||"Android"===os;function browserStartBeep(){nMobile||(1===green||1===yellow||1===red?(audioBeepElement.play(),setTimeout(function(){audioBeepElement.pause()},500)):audioBeepElement.pause())}function browserStartVibrate(){(1===green||1===yellow||1===red)&&hasVibrator&&navigator.vibrate(1e3)}function browserStartClapping(){nMobile||(audioElementClapping.play(),setTimeout(function(){audioElementClapping.pause()},1500))}function browserStopClapping(){nMobile||audioElementClapping.pause()}nMobile?(btnClap.style.display="none",btnBeep.style.display="none"):(audioBeepElement=document.createElement("audio"),audioBeepElement.src="./browserSpecific/sounds/beep.mp3",audioBeepElement.load(),audioElementClapping=document.createElement("audio"),audioElementClapping.src="./browserSpecific/sounds/clapping.mp3",audioElementClapping.load(),btnVibrate.style.display="none",btnShare.style.display="none",btnEmail.style.display="none",document.body.insertBefore(audioBeepElement,document.getElementById("snackbarMsg")),document.body.insertBefore(audioElementClapping,document.getElementById("snackbarMsg")));function browserExport(){showSnackbar(lngObject.lblExportMsg),setTimeout(function(){var a=new jsPDF("l","pt","a4"),b=a.autoTableHtmlToJson(document.getElementById("tblResults"));a.autoTable(b.columns,b.data,{startY:60}),a.save()},250)}
\ No newline at end of file
diff --git a/browserSpecific/sounds/beep.mp3 b/browserSpecific/sounds/beep.mp3
index bebc61a..e65ef6d 100644
Binary files a/browserSpecific/sounds/beep.mp3 and b/browserSpecific/sounds/beep.mp3 differ
diff --git a/browserSpecific/sounds/clapping.mp3 b/browserSpecific/sounds/clapping.mp3
index 75a6b26..85361c8 100644
Binary files a/browserSpecific/sounds/clapping.mp3 and b/browserSpecific/sounds/clapping.mp3 differ
diff --git a/css/timer.css b/css/timer.css
index 4e088db..844c886 100644
--- a/css/timer.css
+++ b/css/timer.css
@@ -1,22 +1,22 @@
@import url('../css/roboto.font.css');
-
html {
- overflow-y: hidden;
- overflow-x: hidden;
+ overflow-y: hidden;
+ overflow-x: hidden;
}
-body, #superContainer {
- text-align: center;
- overflow-y: hidden;
- overflow-x: hidden;
+body,
+#superContainer {
+ text-align: center;
+ overflow-y: hidden;
+ overflow-x: hidden;
}
footer {
- position: fixed;
- left: 0;
- bottom: 0;
- width: 100%;
- text-align: center;
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ width: 100%;
+ text-align: center;
}
.favIcon {
@@ -28,70 +28,67 @@ footer {
}
.container {
- position: relative;
- top: 30px;
- width: 300px;
- margin: 0 auto;
+ position: relative;
+ top: 30px;
+ width: 300px;
+ margin: 0 auto;
}
.minutes-set {
- float: left;
- margin-right: 28px;
+ float: left;
+ margin-right: 28px;
}
-.seconds-set { float: right; }
-
-#controls {
- position: absolute;
- left: 32px;
- top: 105px;
- text-align: center;
+.seconds-set {
+ float: right;
}
.display-remain-time {
- font-family: 'Roboto';
- font-weight: 100;
- font-size: 65px;
- color: black;
+ font-family: 'Roboto';
+ font-weight: 100;
+ font-size: 65px;
+ color: black;
}
-#pause, .btnAction, .btnPopUp {
- outline: none;
- background: transparent;
- border: none;
- margin-top: 10px;
- width: 50px;
- height: 50px;
- position: relative;
+#pause,
+.btnAction,
+.btnPopUp {
+ outline: none;
+ background: transparent;
+ border: none;
+ margin-top: 10px;
+ width: 50px;
+ height: 50px;
+ position: relative;
}
@supports (-webkit-overflow-scrolling: touch) {
- .btnAction {
- font-size: xx-large;
- text-align: center;
- color: black;
- padding: 0px;
- }
- .btnClock {
- left: calc(100% - 32px) !important;
- }
+ .btnAction {
+ font-size: xx-large;
+ text-align: center;
+ color: black;
+ padding: 0px;
+ }
+ .btnClock {
+ left: calc(100% - 32px) !important;
+ }
}
@supports not (-webkit-overflow-scrolling: touch) {
- .btnAction {
- font-size: xx-large;
- text-align: center;
- color: black;
- }
- .btnClock{
- left: calc(100% - 28px) !important;
- }
+ .btnAction {
+ font-size: xx-large;
+ text-align: center;
+ color: black;
+ }
+ .btnClock {
+ left: calc(100% - 28px) !important;
+ }
}
.btnPopUp {
- font-size: x-large;
- text-align: center;
- color: black;
+ font-size: x-large;
+ text-align: center;
+ color: black;
}
.centeredText {
@@ -99,125 +96,93 @@ footer {
}
.play::before {
- display: block;
- content: "";
- position: absolute;
- top: 8px;
- left: 16px;
- border-top: 15px solid transparent;
- border-bottom: 15px solid transparent;
- border-left: 22px solid black;
+ display: block;
+ content: "";
+ position: absolute;
+ top: 8px;
+ left: 16px;
+ border-top: 15px solid transparent;
+ border-bottom: 15px solid transparent;
+ border-left: 22px solid black;
}
.pause::after {
- content: "";
- position: absolute;
- top: 8px;
- left: 12px;
- width: 15px;
- height: 30px;
- background-color: transparent;
- border-radius: 1px;
- border: 5px solid black;
- border-top: none;
- border-bottom: none;
+ content: "";
+ position: absolute;
+ top: 8px;
+ left: 12px;
+ width: 15px;
+ height: 30px;
+ background-color: transparent;
+ border-radius: 1px;
+ border: 5px solid black;
+ border-top: none;
+ border-bottom: none;
}
/*background-color: #E8E8E8; border-radius: 50%; */
-.pause:hover { opacity: 0.8; }
-
-.play:hover { opacity: 0.8; }
-
-.btnAction:hover { opacity: 0.8; }
-
-.btnPopUp:hover { opacity: 0.8; }
-
-.e-c-base {
- fill: none;
- stroke: #B6B6B6;
- stroke-width: 4px
-}
-
-.e-c-progress {
- fill: none;
- stroke: black;
- stroke-width: 4px;
- transition: stroke-dashoffset 0.7s;
+.pause:hover {
+ opacity: 0.8;
}
-.e-c-progress-white {
- fill: none;
- stroke: white;
- stroke-width: 4px;
- transition: stroke-dashoffset 0.7s;
+.play:hover {
+ opacity: 0.8;
}
-.e-c-pointer {
- fill: #FFF;
- stroke: black;
- stroke-width: 2px;
+.btnAction:hover {
+ opacity: 0.8;
}
-.e-c-pointer-white {
- fill: #FFF;
- stroke: white;
- stroke-width: 2px;
+.btnPopUp:hover {
+ opacity: 0.8;
}
-#e-pointer { transition: transform 0.7s; }
-
.closeMobile {
- font-size: 1.5em;
- margin-right: 32px;
+ font-size: 1.5em;
+ margin-right: 32px;
}
.titleContainer {
- height: 56px;
- box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
- transition: all 0.3s cubic-bezier(.25,.8,.25,1);
- margin-top: -14px;
- margin-left: -14px;
- margin-right: -14px;
- text-align: left;
+ height: 56px;
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
+ transition: all 0.3s cubic-bezier(.25, .8, .25, 1);
+ margin-top: -14px;
+ margin-left: -14px;
+ margin-right: -14px;
+ text-align: left;
}
.titleInnerContainer {
- padding-top: 16px;
- padding-left: 16px
-}
-
-#spanSave {
- float: right;
- margin-right: 16px;
- margin-top: -6px;
+ padding-top: 16px;
+ padding-left: 16px
}
.column {
- float: left;
- width: 33.33%;
+ float: left;
+ width: 33.33%;
}
.columnClap {
- float: left;
- width: 50%;
+ float: left;
+ width: 50%;
}
.row:after {
- content: "";
- display: table;
- clear: both;
+ content: "";
+ display: table;
+ clear: both;
}
.rowFull:after {
- content: "";
- display: table;
- clear: both;
+ content: "";
+ display: table;
+ clear: both;
}
.contestMode {
transform: scale(2);
- transform-origin: 25% 25% 0px;
+ transform-origin: 25% 25% 0px;
}
.hideTime {
@@ -226,7 +191,7 @@ footer {
.contestModeOff {
transform: scale(1);
- transform-origin: 0% 0% 0px;
+ transform-origin: 0% 0% 0px;
}
.showTime {
@@ -234,131 +199,182 @@ footer {
}
.mdl-data-table {
- table-layout:fixed;
- width:100%;
+ table-layout: fixed;
+ width: 100%;
}
-td, th, .mdl-data-table__cell--non-numeric {
- width: 100%;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- -o-text-overflow: ellipsis;
-}
-
-#remainTime{
- margin-top: 35px;
- margin-bottom: 20px;
+td,
+th,
+.mdl-data-table__cell--non-numeric {
+ width: 100%;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ -o-text-overflow: ellipsis;
}
-
+
.row {
- width: 80%;
- margin: auto;
+ width: 80%;
+ margin: auto;
}
.rowFull {
- padding-left: 5px;
- margin: auto;
+ padding-left: 5px;
+ margin: auto;
}
.hiddenObject {
- display: none;
+ display: none;
}
.minSizeCol {
- width: 1px;
+ width: 1px;
}
-.chkOpt{
- padding-left: 0px!important;
+.chkOpt {
+ padding-left: 0px!important;
}
.hCustom {
- margin: 24px 0 5px;
- padding-top: 5px;
+ margin: 24px 0 5px;
+ padding-top: 5px;
}
.centeredDialog {
- position: relative;
- top: 50%;
- transform: translateY(-50%);
+ position: relative;
+ top: 50%;
+ transform: translateY(-50%);
}
.customSections {
- margin-top: -22px;
+ margin-top: -22px;
}
.centeredDialogNoSupport {
- top: 50%;
- transform: translateY(-50%);
+ top: 50%;
+ transform: translateY(-50%);
}
.fullscreen-dialog {
- height: calc(100% - 28px) !important;
- width: calc(100% - 28px) !important;
- overflow-x: hidden;
- overflow-y: hidden;
+ height: calc(100% - 28px) !important;
+ width: calc(100% - 28px) !important;
+ overflow-x: hidden;
+ overflow-y: hidden;
}
.fullscreen-dialog-tablet {
- width: calc(85% - 28px) !important;
+ width: calc(85% - 28px) !important;
}
.fullscreen-dialog-desktop {
- width: calc(50% - 28px) !important;
+ width: calc(50% - 28px) !important;
}
-.customBodyMobile{
- height: 90%;
- overflow-y: auto;
+.customBodyMobile {
+ height: 90%;
+ overflow-y: auto;
}
.fakeTxt {
- width: 0px;
- height: 0px;
- outline: none;
- border: transparent;
+ width: 0px;
+ height: 0px;
+ outline: none;
+ border: transparent;
}
.fakeTxt:focus {
- outline: none;
+ outline: none;
+}
+
+.e-c-base {
+ fill: none;
+ stroke: #B6B6B6;
+ stroke-width: 4px
+}
+
+.e-c-progress {
+ fill: none;
+ stroke: black;
+ stroke-width: 4px;
+ transition: stroke-dashoffset 0.7s;
+}
+
+.e-c-progress-white {
+ fill: none;
+ stroke: white;
+ stroke-width: 4px;
+ transition: stroke-dashoffset 0.7s;
+}
+
+.e-c-pointer {
+ fill: #FFF;
+ stroke: black;
+ stroke-width: 2px;
}
-#options button{
- font-size: 3em;
+.e-c-pointer-white {
+ fill: #FFF;
+ stroke: white;
+ stroke-width: 2px;
+}
+
+#e-pointer {
+ transition: transform 0.7s;
}
#egTitle {
- color: #ff80ab;
- font-size: 4em!important;
+ color: #ff80ab;
+ font-size: 4em!important;
}
-#imgClap{
- margin-top: -8px;
- width: 36px;
+#options button {
+ font-size: 3em;
}
-#divSpeakers{
- overflow-y: auto;
+#imgClap {
+ margin-top: -8px;
+ width: 36px;
+}
+
+#divSpeakers {
+ overflow-y: auto;
}
#fakeContainer {
- position: absolute;
+ position: absolute;
}
#customMin {
- background: #60ad5e;
+ background: #60ad5e;
}
#customAvg {
- background: #ffeb3b;
+ background: #ffeb3b;
}
#customMax {
- background: #e53935;
+ background: #e53935;
}
#bodyAbout {
overflow-y: auto;
overflow-x: hidden;
}
+
+#remainTime {
+ margin-top: 35px;
+ margin-bottom: 20px;
+}
+
+#controls {
+ position: absolute;
+ left: 32px;
+ top: 105px;
+ text-align: center;
+}
+
+#spanSave {
+ float: right;
+ margin-right: 16px;
+ margin-top: -6px;
+}
\ No newline at end of file
diff --git a/index.html b/index.html
index c845035..bc48607 100755
--- a/index.html
+++ b/index.html
@@ -234,8 +234,8 @@
+
+
@@ -243,13 +243,13 @@
+
+
+
+
@@ -257,8 +257,8 @@
+
+
@@ -381,27 +381,27 @@
diff --git a/js/components/setTimeDialog.js b/js/components/setTimeDialog.js
index 605b36e..5741393 100644
--- a/js/components/setTimeDialog.js
+++ b/js/components/setTimeDialog.js
@@ -11,26 +11,38 @@ const btnSetTime = document.getElementById('btnSetTime'),
btnDownM = document.getElementById('btnDownH'),
btnDownH = document.getElementById('btnDownH');
-let btnUpSPressed = false, btnDownSPressed = false, btnUpMPressed = false, btnDownMPressed = false, btnUpHPressed = false, btnDownHPressed = false;
+let btnUpSPressed = false,
+ btnDownSPressed = false,
+ btnUpMPressed = false,
+ btnDownMPressed = false,
+ btnUpHPressed = false,
+ btnDownHPressed = false;
+
let chosenInputText = "";
-let i = 0, j = 0, k = 0, timeOutS = 0, timeOutM = 0, timeOutH = 0;
+
+let i = 0,
+ j = 0,
+ k = 0,
+ timeOutS = 0,
+ timeOutM = 0,
+ timeOutH = 0;
if (!dialogSetTime.showModal) {
dialogPolyfill.registerDialog(dialogSetTime);
}
-btnSetTime.addEventListener('click', function () {
+btnSetTime.addEventListener('click', function() {
document.getElementById(`${chosenInputText}`).parentElement.MaterialTextfield.change(`${txtH.value}:${txtM.value}:${txtS.value}`);
dialogSetTime.close();
});
-btnClearTime.addEventListener('click', function () {
+btnClearTime.addEventListener('click', function() {
setTimeControls('00', '00', '00');
clearIntervals();
enableButtons(false);
});
-dialogSetTime.querySelector('.close').addEventListener('click', function () {
+dialogSetTime.querySelector('.close').addEventListener('click', function() {
clearIntervals();
dialogSetTime.close();
});
@@ -82,7 +94,7 @@ function btnUpSContinuesPress() {
btnUpSPressed = true;
if (parseInt(txtS.value) > 0)
i = parseInt(txtS.value);
- timeOutS = setInterval(function () {
+ timeOutS = setInterval(function() {
i++;
if (i < 60)
txtS.value = `${i < 10 ? '0' : ''}${i}`;
@@ -141,7 +153,7 @@ function btnDownSContinuesPress() {
enableButtons(false);
if (parseInt(txtS.value) > 0)
i = parseInt(txtS.value);
- timeOutS = setInterval(function () {
+ timeOutS = setInterval(function() {
i--;
if (i >= 0)
txtS.value = `${i < 10 ? '0' : ''}${i}`;
@@ -176,7 +188,7 @@ function btnUpMContinuesPress() {
btnUpMPressed = true;
if (parseInt(txtM.value) > 0)
j = parseInt(txtM.value);
- timeOutM = setInterval(function () {
+ timeOutM = setInterval(function() {
j++;
if (j < 60)
txtM.value = `${j < 10 ? '0' : ''}${j}`;
@@ -223,7 +235,7 @@ function btnDownMContinuesPress() {
enableButtons(false);
if (parseInt(txtM.value) >= 0)
j = parseInt(txtM.value);
- timeOutM = setInterval(function () {
+ timeOutM = setInterval(function() {
j--;
if (j >= 0)
txtM.value = `${j < 10 ? '0' : ''}${j}`;
@@ -258,7 +270,7 @@ function btnUpHContinuesPress() {
btnUpHPressed = true;
if (parseInt(txtH.value) > 0)
k = parseInt(txtH.value);
- timeOutH = setInterval(function () {
+ timeOutH = setInterval(function() {
k++;
if (k === 100) {
setTimeControls('99', '59', '59');
@@ -289,7 +301,7 @@ function btnDownHContinuesPress() {
enableButtons(false);
if (parseInt(txtH.value) > 0)
k = parseInt(txtH.value);
- timeOutH = setInterval(function () {
+ timeOutH = setInterval(function() {
k--;
if (k >= 0)
txtH.value = `${k < 10 ? '0' : ''}${k}`;
@@ -342,7 +354,9 @@ function setNewTime(inputText, currentTxt) {
openSetDialog(currentTxt);
try {
dialogSetTime.showModal();
- } catch (e) { console.log(e); }
+ } catch (e) {
+ console.log(e);
+ }
}
function clearIntervals() {
@@ -358,4 +372,4 @@ function enableButtons(disabled) {
btnUpS.disabled = disabled;
btnUpM.disabled = disabled;
btnUpH.disabled = disabled;
-}
+}
\ No newline at end of file
diff --git a/js/db/customDBActions.js b/js/db/customDBActions.js
index 03f0f0a..17a3e54 100644
--- a/js/db/customDBActions.js
+++ b/js/db/customDBActions.js
@@ -10,7 +10,7 @@ function setDbConf() {
function getSelectedIDs() {
let ids = [];
- Array.from(document.getElementsByClassName("chkChoose")).forEach(function (element) {
+ Array.from(document.getElementsByClassName("chkChoose")).forEach(function(element) {
if (element.matches('.is-checked'))
ids.push(parseInt(element.querySelectorAll('input')[0].id.replace("chk", "")));
});
@@ -31,21 +31,21 @@ function countTimetable() {
}
function hideCheckBoxes() {
- Array.from(document.getElementsByClassName("tdDel")).forEach(function (element) {
+ Array.from(document.getElementsByClassName("tdDel")).forEach(function(element) {
element.style.display = 'none';
});
document.getElementById('thDel').classList.add('hiddenObject');
}
function showCheckBoxes() {
- Array.from(document.getElementsByClassName("tdDel")).forEach(function (element) {
+ Array.from(document.getElementsByClassName("tdDel")).forEach(function(element) {
element.style.display = 'block';
});
document.getElementById('thDel').classList.remove('hiddenObject');
}
function printTable() {
- let speakersBody = document.getElementById('speakers');
+ let speakersBody = document.getElementById('speakers');
speakersBody.innerHTML = '';
results = [];
@@ -109,8 +109,8 @@ function printTable() {
}
function addCheckTaps() {
- Array.from(document.querySelectorAll('[id^=chk]')).forEach(function (element) {
- element.addEventListener('change', function () {
+ Array.from(document.querySelectorAll('[id^=chk]')).forEach(function(element) {
+ element.addEventListener('change', function() {
document.getElementById('lblTickAll').MaterialCheckbox.uncheck();
});
});
diff --git a/js/db/dbHandler.js b/js/db/dbHandler.js
index 6304429..3c3fdf1 100644
--- a/js/db/dbHandler.js
+++ b/js/db/dbHandler.js
@@ -4,17 +4,17 @@ window.indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndex
function dbConn() {
//Request db creation if it doesn't exist
let request = window.indexedDB.open("tmTimerDB", 1);
- request.onerror = function (evt) {
+ request.onerror = function(evt) {
console.log("Database error code: " + evt.target.errorCode);
};
- request.onsuccess = function () {
+ request.onsuccess = function() {
db = request.result;
//Clear all data from the previous meeting
if (isNewMeeting())
clearTimetable();
else {
let transaction = db.transaction(["timeTable"], "readonly").objectStore("timeTable").count();
- transaction.onsuccess = function () {
+ transaction.onsuccess = function() {
if (transaction.result === 0)
restoreData();
};
@@ -22,32 +22,52 @@ function dbConn() {
};
//Create tables
- request.onupgradeneeded = function (evt) {
- let objectStore = evt.currentTarget.result.createObjectStore("timeTable", { keyPath: "id", autoIncrement: true });
- objectStore.createIndex("member", "member", { unique: false });
- objectStore.createIndex("role", "role", { unique: false });
- objectStore.createIndex("min", "min", { unique: false });
- objectStore.createIndex("opt", "opt", { unique: false });
- objectStore.createIndex("max", "max", { unique: false });
- objectStore.createIndex("time", "time", { unique: false });
- objectStore.createIndex("lastColor", "lastColor", { unique: false });
- objectStore.createIndex("disqualified", "disqualified", { unique: false });
+ request.onupgradeneeded = function(evt) {
+ let objectStore = evt.currentTarget.result.createObjectStore("timeTable", {
+ keyPath: "id",
+ autoIncrement: true
+ });
+ objectStore.createIndex("member", "member", {
+ unique: false
+ });
+ objectStore.createIndex("role", "role", {
+ unique: false
+ });
+ objectStore.createIndex("min", "min", {
+ unique: false
+ });
+ objectStore.createIndex("opt", "opt", {
+ unique: false
+ });
+ objectStore.createIndex("max", "max", {
+ unique: false
+ });
+ objectStore.createIndex("time", "time", {
+ unique: false
+ });
+ objectStore.createIndex("lastColor", "lastColor", {
+ unique: false
+ });
+ objectStore.createIndex("disqualified", "disqualified", {
+ unique: false
+ });
};
}
function initializeDB(currentVersion, latestVersion) {
if (latestVersion !== currentVersion) {
- try { window.indexedDB.deleteDatabase("tmTimerDB"); }
- catch (e) { }
+ try {
+ window.indexedDB.deleteDatabase("tmTimerDB");
+ } catch (e) {}
}
dbConn();
}
function clearTimetable() {
var objectStoreRequest = db.transaction(["timeTable"], "readwrite").objectStore("timeTable").clear();
- objectStoreRequest.onsuccess = function() {
- saveData();
- };
+ objectStoreRequest.onsuccess = function() {
+ saveData();
+ };
}
//This function is for verifying if it's the current meeting or a new one
@@ -56,8 +76,7 @@ function isNewMeeting() {
if (getLocalStorageValue("meetingDate") === null) {
setLocalStorage("meetingDate", currentDate);
return true;
- }
- else if (getLocalStorageValue("meetingDate") !== currentDate) {
+ } else if (getLocalStorageValue("meetingDate") !== currentDate) {
removeLocalStorage("meetingDate");
setLocalStorage("meetingDate", currentDate);
return true;
@@ -67,7 +86,16 @@ function isNewMeeting() {
function addNewTime(member, role, min, opt, max, time, lastColor, disqualified) {
if (time !== 'Invalid date') {
- let objectStoreRequest = db.transaction(["timeTable"], "readwrite").objectStore("timeTable").add({ member: member, role: role, min: min, opt: opt, max: max, time: time, lastColor: lastColor, disqualified: disqualified });
+ let objectStoreRequest = db.transaction(["timeTable"], "readwrite").objectStore("timeTable").add({
+ member: member,
+ role: role,
+ min: min,
+ opt: opt,
+ max: max,
+ time: time,
+ lastColor: lastColor,
+ disqualified: disqualified
+ });
objectStoreRequest.onsuccess = function(event) {
saveData();
showSnackbar(lngObject.recorded);
@@ -78,7 +106,7 @@ function addNewTime(member, role, min, opt, max, time, lastColor, disqualified)
function restoreData() {
if (moment((new Date())).format("YYYY/MM/DD") === getLocalStorageValue("backUpDate")) {
for (let item in JSON.parse(`[${getLocalStorageValue("backUpTT")}]`))
- addNewTime(item.member, item.role, item.min, item.opt, item.max, item.time, item.lastColor, item.disqualified);
+ addNewTime(item.member, item.role, item.min, item.opt, item.max, item.time, item.lastColor, item.disqualified);
}
}
@@ -86,7 +114,7 @@ function saveData() {
let transaction = db.transaction(["timeTable"], "readwrite").objectStore("timeTable").openCursor();
let data = [];
- transaction.onsuccess = function (evt) {
+ transaction.onsuccess = function(evt) {
let cursor = evt.target.result;
if (cursor) {
data.push(JSON.stringify(cursor.value));
diff --git a/js/functions/genericActions.js b/js/functions/genericActions.js
index fdfd817..6fdbb6b 100644
--- a/js/functions/genericActions.js
+++ b/js/functions/genericActions.js
@@ -28,7 +28,7 @@ function showSnackbar(msg, tout = 1500) {
}
function refreshControls() {
- setTimeout(function () {
+ setTimeout(function() {
componentHandler.upgradeAllRegistered();
}, 10);
}
\ No newline at end of file
diff --git a/js/lib/translate.js b/js/lib/translate.js
index 281e0c0..163cf87 100644
--- a/js/lib/translate.js
+++ b/js/lib/translate.js
@@ -1,41 +1,41 @@
let langs = ["en", "es"];
let lngObject;
-function load(){
+function load() {
let translate = new Translate();
let lang = navigator.language || navigator.userLanguage;
if (!langs.includes(lang))
lang = "en";
translate.init(lang);
- translate.process();
+ translate.process();
}
function Translate() {
//initialization
- this.init = function(lng){
+ this.init = function(lng) {
this.attribute = "data-tag";
this.lng = lng;
}
//translate
- this.process = function(){
- _self = this;
- fetch("./js/lang/"+this.lng+".json")
- .then((response) => {
- response.json().then((data) => {
- lngObject = data;
- let allDom = document.getElementsByTagName("*");
- for(let i =0; i < allDom.length; i++){
- let elem = allDom[i];
- let key = elem.getAttribute(_self.attribute);
-
- if(key != null) {
- //console.log(key);
- elem.innerHTML = lngObject[key];
- }
- }
- });
- })
- .catch((err) => { });
- }
+ this.process = function() {
+ _self = this;
+ fetch("./js/lang/" + this.lng + ".json")
+ .then((response) => {
+ response.json().then((data) => {
+ lngObject = data;
+ let allDom = document.getElementsByTagName("*");
+ for (let i = 0; i < allDom.length; i++) {
+ let elem = allDom[i];
+ let key = elem.getAttribute(_self.attribute);
+
+ if (key != null) {
+ //console.log(key);
+ elem.innerHTML = lngObject[key];
+ }
+ }
+ });
+ })
+ .catch((err) => {});
+ }
}
\ No newline at end of file
diff --git a/js/timer.js b/js/timer.js
index fb6a2dc..47c4005 100644
--- a/js/timer.js
+++ b/js/timer.js
@@ -49,7 +49,7 @@ const displayOutput = document.querySelector('.display-remain-time'),
// Detects if device is on iOS
const isIos = () => {
const userAgent = window.navigator.userAgent.toLowerCase();
- return /iphone|ipad|ipod/.test( userAgent );
+ return /iphone|ipad|ipod/.test(userAgent);
}
// Detects if device is in standalone mode
const isInStandaloneMode = () => ('standalone' in window.navigator) && (window.navigator.standalone);
@@ -262,7 +262,7 @@ window.onresize = function() {
};
function resizeScreen() {
- let scaleVal = window.innerHeight / 600;
+ let scaleVal = window.innerHeight / 600;
if (window.innerHeight < 514) {
if (externalContainer === null) {
let bodyTmp = document.body;
@@ -276,9 +276,9 @@ function resizeScreen() {
externalContainer.style.height = `${window.innerHeight}px`;
sContainer.style.transformOrigin = "50% 0% 0px";
- setTimeout(function () {
+ setTimeout(function() {
sContainer.style.transform = `scale(${scaleVal})`;
- setTimeout(function () {
+ setTimeout(function() {
let cHeight = (1 + scaleVal) * window.innerHeight;
if (cHeight < 514)
cHeight = 514;
@@ -290,11 +290,11 @@ function resizeScreen() {
sContainer.style.height = `${window.innerHeight}px`;
sContainer.style.transformOrigin = "50% 0% 0px";
- setTimeout(function () {
+ setTimeout(function() {
sContainer.style.transform = `scale(${scaleVal})`;
}, 100);
- setTimeout(function () {
+ setTimeout(function() {
if (cmbSpeechType.getBoundingClientRect().width > window.outerWidth)
sContainer.style.transform = `scale(${scaleVal - (scaleVal - cmbSpeechType.getBoundingClientRect().width / window.outerWidth)})`;
}, 100);
@@ -319,8 +319,7 @@ function resizeSelect() {
multiplier = 2;
mdlMenu.style.clip = `${res[0]}, ${300 * multiplier}px, ${300 * multiplier}px, ${res[3]}`;
- }
- catch (e) {}
+ } catch (e) {}
}, 50);
}
@@ -372,9 +371,9 @@ function pauseTimer() {
fade.to(document.getElementsByClassName('circle')[0], fastTransition, 0);
}
} else {
- btnRestart.innerHTML = "";
+ btnRestart.innerHTML = "";
unfadeElements();
- }
+ }
}
function unfadeElements() {
@@ -398,7 +397,7 @@ function displayTimeLeft(timeLeft) { //displays time on the input
function setDropDownValue(idVal, idContainer) {
try {
- document.getElementById(idVal).dataset.selected = "true";
+ document.getElementById(idVal).dataset.selected = "true";
getmdlSelect.init(idContainer);
} catch (e) {}
}
@@ -431,16 +430,14 @@ function changeEventHandler() {
setLocalStorage("wholeTime", maximum);
updateDisplay();
isCustom = false;
- }
- else {
+ } else {
if (!wasCustom) {
minimum = 0;
maximum = 0;
average = 0;
txtCustom.parentElement.MaterialTextfield.change(lngObject.opt12);
- }
- else if (wasCustom && !isFirstTime) {
+ } else if (wasCustom && !isFirstTime) {
setCustomText();
let hours = Math.floor(minimum / 3600);
@@ -463,7 +460,7 @@ function changeEventHandler() {
}
if (deviceDetector.device === 'phone') {
- setTimeout(function () {
+ setTimeout(function() {
let bCustomTimes = document.getElementById('bodyCustomTimes');
bCustomTimes.style.height = `${bCustomTimes.clientHeight * 100 / window.innerHeight}%`;
}, 100);
@@ -477,24 +474,20 @@ function changeEventHandler() {
function startBeep() {
if (isBeepEnabled && (green === 1 || yellow === 1 || red === 1))
browserStartBeep();
- //CSharp.Beep();
}
function startVibrate() {
if (isVibrateEnabled && (green === 1 || yellow === 1 || red === 1))
browserStartVibrate();
- //CSharp.Vibrate();
}
function startClapping() {
if (isClappingEnabled)
browserStartClapping();
- //CSharp.StartClapping();
}
function stopClapping() {
browserStopClapping();
- //CSharp.StopClapping();
}
function getVibrate() {
@@ -630,7 +623,7 @@ function storeTime(isTimeStored) {
maximum = getMaxCustom();
wholeTime = maximum;
- unfadeElements();
+ unfadeElements();
}
function getMinCustom() {
@@ -805,10 +798,10 @@ btnEmail.addEventListener('click', function() {});
btnAbout.addEventListener('click', function() {
dialogAbout.showModal();
if (deviceDetector.device === 'phone') {
- setTimeout(function(){
- dialogAbout.style.height = `${dialogAbout.innerHeight * 100 / window.outerHeight}%`;
- }, 100);
- }
+ setTimeout(function() {
+ dialogAbout.style.height = `${dialogAbout.innerHeight * 100 / window.outerHeight}%`;
+ }, 100);
+ }
});
txtMin.addEventListener('click', function() {
@@ -826,15 +819,15 @@ txtAvg.addEventListener('click', function() {
btnDownload.addEventListener('click', browserExport);
btnMultiple.addEventListener('click', function() {
- Array.from(document.getElementsByClassName("mdl-js-checkbox")).forEach(function (element) {
+ Array.from(document.getElementsByClassName("mdl-js-checkbox")).forEach(function(element) {
let _this = element;
- setTimeout(function () {
+ setTimeout(function() {
_this.MaterialCheckbox.check();
}, 10);
});
if (!multipleEnabled) {
btnMultiple.innerHTML = "";
- showCheckBoxes();
+ showCheckBoxes();
} else {
btnMultiple.innerHTML = "";
hideCheckBoxes();
@@ -910,155 +903,154 @@ invertColors();
setTimeout(function() {
if (deviceDetector.device == 'phone') {
- //Timetable Dialog
- let timeTableTmp = document.getElementById('timeTable');
- let divTitleContainerTmp = document.createElement("div");
- divTitleContainerTmp.className = "titleContainer";
+ //Timetable Dialog
+ let timeTableTmp = document.getElementById('timeTable');
+ let divTitleContainerTmp = document.createElement("div");
+ divTitleContainerTmp.className = "titleContainer";
- let divTitleInnerContainer = document.createElement("div");
- divTitleInnerContainer.className = "titleInnerContainer";
+ let divTitleInnerContainer = document.createElement("div");
+ divTitleInnerContainer.className = "titleInnerContainer";
- let spanCloseMobile = document.createElement("span");
- spanCloseMobile.className = "closeMobile";
- spanCloseMobile.id = 'btnCloseMobile';
+ let spanCloseMobile = document.createElement("span");
+ spanCloseMobile.className = "closeMobile";
+ spanCloseMobile.id = 'btnCloseMobile';
- let spanCloseIcon = document.createElement("span");
- spanCloseIcon.className = "mdi mdi-close";
+ let spanCloseIcon = document.createElement("span");
+ spanCloseIcon.className = "mdi mdi-close";
- let spanTitle = document.createElement("span");
- spanTitle.id = 'spanTitle';
+ let spanTitle = document.createElement("span");
+ spanTitle.id = 'spanTitle';
- spanCloseMobile.appendChild(spanCloseIcon);
+ spanCloseMobile.appendChild(spanCloseIcon);
- divTitleInnerContainer.appendChild(spanCloseMobile);
- divTitleInnerContainer.appendChild(spanTitle);
+ divTitleInnerContainer.appendChild(spanCloseMobile);
+ divTitleInnerContainer.appendChild(spanTitle);
- divTitleContainerTmp.appendChild(divTitleInnerContainer);
+ divTitleContainerTmp.appendChild(divTitleInnerContainer);
- timeTableTmp.insertBefore(divTitleContainerTmp, timeTableTmp.firstChild);
+ timeTableTmp.insertBefore(divTitleContainerTmp, timeTableTmp.firstChild);
- titleMeeting = document.getElementById('titleMeeting');
- titleMeeting.classList.remove('mdl-dialog__title');
- titleMeeting.style.margin = '0';
- titleMeeting.style.marginTop = '16px';
- titleMeeting.style.fontWeight = 1000;
- titleMeeting.style.fontSize = '1.25em';
- titleMeeting.style.display = 'inline';
+ titleMeeting = document.getElementById('titleMeeting');
+ titleMeeting.classList.remove('mdl-dialog__title');
+ titleMeeting.style.margin = '0';
+ titleMeeting.style.marginTop = '16px';
+ titleMeeting.style.fontWeight = 1000;
+ titleMeeting.style.fontSize = '1.25em';
+ titleMeeting.style.display = 'inline';
- document.getElementById('spanTitle').append(titleMeeting);
+ document.getElementById('spanTitle').append(titleMeeting);
- document.getElementById('btnCloseMeeting').style.display = 'none';
+ document.getElementById('btnCloseMeeting').style.display = 'none';
- document.getElementById('btnCloseMobile').addEventListener('click', function () {
- dialogTimeTable.close();
- });
-
- //Custom Dialog
- let customTimesTmp = document.getElementById('customTimes');
- let divTitleContainerCT = document.createElement("div");
- divTitleContainerCT.className = "titleContainer";
+ document.getElementById('btnCloseMobile').addEventListener('click', function() {
+ dialogTimeTable.close();
+ });
- let divTitleInnerContainerCT = document.createElement("div");
- divTitleInnerContainerCT.className = "titleInnerContainer";
+ //Custom Dialog
+ let customTimesTmp = document.getElementById('customTimes');
+ let divTitleContainerCT = document.createElement("div");
+ divTitleContainerCT.className = "titleContainer";
- let spanCloseMobileCT = document.createElement("span");
- spanCloseMobileCT.className = "closeMobile";
- spanCloseMobileCT.id = 'btnCloseMobileCustom';
+ let divTitleInnerContainerCT = document.createElement("div");
+ divTitleInnerContainerCT.className = "titleInnerContainer";
- let spanCloseIconCT = document.createElement("span");
- spanCloseIconCT.className = "mdi mdi-close";
+ let spanCloseMobileCT = document.createElement("span");
+ spanCloseMobileCT.className = "closeMobile";
+ spanCloseMobileCT.id = 'btnCloseMobileCustom';
- let spanTitleCT = document.createElement("span");
- spanTitleCT.id = 'spanTitleCustom';
+ let spanCloseIconCT = document.createElement("span");
+ spanCloseIconCT.className = "mdi mdi-close";
- let customTitleCT = document.createElement("h4");
- customTitleCT.innerHTML = ' ';
- customTitleCT.id = 'customTitle';
+ let spanTitleCT = document.createElement("span");
+ spanTitleCT.id = 'spanTitleCustom';
- let spanSaveCT = document.createElement("span");
- spanSaveCT.id = 'spanSave';
+ let customTitleCT = document.createElement("h4");
+ customTitleCT.innerHTML = ' ';
+ customTitleCT.id = 'customTitle';
- spanCloseMobileCT.appendChild(spanCloseIconCT);
- spanTitleCT.appendChild(customTitleCT);
+ let spanSaveCT = document.createElement("span");
+ spanSaveCT.id = 'spanSave';
- divTitleInnerContainerCT.appendChild(spanCloseMobileCT);
- divTitleInnerContainerCT.appendChild(spanTitleCT);
- divTitleInnerContainerCT.appendChild(spanSaveCT);
+ spanCloseMobileCT.appendChild(spanCloseIconCT);
+ spanTitleCT.appendChild(customTitleCT);
- divTitleContainerCT.appendChild(divTitleInnerContainerCT);
+ divTitleInnerContainerCT.appendChild(spanCloseMobileCT);
+ divTitleInnerContainerCT.appendChild(spanTitleCT);
+ divTitleInnerContainerCT.appendChild(spanSaveCT);
- customTimesTmp.insertBefore(divTitleContainerCT, customTimesTmp.firstChild);
+ divTitleContainerCT.appendChild(divTitleInnerContainerCT);
- let customTitleTmp = document.getElementById('customTitle');
- customTitleTmp.classList.remove('mdl-dialog__title');
- customTitleTmp.style.margin = '0';
- customTitleTmp.style.marginTop = '16px';
- customTitleTmp.style.fontWeight = 1000;
- customTitleTmp.style.fontSize = '1.25em';
- customTitleTmp.style.display = 'inline';
+ customTimesTmp.insertBefore(divTitleContainerCT, customTimesTmp.firstChild);
- document.getElementById('btnCloseMobileCustom').addEventListener('click', function () {
- closeCustomDialog();
- });
+ let customTitleTmp = document.getElementById('customTitle');
+ customTitleTmp.classList.remove('mdl-dialog__title');
+ customTitleTmp.style.margin = '0';
+ customTitleTmp.style.marginTop = '16px';
+ customTitleTmp.style.fontWeight = 1000;
+ customTitleTmp.style.fontSize = '1.25em';
+ customTitleTmp.style.display = 'inline';
- document.getElementById('spanSave').appendChild(document.getElementById('btnSave'));
+ document.getElementById('btnCloseMobileCustom').addEventListener('click', function() {
+ closeCustomDialog();
+ });
- document.getElementById('footerCustom').style.display = 'none';
- document.getElementById('btnCloseCustom').style.display = 'none';
+ document.getElementById('spanSave').appendChild(document.getElementById('btnSave'));
- //About
- let aboutDialogAD = document.getElementById('aboutDialog');
- let divTitleContainerAD = document.createElement("div");
- divTitleContainerAD.className = "titleContainer";
+ document.getElementById('footerCustom').style.display = 'none';
+ document.getElementById('btnCloseCustom').style.display = 'none';
- let divTitleInnerContainerAD = document.createElement("div");
- divTitleInnerContainerAD.className = "titleInnerContainer";
+ //About
+ let aboutDialogAD = document.getElementById('aboutDialog');
+ let divTitleContainerAD = document.createElement("div");
+ divTitleContainerAD.className = "titleContainer";
- let spanCloseMobileAD = document.createElement("span");
- spanCloseMobileAD.className = "closeMobile";
- spanCloseMobileAD.id = 'btnCloseMobileAbout';
+ let divTitleInnerContainerAD = document.createElement("div");
+ divTitleInnerContainerAD.className = "titleInnerContainer";
- let spanCloseIconAD = document.createElement("span");
- spanCloseIconAD.className = "mdi mdi-close";
+ let spanCloseMobileAD = document.createElement("span");
+ spanCloseMobileAD.className = "closeMobile";
+ spanCloseMobileAD.id = 'btnCloseMobileAbout';
- let spanTitleAD = document.createElement("span");
- spanTitleAD.id = 'spanTitleAbout';
+ let spanCloseIconAD = document.createElement("span");
+ spanCloseIconAD.className = "mdi mdi-close";
- spanCloseMobileAD.appendChild(spanCloseIconAD);
+ let spanTitleAD = document.createElement("span");
+ spanTitleAD.id = 'spanTitleAbout';
- divTitleInnerContainerAD.appendChild(spanCloseMobileAD);
- divTitleInnerContainerAD.appendChild(spanTitleAD);
+ spanCloseMobileAD.appendChild(spanCloseIconAD);
- divTitleContainerAD.appendChild(divTitleInnerContainerAD);
+ divTitleInnerContainerAD.appendChild(spanCloseMobileAD);
+ divTitleInnerContainerAD.appendChild(spanTitleAD);
- aboutDialogAD.insertBefore(divTitleContainerAD, aboutDialogAD.firstChild);
+ divTitleContainerAD.appendChild(divTitleInnerContainerAD);
- document.getElementById('btnCloseMobileAbout').addEventListener('click', function () {
- dialogAbout.close();
- });
+ aboutDialogAD.insertBefore(divTitleContainerAD, aboutDialogAD.firstChild);
- let titleAboutAD = document.getElementById('titleAbout');
- titleAboutAD.classList.remove('mdl-dialog__title');
- titleAboutAD.style.margin = '0';
- titleAboutAD.style.marginTop = '16px';
- titleAboutAD.style.fontWeight = 1000;
- titleAboutAD.style.fontSize = '1.25em';
- titleAboutAD.style.display = 'inline';
+ document.getElementById('btnCloseMobileAbout').addEventListener('click', function() {
+ dialogAbout.close();
+ });
- document.getElementById('spanTitleAbout').append(titleAboutAD);
+ let titleAboutAD = document.getElementById('titleAbout');
+ titleAboutAD.classList.remove('mdl-dialog__title');
+ titleAboutAD.style.margin = '0';
+ titleAboutAD.style.marginTop = '16px';
+ titleAboutAD.style.fontWeight = 1000;
+ titleAboutAD.style.fontSize = '1.25em';
+ titleAboutAD.style.display = 'inline';
- document.getElementById('divCloseAbout').style.display = 'none';
+ document.getElementById('spanTitleAbout').append(titleAboutAD);
+
+ document.getElementById('divCloseAbout').style.display = 'none';
}
- let exit = 0;
- do {
- setTimeout(function() {
+ let exit = 0;
+ do {
+ setTimeout(function() {
try {
titleMeeting.innerHTML = `${lngObject.meetingAt} ${moment().format(dateFormat)}`;
- }
- catch (e) {}
- }, 1000);
- exit++;
- } while (lngObject === undefined && exit < 5);
+ } catch (e) {}
+ }, 1000);
+ exit++;
+ } while (lngObject === undefined && exit < 5);
}, 100);
if (isFirstRun) {
@@ -1068,9 +1060,9 @@ if (isFirstRun) {
checkMode();
tickAll.addEventListener('change', (event) => {
- Array.from(document.querySelectorAll(".mdl-js-checkbox:not(#lblTickAll)")).forEach(function (element) {
+ Array.from(document.querySelectorAll(".mdl-js-checkbox:not(#lblTickAll)")).forEach(function(element) {
let _this = element;
- setTimeout(function () {
+ setTimeout(function() {
if (lblTickAll.matches('.is-checked'))
_this.MaterialCheckbox.check();
else
@@ -1081,9 +1073,9 @@ tickAll.addEventListener('change', (event) => {
});
(function() {
-
- btnShare.style.display = 'none';
- btnEmail.style.display = 'none';
+
+ btnShare.style.display = 'none';
+ btnEmail.style.display = 'none';
isFirstTime = true;
@@ -1092,16 +1084,15 @@ tickAll.addEventListener('change', (event) => {
dialogTimeTable.classList.add('fullscreen-dialog-tablet');
dialogAbout.classList.add('centeredDialog');
dialogAbout.classList.add('fullscreen-dialog-tablet');
- document.getElementById('divSpeakers').style.height = `${document.body.clientHeight * 0.53}px`;
- }
- else if (deviceDetector.device === 'tablet') {
+ document.getElementById('divSpeakers').style.height = `${document.body.clientHeight * 0.53}px`;
+ } else if (deviceDetector.device === 'tablet') {
dialogTimeTable.classList.add('centeredDialog-tablet');
dialogTimeTable.classList.add('fullscreen-dialog-tablet');
dialogAbout.classList.add('centeredDialog');
dialogAbout.classList.add('fullscreen-dialog-tablet');
document.getElementById('divSpeakers').style.height = `${document.body.clientHeight * 0.53}px`;
} else {
- dialogCustomTimes.classList.add('customBodyMobile');
+ dialogCustomTimes.classList.add('customBodyMobile');
if (window.innerHeight < 514 && window.innerWidth > window.innerHeight)
document.getElementById('divSpeakers').style.height = `${document.body.clientHeight * 0.60}px`;
else
@@ -1113,32 +1104,32 @@ tickAll.addEventListener('change', (event) => {
}
if (typeof HTMLDialogElement !== 'function') {
- dialogWelcome.classList.remove('centeredDialog');
+ dialogWelcome.classList.remove('centeredDialog');
dialogWelcome.classList.add('centeredDialogNoSupport');
- dialogSetTime.classList.remove('centeredDialog');
- dialogSetTime.classList.add('centeredDialogNoSupport');
- dialogTimeTable.classList.remove('centeredDialog');
- dialogTimeTable.classList.add('centeredDialogNoSupport');
- dialogAbout.classList.remove('centeredDialog');
- dialogAbout.classList.add('centeredDialogNoSupport');
+ dialogSetTime.classList.remove('centeredDialog');
+ dialogSetTime.classList.add('centeredDialogNoSupport');
+ dialogTimeTable.classList.remove('centeredDialog');
+ dialogTimeTable.classList.add('centeredDialogNoSupport');
+ dialogAbout.classList.remove('centeredDialog');
+ dialogAbout.classList.add('centeredDialogNoSupport');
dialogAbout.classList.add('fullscreen-dialog');
}
- window.addEventListener("focus", function () {
+ window.addEventListener("focus", function() {
if (document.querySelector('.mdl-menu__outline').style.zIndex !== "-1")
resizeSelect();
});
-
+
if (browserResult.browser.name === '2345Explorer' || browserResult.browser.name === 'IE' || browserResult.browser.name === 'IEMobile')
alert('Unsupported Browser. Please download a modern browser like Chrome or Firefox');
-
+
setTimeout(function() {
// Checks if should display install popup notification:
if (isIos() && !isInStandaloneMode())
showSnackbar(lngObject.installiOS, 3000);
}, 1000);
-
+
})();
resizeScreen();
@@ -1146,7 +1137,7 @@ resizeScreen();
function hideKeyboard(element) {
element.readOnly = true;
setTimeout(function() {
- element.blur(); //actually close the keyboard
+ element.blur(); //actually close the keyboard
element.readOnly = false;
}, 100);
}
@@ -1155,4 +1146,4 @@ window.addEventListener('orientationchange', doOnOrientationChange);
function doOnOrientationChange() {
location.reload();
-}
+}
\ No newline at end of file