From 361a50a4a99273896cfddd04dc5254cd9fac5ac1 Mon Sep 17 00:00:00 2001 From: modzeleg Date: Tue, 6 Apr 2021 12:59:25 +0200 Subject: [PATCH] Added tips and returned its functionallity --- .../resources/static/css/commons/r11form.css | 3 - src/main/resources/static/html/mock.html | 75 +++++++++++++++---- src/main/resources/static/js/uianimation.js | 6 +- 3 files changed, 63 insertions(+), 21 deletions(-) diff --git a/src/main/resources/static/css/commons/r11form.css b/src/main/resources/static/css/commons/r11form.css index 003b8b4..9ead030 100644 --- a/src/main/resources/static/css/commons/r11form.css +++ b/src/main/resources/static/css/commons/r11form.css @@ -29,9 +29,6 @@ } .tooltip-window .tip { - width: 80%; - background: gray; - } .bordered-field { diff --git a/src/main/resources/static/html/mock.html b/src/main/resources/static/html/mock.html index 81a78b3..23699ff 100644 --- a/src/main/resources/static/html/mock.html +++ b/src/main/resources/static/html/mock.html @@ -26,8 +26,8 @@
- - + +
@@ -71,23 +71,32 @@
- - + +
+ + + + + + + + + + + + + + - - - - - - - - + + +
NameValue
NameValue
@@ -168,9 +177,45 @@

Help

When cursor hovers over an item. It's description is displayed below.

-
-

Example

-

Here should be instruction for given field.

+
+

Link

+

Link is an url representing an endpoint at which you can receive your mocked response by simply sending get request.

+
+
+
+
+

Http Status

+

Value of the field is corresponding to status value that server will return.

+
+
+
+
+

Content Type

+

Value of the field describes content of body payload contained in the response. For example if content is in xml format the value should be "application/xml" or "text/xml"

+
+
+
+
+

Body

+

Value of the field describes content of response body. It's basicly the message we want server to return. If it's simple response like 200 OK or 404 not found then field might be left empty.

+
+
+
+
+

Headers

+

Content of this tab allows to set and modify headers that will be included in the response.

+
+
+
+
+

History

+

Content of this tab displays the history of requests or responses received/sent to the endpoint

+
+
+
+
+

New header

+

Insert value in the field and press the plus icon to add a new header to the message.

diff --git a/src/main/resources/static/js/uianimation.js b/src/main/resources/static/js/uianimation.js index 97a88f4..dd13b87 100644 --- a/src/main/resources/static/js/uianimation.js +++ b/src/main/resources/static/js/uianimation.js @@ -65,13 +65,13 @@ function focusOutTip(element){ function hidTip(element){ if(focusedField) return; - $('#'+element).fadeOut(100); + $('#'+element).removeClass('active'); } function showTip(element){ if(focusedField) return; - $('.collapsible').fadeOut(0); - $('#'+element).fadeIn(100); + $('.tip').removeClass('active'); + $('#'+element).addClass('active'); } $('#messageLink').mouseover(function(){showTip('messageLinkTip')});