Replaced the traditional function expressions with ES6 arrow function expressions in the JavaScript for the transaction order, account order, currency form, and the speed dial for the material floating action buttons.

This commit is contained in:
imacat committed 2023-03-04 11:52:45 +08:00
1 parent a895bd8560
commit 641315537d
4 files changed
+7 -7

No files matched your search

+2 -2
View File
@@ -22,10 +22,10 @@
*/
// Initializes the page JavaScript.
document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("DOMContentLoaded", () => {
const list = document.getElementById("accounting-order-list");
if (list !== null) {
const onReorder = function () {
const onReorder = () => {
const accounts = Array.from(list.children);
for (let i = 0; i < accounts.length; i++) {
const no = document.getElementById("accounting-order-" + accounts[i].dataset.id + "-no");
+1 -1
View File
@@ -22,7 +22,7 @@
*/
// Initializes the page JavaScript.
document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("DOMContentLoaded", () => {
document.getElementById("accounting-code")
.onchange = validateCode;
document.getElementById("accounting-name")
@@ -22,7 +22,7 @@
*/
// Initializes the page JavaScript.
document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("DOMContentLoaded", () => {
initializeMaterialFabSpeedDial();
});
@@ -34,7 +34,7 @@ document.addEventListener("DOMContentLoaded", function () {
function initializeMaterialFabSpeedDial() {
const btnFab = document.getElementById("accounting-btn-material-fab-speed-dial");
const fab = document.getElementById(btnFab.dataset.target);
btnFab.onclick = function () {
btnFab.onclick = () => {
if (fab.classList.contains("show")) {
fab.classList.remove("show");
} else {
@@ -22,10 +22,10 @@
*/
// Initializes the page JavaScript.
document.addEventListener("DOMContentLoaded", function () {
document.addEventListener("DOMContentLoaded", () => {
const list = document.getElementById("accounting-order-list");
if (list !== null) {
const onReorder = function () {
const onReorder = () => {
const accounts = Array.from(list.children);
for (let i = 0; i < accounts.length; i++) {
const no = document.getElementById("accounting-order-" + accounts[i].dataset.id + "-no");