T157 html and css modified for creating json based on table
This commit is contained in:
		| @@ -197,17 +197,13 @@ | ||||
|     margin-bottom: 20px; | ||||
| } | ||||
|  | ||||
| .headerName { | ||||
|     height: 20px; | ||||
|     padding: 5px; | ||||
| .tableHead { | ||||
|     font-size: 24px; | ||||
|     width: 240px; | ||||
|     font-size: 18px; | ||||
|     background: #f0f0f0; | ||||
|     border: 1px solid lightgray; | ||||
|     border-radius: 5px; | ||||
|     padding: 5px; | ||||
| } | ||||
|  | ||||
| .headerField { | ||||
| .tableField { | ||||
|     height: 20px; | ||||
|     padding: 5px; | ||||
|     width: 240px; | ||||
| @@ -217,3 +213,12 @@ | ||||
|     border-radius: 5px; | ||||
| } | ||||
|  | ||||
| .headerName { | ||||
|     background: #f0f0f0; | ||||
| } | ||||
|  | ||||
| .httpStatusValue { | ||||
|  | ||||
| } | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -15,7 +15,7 @@ function getData(uuid){ | ||||
|  | ||||
| function clearMock(){ | ||||
|     fillStaticFields('','','',''); | ||||
|     $('#headerTable').html(''); | ||||
|     $('#httpStatusValues').html(''); | ||||
| } | ||||
|  | ||||
| function initializeMock(index){ | ||||
| @@ -43,9 +43,9 @@ function createLink(uuid, id){ | ||||
| } | ||||
|  | ||||
| function fillHeaderTable(headers){ | ||||
|     var innerHTML = $('#headerTable').html(); | ||||
|     var innerHTML = $('#httpStatusValues').html(); | ||||
|     innerHTML += generateHeaderTable(headers); | ||||
|     $('#headerTable').html(innerHTML); | ||||
|     $('#httpStatusValues').html(innerHTML); | ||||
| } | ||||
|  | ||||
| function generateHeaderTable(headers){ | ||||
| @@ -67,8 +67,10 @@ function generateHeaderTable(headers){ | ||||
|     for(let i=0; i<count; i++){ | ||||
|         innerHTML+= | ||||
|             '<tr>' + | ||||
|                 '<td class="headerName">' + keys[i] + '</td>' + | ||||
|                 '<td class="headerField">' + values[i] + '</td>' + | ||||
|                 '<td>' + | ||||
|                     '<input type="text" name="headerKey" placeholder="key" class="tableField headerName httpStatusValue" value="' + keys[i] + '"/></td>' + | ||||
|                 '<td>' + | ||||
|                     '<input type="text" name="headerKey" placeholder="key" class="tableField" value="' + values[i] + '"/></td>' + | ||||
|             '</tr>'; | ||||
|     } | ||||
|     return innerHTML; | ||||
|   | ||||
| @@ -54,21 +54,22 @@ | ||||
|                     </div> | ||||
|                     <div id="headers"> | ||||
|                         <table id="headerTable"> | ||||
|                             <th> | ||||
|                                <td>Name</td> | ||||
|                                 <td>Value</td> | ||||
|                             </th> | ||||
|                         </table> | ||||
|                         <table id="nextHeaderTable"> | ||||
|                             <tr> | ||||
|                                 <td> | ||||
|                                     <input type="text" name="headerKey" id="headerKey" class="headerField" placeholder="next header"/> | ||||
|                                 </td> | ||||
|                                 <td> | ||||
|                                     <input type="text" name="headerValue" id="headerValue" class="headerField" placeholder="value"/> | ||||
|                                     <input type="image" name="addHeader" src="/img/icons8-plus-48.png" style="width: 20px;"/> | ||||
|                                 </td> | ||||
|                             </tr> | ||||
|                             <thead> | ||||
|                                 <tr> | ||||
|                                     <td class="tableHead">Header</td> | ||||
|                                     <td class="tableHead">Value</td> | ||||
|                                 </tr> | ||||
|                             </thead> | ||||
|                             <tbody id="httpStatusValues"> | ||||
|                             </tbody> | ||||
|                             <tfoot> | ||||
|                                 <tr> | ||||
|                                     <td><input type="text" name="headerKey" id="headerKeyInput" placeholder="key" class="tableField"/></td> | ||||
|                                     <td><input type="text" name="headerValue" id="headerValueInput" placeholder="value" class="tableField"/></td> | ||||
|                                 </tr> | ||||
|                             </tfoot> | ||||
| <!--                        <input type="text" name="headerValue" id="headerValue" class="headerField" placeholder="value"/>--> | ||||
| <!--                        <input type="image" name="addHeader" src="/img/icons8-plus-48.png" style="width: 20px;"/>--> | ||||
|                         </table> | ||||
|                     </div> | ||||
|                     <div id="history" style="display:none;"></div> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user