|
108 | 108 | <copy todir="${project.build.outputDirectory}/META-INF/spring-data-rest/hal-browser/vendor/js"> |
109 | 109 | <fileset dir="${project.build.directory}/json-editor/META-INF/resources/webjars/json-editor/${json-editor.version}" /> |
110 | 110 | </copy> |
| 111 | + <copy file="${project.build.outputDirectory}/META-INF/spring-data-rest/hal-browser/browser.html" |
| 112 | + tofile="${project.build.outputDirectory}/META-INF/spring-data-rest/hal-browser/index.html" /> |
| 113 | + <replace file="${project.build.outputDirectory}/META-INF/spring-data-rest/hal-browser/index.html"> |
| 114 | + <replacefilter> |
| 115 | + <replacetoken><![CDATA[</body>]]></replacetoken> |
| 116 | + <replacevalue><![CDATA[ |
| 117 | + <script id="dynamic-request-template" type="text/template"> |
| 118 | + <div class="modal-header"> |
| 119 | + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
| 120 | + <h3>Create/Update</h3> |
| 121 | + </div> |
| 122 | +
|
| 123 | + <form class="non-safe" action="<%= href %>"> |
| 124 | + <div class="modal-body" style="padding-top: 0px"> |
| 125 | + <div id="jsoneditor"></div> |
| 126 | +
|
| 127 | + <div class="well well-small" style="padding-bottom: 0px;"> |
| 128 | + <div class="container-fluid"> |
| 129 | + <div class="row-fluid"> |
| 130 | + <div class="control-group"> |
| 131 | + <label class="control-label" style="display: inline-block; font-weight: bold;">Action:</label> |
| 132 | + <input name="method" type="text" class="method controls" style="width: 98%" value="POST" /> |
| 133 | + <input name="url" type="text" class="url controls" style="width: 98%" value="<%= href %>" /> |
| 134 | + </div> |
| 135 | + </div> |
| 136 | + </div> |
| 137 | + </div> |
| 138 | + </div> |
| 139 | + <div class="modal-footer"> |
| 140 | + <button type="submit" class="btn btn-primary">Make Request</button> |
| 141 | + </div> |
| 142 | + </form> |
| 143 | + </script> |
| 144 | +
|
| 145 | + <script src="vendor/js/jsoneditor.js"></script> |
| 146 | + <script src="js/CustomPostForm.js"></script> |
| 147 | +
|
| 148 | +</body>]]></replacevalue> |
| 149 | + </replacefilter> |
| 150 | + </replace> |
| 151 | + <replace file="${project.build.outputDirectory}/META-INF/spring-data-rest/hal-browser/index.html"> |
| 152 | + <replacefilter> |
| 153 | + <replacetoken>The HAL Browser</replacetoken> |
| 154 | + <replacevalue>The HAL Browser (for Spring Data REST)</replacevalue> |
| 155 | + </replacefilter> |
| 156 | + </replace> |
111 | 157 | <delete file="${project.build.outputDirectory}/META-INF/spring-data-rest/hal-browser/browser.html" /> |
112 | 158 | </target> |
113 | 159 | </configuration> |
|
0 commit comments