From e94764a5c78eab566bfa8d4878394f7e99e74234 Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Thu, 26 Apr 2018 22:36:35 -0400 Subject: [PATCH] Improve the dashboard javascript comments --- resources/assets/js/dashboard.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/dashboard.js b/resources/assets/js/dashboard.js index 8e17bff..77ec161 100644 --- a/resources/assets/js/dashboard.js +++ b/resources/assets/js/dashboard.js @@ -302,6 +302,7 @@ function editListInit() { filterInputInit(); } +// initialize edit item functionality function editItemInit() { const $editItem = $("#edit-item"), $submit = $("#submit"), @@ -646,6 +647,7 @@ function editItemInit() { }); } +// initialize the user profile image functionality function userProfileImageInit() { const $form = $("#user-profile-image"), $upload = $("#profile-image-upload"), @@ -727,6 +729,7 @@ function userProfileImageInit() { }); } +// initialize the user profile update functionality function userProfileUpdateInit() { const $form = $("#user-profile-update"), $submit = $form.find(".submit-button"), @@ -805,6 +808,7 @@ function userProfileUpdateInit() { }); } +// initialize the user password update functionality function userPasswordUpdateInit() { const $form = $("#user-password-update"), $submit = $form.find(".submit-button"), @@ -904,7 +908,7 @@ function userPasswordUpdateInit() { }); } -// run once the document is ready +// run the respective initialization functions for each form on the current page $(document).ready(function() { if ($("#edit-list").length) { editListInit();