You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by mg...@apache.org on 2015/12/13 10:38:17 UTC

[38/50] [abbrv] isis git commit: ISIS-1237: improving the UI of the swagger-ui html

ISIS-1237: improving the UI of the swagger-ui html


Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/1b202fe1
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/1b202fe1
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/1b202fe1

Branch: refs/heads/ISIS-1223-upgrade-to-wicket-7
Commit: 1b202fe1627e59fe2facdfe5c0a178ed96d0e04d
Parents: 15cd677
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Dec 9 17:11:05 2015 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Dec 9 17:11:05 2015 +0000

----------------------------------------------------------------------
 .../simpleapp/webapp/src/main/webapp/api-docs/index.html | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/1b202fe1/example/application/simpleapp/webapp/src/main/webapp/api-docs/index.html
----------------------------------------------------------------------
diff --git a/example/application/simpleapp/webapp/src/main/webapp/api-docs/index.html b/example/application/simpleapp/webapp/src/main/webapp/api-docs/index.html
index bc9415a..d7e3f47 100644
--- a/example/application/simpleapp/webapp/src/main/webapp/api-docs/index.html
+++ b/example/application/simpleapp/webapp/src/main/webapp/api-docs/index.html
@@ -30,12 +30,15 @@
 
     <script type="text/javascript">
     $(function () {
+      /*
       var url = window.location.search.match(/url=([^&]+)/);
       if (url && url.length > 1) {
         url = decodeURIComponent(url[1]);
       } else {
         url = "/restful/swagger/private"
       }
+      */
+      var url = document.getElementById("input_baseUrl").selectedOptions[0].value;
 
       // Pre load translate...
       if(window.SwaggerTranslator) {
@@ -109,14 +112,14 @@
         <a id="logo" href="http://swagger.io">swagger</a>
         <form id='api_selector'>
             <div class='input'>
-                <!--
-                <select name="foo">
+                <select id="input_baseUrl" name="baseUrl">
                     <option id="public" label="public" value="/restful/swagger/public"/>
                     <option id="private" label="private" value="/restful/swagger/private"/>
                     <option id="prototyping" label="prototyping" value="/restful/swagger/prototyping"/>
                 </select>
-                -->
-                <input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text">
+<!--
+                <input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text" value="/restful/swagger/public">
+-->
             </div>
             <div class='input' style="display:none;"><input placeholder="api_key" id="input_apiKey" name="apiKey" type="text"/></div>
             <div class='input'><a id="explore" href="#" data-sw-translate>Explore</a></div>