diff --git a/public/js/home.js b/public/js/home.js index 127e2633..bb9c6e80 100644 --- a/public/js/home.js +++ b/public/js/home.js @@ -603,7 +603,7 @@ let assignmentsTable = new Tabulator("#assignmentsTable", { width: 40, align: "center", cellClick: function(e, cell) { - + const data = cell.getRow().getData(); replaceAssignmentFromID(data, {assignment_id: data["assignment_id"], placeholder: true}, selected_class_i); @@ -611,7 +611,7 @@ let assignmentsTable = new Tabulator("#assignmentsTable", { const undoSnackbar = new Snackbar(`You deleted ${data["name"]}`, { color: "var(--red1)", textColor: "var(--white)", - buttonText: "Undo", + buttonText: "Undo", //buttonclick replaces the assignment with a placeholder that just contains the assignemnt ID buttonClick: () => { //gets index for splicing and comparing diff --git a/public/js/snackbar.js b/public/js/snackbar.js index 7fdcebba..52948d9c 100644 --- a/public/js/snackbar.js +++ b/public/js/snackbar.js @@ -7,7 +7,7 @@ class Snackbar { /** - * snackbars contains key value pairs of snackbar IDs and snackbar references respectively + * snackbars contains key value pairs of snackbar IDs and snackbar references respectively * if you ever need to get a snackbar from an ID * snackbarIDs makes sure the IDs are unique */ @@ -17,7 +17,7 @@ class Snackbar { /** * state IDs * DESTROYED means it doesn't exist in html - * HIDDEN means it exists but is hdiden + * HIDDEN means it exists but is hidden * SHOWN means it exists and is shown */ static DESTROYED = 0 @@ -33,7 +33,7 @@ class Snackbar { * destroyWhenButtonClicked : Boolean - Whether or not it should destroy itself when the button is clicked, defaults to true * bodyClick: Function - Sets the body's onclick logic * destroyWhenBodyClicked : Boolean - Whether or not it should destroy itself when the body is clicked, defaults to true - * timeout: Int - Time in ms + * timeout: Int - Time in ms * timeoutFunction: Function - What to run on timeout (doesn't run if hidden or destroyed) * timeoutMode: can be "destroy", "hide", "none" or empty. Determines what to do on timeout, destroys by default */ @@ -181,7 +181,7 @@ class Snackbar { this.timeoutInProgress = undefined; //resets the timeoutInProgress variable at the end of the timeout }, this.timeout); } - + const removeHidden = () => { this.state = Snackbar.SHOWN this.element.classList.remove("hidden"); @@ -199,7 +199,7 @@ class Snackbar { } } - /** + /** * hides the snackbar * returns the snackbar object */ @@ -261,4 +261,4 @@ class Snackbar { return id; } -} \ No newline at end of file +}