diff --git a/src/PHPDraft/Out/HTML/default.css b/src/PHPDraft/Out/HTML/default.css index 156c7c22..e44e0452 100644 --- a/src/PHPDraft/Out/HTML/default.css +++ b/src/PHPDraft/Out/HTML/default.css @@ -21,6 +21,12 @@ body .media h1.media-heading { margin-top: 20px; margin-bottom: 10px; } +body .media h1.media-heading .form-control{ + display: flex; + width: auto; + float: right; +} + .panel-title var, h4.response var { padding: 6px 12px; diff --git a/src/PHPDraft/Out/HTML/default.js b/src/PHPDraft/Out/HTML/default.js index 78e97a4d..efac227d 100644 --- a/src/PHPDraft/Out/HTML/default.js +++ b/src/PHPDraft/Out/HTML/default.js @@ -7,6 +7,19 @@ $(function () { } }); }); + var selectedhost = $('h1.media-heading select.form-control').val(); + $('h1.media-heading select.form-control').on('change', function () { + var html = $('body>div>div.row').html(); + var re = new RegExp(escapeRegExp(selectedhost), 'g'); + html = html.replace(re, $('h1.media-heading select.form-control').val()); + selectedhost = $('h1.media-heading select.form-control').val(); + $('body>div>div.row').html(html); + $('[data-toggle="popover"]').popover(); + }); + + function escapeRegExp(str) { + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + }; }); $('.collapse.request-panel').on('shown.bs.collapse', function () { diff --git a/src/PHPDraft/Out/HTML/default.phtml b/src/PHPDraft/Out/HTML/default.phtml index 61035a07..4c523f13 100644 --- a/src/PHPDraft/Out/HTML/default.phtml +++ b/src/PHPDraft/Out/HTML/default.phtml @@ -31,7 +31,16 @@ $base = $this->categories;

base_data['TITLE']; ?> - base_data['HOST']; ?> + base_data['ALT_HOST'])): ?> + + + base_data['HOST']; ?> +

base_data['DESC']; ?>

@@ -151,7 +160,7 @@ $base = $this->categories;

description; ?>

requests)): ?> - requests as $key=>$request): ?> + requests as $key => $request): ?>

categories;

-
- description;?> +
+ description; ?> url_variables !== []): ?>
Example URI
base_data['HOST']; ?> @@ -219,7 +229,7 @@ $base = $this->categories; responses)): ?> - responses as $key=>$response): ?> + responses as $key => $response): ?>

categories; class="glyphicon indicator glyphicon-menu-down pull-right">

-
- description;?> +
+ description; ?> headers !== []): ?>
Headers
    @@ -310,6 +321,7 @@ $base = $this->categories; - +template . '.js')); ?> + \ No newline at end of file diff --git a/src/PHPDraft/Out/UI.php b/src/PHPDraft/Out/UI.php index 8db369d9..4abc9275 100644 --- a/src/PHPDraft/Out/UI.php +++ b/src/PHPDraft/Out/UI.php @@ -84,7 +84,7 @@ static function help() echo "\t-s\tSort displayed values [All|None|Structures|Webservices] (defaults to the way the objects are in the file)\n"; echo "\t-i\tSpecifies an image to display in the header.\n"; echo "\t-c\tSpecifies a CSS file to include (value is put in a link element without checking).\n"; - echo "\t-c\tSpecifies a JS file to include (value is put in a script element without checking).\n"; + echo "\t-j\tSpecifies a JS file to include (value is put in a script element without checking).\n"; echo "\t-h\tDisplays this text.\n"; }