From 991a54976a8d320afcef13b19e4689cb86687c8e Mon Sep 17 00:00:00 2001 From: Gerome Matilla Date: Sat, 6 Jun 2020 19:05:39 +0800 Subject: [PATCH] rename disableinput function --- js/animate-dashboard.js | 8 ++++---- js/web-menu.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/js/animate-dashboard.js b/js/animate-dashboard.js index 39ab4d0..633977f 100644 --- a/js/animate-dashboard.js +++ b/js/animate-dashboard.js @@ -4,7 +4,7 @@ var dashboardOverlay = document.getElementById("dashboardOverlay"); let rightDashboardVisibility = false; // Disable/Enable inputs -var disableAllInputs = (status) => { +var disableDashboardInputs = (status) => { var elems = dashboard.getElementsByTagName('input'); var len = elems.length; @@ -20,7 +20,7 @@ const showDashboard = () => { dashboardOverlay.classList.add('showDashboardOverlay'); // Enable Inputs - disableAllInputs(false); + disableDashboardInputs(false); rightDashboardVisibility = !rightDashboardVisibility; } @@ -30,7 +30,7 @@ const hideDashboard = () => { dashboard.scrollTop = 0; // Disable Inputs - disableAllInputs(true); + disableDashboardInputs(true); // Hide overlay dashboardOverlay.classList.remove('showDashboardOverlay'); @@ -93,4 +93,4 @@ dashboardOverlay.addEventListener( // Disable dashboard inputs on startup -window.onload = disableAllInputs(true); \ No newline at end of file +window.onload = disableDashboardInputs(true); \ No newline at end of file diff --git a/js/web-menu.js b/js/web-menu.js index 351506d..ce6e30d 100644 --- a/js/web-menu.js +++ b/js/web-menu.js @@ -9,7 +9,7 @@ let webItemFocus; let webListIndex = 0; // Disable/Enable inputs -var disableAllInputs = (status) => { +var disableWebMenuInputs = (status) => { var elems = webMenu.getElementsByTagName('input'); var len = elems.length; @@ -184,7 +184,7 @@ const showWebMenu = () => { webMenu.classList.add('showWebMenu'); // Enable inputs - disableAllInputs(false); + disableWebMenuInputs(false); webMenuVisibility = !webMenuVisibility; @@ -214,7 +214,7 @@ const hideWebMenu = () => { webMenu.classList.remove('showWebMenu'); // Disable inputs - disableAllInputs(true); + disableWebMenuInputs(true); webMenuVisibility = !webMenuVisibility; } @@ -367,7 +367,7 @@ const initWebMenu = () => { getFirstItem(); // Disable inputs - disableAllInputs(true); + disableWebMenuInputs(true); } // Initialize web menu