From db3d9b551acfa5d6ea7b9b3fb21ec926bedcc0c3 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 22 Sep 2022 09:30:04 +1000 Subject: [PATCH] Cleanup javascript console log messages (#3706) --- InvenTree/InvenTree/static/script/inventree/inventree.js | 5 ++--- InvenTree/templates/js/dynamic/nav.js | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/InvenTree/InvenTree/static/script/inventree/inventree.js b/InvenTree/InvenTree/static/script/inventree/inventree.js index d66ad7013d..f0d65b9131 100644 --- a/InvenTree/InvenTree/static/script/inventree/inventree.js +++ b/InvenTree/InvenTree/static/script/inventree/inventree.js @@ -207,13 +207,12 @@ function enableDragAndDrop(element, url, options) { formData, { success: function(data, status, xhr) { - console.log('Uploaded file via drag-and-drop'); if (options.success) { options.success(data, status, xhr); } }, error: function(xhr, status, error) { - console.log('File upload failed'); + console.error('File upload failed'); if (options.error) { options.error(xhr, status, error); } @@ -222,7 +221,7 @@ function enableDragAndDrop(element, url, options) { } ); } else { - console.log('Ignoring drag-and-drop event (not a file)'); + console.warn('Ignoring drag-and-drop event (not a file)'); } }); } diff --git a/InvenTree/templates/js/dynamic/nav.js b/InvenTree/templates/js/dynamic/nav.js index 05fc50abd8..37d094bddd 100644 --- a/InvenTree/templates/js/dynamic/nav.js +++ b/InvenTree/templates/js/dynamic/nav.js @@ -154,7 +154,7 @@ function enableBreadcrumbTree(options) { var label = options.label; if (!label) { - console.log('ERROR: enableBreadcrumbTree called without supplying label'); + console.error('enableBreadcrumbTree called without supplying label'); return; }