Removed console Log and added additional code comments

This commit is contained in:
Johnny Voruz 2023-10-03 15:13:57 -05:00
parent 29e7a2dd78
commit d686eab374

View file

@ -4,8 +4,6 @@
* *
*/ */
let goldenlayout = (function () { let goldenlayout = (function () {
var myLayout; // The actively used GoldenLayout API object. var myLayout; // The actively used GoldenLayout API object.
@ -586,20 +584,18 @@ let goldenlayout = (function () {
layoutDiv.append(div); layoutDiv.append(div);
} }
// Listener for realtime changes to the layout name input field. // Listener for realtime changes to the layout name input field.
// If the layout name is "default", the save button is disabled // If the layout name is "default", the save button is disabled
// to prevent the perception of overwriting the default layout. // to prevent the perception of overwriting the default layout.
$(document).on("input", "#layoutName", function () { $(document).on("input", "#layoutName", function () {
console.log("Input changed to:", $(this).val()); if ($(this).val() === "default") { // Disable the save button if the name is "default"
if ($(this).val() === "default") { $(".savelayout").prop("disabled", true); // Disabling the save button
$(".savelayout").prop("disabled", true); } else { // Enable the save button if the name is not "default"
} else { $(".savelayout").prop("disabled", false); // Enabling the save button
$(".savelayout").prop("disabled", false);
} }
}); });
//
var onSaveLayout = function () { var onSaveLayout = function () {
// get the name from the select box // get the name from the select box
var name = $("#layoutName").val(); var name = $("#layoutName").val();
@ -640,10 +636,6 @@ let goldenlayout = (function () {
resetUI( evenniaGoldenLayouts.get(name) ); resetUI( evenniaGoldenLayouts.get(name) );
} }
} }
// //
// Public // Public
// //