From d1d54c82f956cba1ef4b7530d061d1ae9c336cdf Mon Sep 17 00:00:00 2001 From: Adam Bem Date: Wed, 22 Feb 2023 10:57:28 +0100 Subject: [PATCH 1/2] Added suggestions in http status field --- .../src/main/resources/static/html/mock.html | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/Backend/mocked-services/src/main/resources/static/html/mock.html b/Backend/mocked-services/src/main/resources/static/html/mock.html index 8c4ba5d..a908ea5 100644 --- a/Backend/mocked-services/src/main/resources/static/html/mock.html +++ b/Backend/mocked-services/src/main/resources/static/html/mock.html @@ -34,17 +34,15 @@
- - + + +
-- 2.51.0 From 8524ecd6ca737b6165819b0bb260f28448547336 Mon Sep 17 00:00:00 2001 From: Adam Bem Date: Wed, 22 Feb 2023 11:12:05 +0100 Subject: [PATCH 2/2] HTTP status field is red when its value is invalid --- .../src/main/resources/static/js/datatransfer.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Backend/mocked-services/src/main/resources/static/js/datatransfer.js b/Backend/mocked-services/src/main/resources/static/js/datatransfer.js index b922639..f0d9834 100644 --- a/Backend/mocked-services/src/main/resources/static/js/datatransfer.js +++ b/Backend/mocked-services/src/main/resources/static/js/datatransfer.js @@ -13,6 +13,10 @@ const removeMessageName = 'removeMessage'; const C_UUID = 'mock-uuid'; const C_ID = 'last-displayed-id'; const C_ADV = 'advanced-mode'; + +const color_red = "#ff8f8f"; +const color_grey = "#6b6b6b"; + const setModified = function(){ setDataModified(); } @@ -61,16 +65,16 @@ function httpStatusInvalid(){ } function setDataModified(){ - console.log("dupadupagówno") - if(dataModified) return; if(httpStatusInvalid()){ $('#btn-save').removeClass('active'); $('#btn-save').off(); + document.getElementById("httpStatus").style.backgroundColor = color_red; return; } dataModified = true; $('#btn-save').addClass('active'); $('#btn-save').click(getUpdate); + document.getElementById("httpStatus").style.backgroundColor = null; } //Adding change listener to fields -- 2.51.0