From 954aa7070484e07e2d1215da512b5117a510df09 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 11 Nov 2017 11:27:49 +0100 Subject: [PATCH] Reduce js console logging --- Auth/Auth.js | 1 - Message/Request/Request.js | 3 +-- UI/ActionManager.js | 6 +----- UI/Component/Input.js | 1 - UI/DragNDrop.js | 12 ------------ UI/Input/Voice/VoiceManager.js | 3 --- 6 files changed, 2 insertions(+), 24 deletions(-) diff --git a/Auth/Auth.js b/Auth/Auth.js index 8382869..aef5cb8 100644 --- a/Auth/Auth.js +++ b/Auth/Auth.js @@ -94,7 +94,6 @@ */ jsOMS.Auth.Auth.prototype.loginResult = function (xhr) { - console.log(xhr); location.reload(); }; }(window.jsOMS = window.jsOMS || {})); diff --git a/Message/Request/Request.js b/Message/Request/Request.js index c5a2162..39cd89d 100644 --- a/Message/Request/Request.js +++ b/Message/Request/Request.js @@ -30,7 +30,7 @@ // todo: create log; this.result[0] = function () { - console.log('invalid response'); + //console.log('invalid response'); }; /** global: XMLHttpRequest */ @@ -363,7 +363,6 @@ break; default: // todo: create handler for error returns - console.log(self.xhr); } }; diff --git a/UI/ActionManager.js b/UI/ActionManager.js index a531911..7c965fc 100644 --- a/UI/ActionManager.js +++ b/UI/ActionManager.js @@ -92,8 +92,6 @@ if(hasSelector) { this.app.eventManager.attach(e.id + 'childList', function(data) { - console.log(data); - const length = data.addedNodes.length; for(let j = 0; j < length; j++) { @@ -105,9 +103,7 @@ }); } - this.app.eventManager.attach(e.id + 'attributes', function(data) { - console.log(data); - }); + this.app.eventManager.attach(e.id + 'attributes', function(data) {}); this.app.uiManager.getDOMObserver().observe(e, observeConfig); } diff --git a/UI/Component/Input.js b/UI/Component/Input.js index d943cc7..64196a2 100644 --- a/UI/Component/Input.js +++ b/UI/Component/Input.js @@ -119,7 +119,6 @@ for (let k = 0; k < responseLength; k++) { tempResponse = response.getByIndex(k); - console.log(tempResponse); let option = null, data = tempResponse.getData(), diff --git a/UI/DragNDrop.js b/UI/DragNDrop.js index cb5997e..a0ff9c6 100644 --- a/UI/DragNDrop.js +++ b/UI/DragNDrop.js @@ -71,8 +71,6 @@ const element = document.getElementById(id), self = this; - console.log(id); - if(!element) { return; } @@ -82,38 +80,29 @@ self.dragging = this; e.dataTransfer.effectAllowed = 'move'; e.dataTransfer.setData('text/html', this.innerHTML); - - console.log(self.dragging); } - - console.log('drag start'); }, false); element.addEventListener('dragenter', function(e) { // todo: highlight - console.log('drag enter'); }, false); element.addEventListener('dragover', function(e) { e.preventDefault(); e.dataTransfer.dropEffect = 'move'; - - console.log('drag over'); }, false); element.addEventListener('dragleave', function(e) { e.preventDefault(); // todo: don't highlight - console.log('drag leave'); }, false); element.addEventListener('dragend', function(e) { e.preventDefault(); // todo: reset all changes - console.log('drag end'); }, false); //element.addEventListener('drag', function(e) {}); @@ -130,7 +119,6 @@ // todo: add to now destination // todo: remove from old destination - console.log('drag drop'); self.dragging = null; }, false); diff --git a/UI/Input/Voice/VoiceManager.js b/UI/Input/Voice/VoiceManager.js index 736a1f7..445dda0 100644 --- a/UI/Input/Voice/VoiceManager.js +++ b/UI/Input/Voice/VoiceManager.js @@ -76,10 +76,7 @@ this.recognition.onresult = function(event) { let result = jsOMS.trim(event.results[event.resultIndex][0].transcript); - console.log('.' + result + '.'); - if(self.commands.hasOwnProperty(result)) { - console.log('found'); self.commands[result](); } };