Index: trunk/extensions/ApiSandbox/SpecialApiSandbox.php |
— | — | @@ -39,12 +39,12 @@ |
40 | 40 | . $this->openFieldset( 'result' ) |
41 | 41 | . '<table class="api-sandbox-result-container"><tbody> |
42 | 42 | ' |
43 | | - . '<tr><td class="api-sandbox-result-label"><label for="api-sandbox-url">' |
44 | | - . wfMessage( 'apisb-request-url' )->parse() . '</label></td>' |
| 43 | + . '<tr><th class="api-sandbox-result-label"><label for="api-sandbox-url">' |
| 44 | + . wfMessage( 'apisb-request-url' )->parse() . '</label></th>' |
45 | 45 | . '<td><input id="api-sandbox-url" readonly="readonly" /></td></tr> |
46 | 46 | ' |
47 | | - . '<tr id="api-sandbox-post-row"><td class="api-sandbox-result-label"><label for="api-sandbox-post">' |
48 | | - . wfMessage( 'apisb-request-post' )->parse() . '</label></td>' |
| 47 | + . '<tr id="api-sandbox-post-row"><th class="api-sandbox-result-label"><label for="api-sandbox-post">' |
| 48 | + . wfMessage( 'apisb-request-post' )->parse() . '</label></th>' |
49 | 49 | . '<td><input id="api-sandbox-post" readonly="readonly" /></td></tr> |
50 | 50 | ' |
51 | 51 | . '<tr><td colspan="2"><div id="api-sandbox-output"></div></td></tr>' |
— | — | @@ -78,21 +78,29 @@ |
79 | 79 | $this->getQueryModules( 'meta' ) |
80 | 80 | ); |
81 | 81 | |
82 | | - $s = '<table class="api-sandbox-options"> |
83 | | -<tbody> |
84 | | -'; |
85 | | - $s .= '<tr><td class="api-sandbox-label"><label for="api-sandbox-format"><code>format=</code></label></td><td class="api-sandbox-value">' |
86 | | - . self::getSelect( 'format', $formats, 'json' ) |
87 | | - . '</td><td>' . $this->getButtonsBox() . '</td></tr> |
88 | | -'; |
89 | | - $s .= '<tr><td class="api-sandbox-label"><label for="api-sandbox-action"><code>action=</code></label></td><td class="api-sandbox-value">' |
90 | | - . self::getSelect( 'action', $modules ) |
91 | | - . '</td><td id="api-sandbox-help" rowspan="2"></td></tr> |
92 | | -'; |
93 | | - $s .= '<tr id="api-sandbox-query-row" style="display: none"><td class="api-sandbox-label">' |
94 | | - . '</td><td class="api-sandbox-value">' |
95 | | - . self::getSelect( 'query', $queryModules ) |
96 | | - . '</td></tr> |
| 82 | + $s = '<div id="api-sandbox-buttons"></div>'; |
| 83 | + $s .= '<div id="api-sandbox-examples" style="display: none;"></div>'; |
| 84 | + $s .= ' |
| 85 | +<table class="api-sandbox-options"> |
| 86 | + <tbody> |
| 87 | + <tr> |
| 88 | + <th><label for="api-sandbox-format">Format</label></th> |
| 89 | + <th><label for="api-sandbox-action">Action</label></th> |
| 90 | + <th class="api-sandbox-docs-col">Documentation</th> |
| 91 | + </tr> |
| 92 | + <tr> |
| 93 | + <td>' . self::getSelect( 'format', $formats, 'json' ) . '</td> |
| 94 | + <td> |
| 95 | + ' . self::getSelect( 'action', $modules ) . ' |
| 96 | + <div id="api-sandbox-query-row" style="display: none;"> |
| 97 | + ' . self::getSelect( 'query', $queryModules ) . ' |
| 98 | + </div> |
| 99 | + </td> |
| 100 | + <td class="api-sandbox-docs-col"> |
| 101 | + <span id="api-sandbox-help"></span> |
| 102 | + </td> |
| 103 | + </tr> |
| 104 | + </tbody> |
97 | 105 | </table> |
98 | 106 | '; |
99 | 107 | $s .= '<div id="api-sandbox-main-inputs"></div><div id="api-sandbox-query-inputs" style="display: none"></div>' |
— | — | @@ -101,22 +109,9 @@ |
102 | 110 | . $this->openFieldset( 'generator-parameters', array( 'style' => 'display: none;' ) ) |
103 | 111 | . '<div id="api-sandbox-generator-inputs"></div></fieldset> |
104 | 112 | '; |
105 | | - |
106 | | - $s .= Html::element( 'input', |
107 | | - array( |
108 | | - 'type' => 'submit', |
109 | | - 'id' => 'api-sandbox-submit', |
110 | | - 'value' => wfMessage( 'apisb-submit' )->text(), |
111 | | - 'disabled' => 'disabled', |
112 | | - ) |
113 | | - ) . "\n"; |
114 | 113 | return $s; |
115 | 114 | } |
116 | 115 | |
117 | | - public function getButtonsBox() { |
118 | | - return '<div id="api-sandbox-buttons"><div id="api-sandbox-examples" style="display: none"></div></div>'; |
119 | | - } |
120 | | - |
121 | 116 | /** |
122 | 117 | * @param $type string |
123 | 118 | * @return array |
Index: trunk/extensions/ApiSandbox/ext.apiSandbox.js |
— | — | @@ -7,12 +7,33 @@ |
8 | 8 | paramInfo, namespaceOptions, |
9 | 9 | // page elements |
10 | 10 | $format, $action, $query, $queryRow, $help, $mainContainer, $genericContainer, |
11 | | - $generatorContainer, $queryContainer, $generatorBox, $submit, $requestUrl, $requestPost, |
12 | | - $output, $postRow, $buttonsContainer, $examplesButton, $examplesContent; |
| 11 | + $generatorContainer, $queryContainer, $generatorBox, $form, $submit, $requestUrl, $requestPost, |
| 12 | + $output, $postRow, $buttonsContainer, $examplesButton, $examplesContent, $pageScroll; |
13 | 13 | |
14 | 14 | |
15 | 15 | /** Local utility functions **/ |
16 | 16 | |
| 17 | + // get the first element in a list that is "scrollable" |
| 18 | + // depends on browser and skin (i.e. body or html) |
| 19 | + function getScrollableElement( /* selectors, .. */ ) { |
| 20 | + var i, argLen, el, $el, canScroll; |
| 21 | + for ( i = 0, argLen = arguments.length; i < argLen; i += 1 ) { |
| 22 | + el = arguments[i]; |
| 23 | + $el = $(el); |
| 24 | + if ( $el.scrollTop() > 0 ) { |
| 25 | + return el; |
| 26 | + } else { |
| 27 | + $el.scrollTop( 1 ); |
| 28 | + canScroll = $el.scrollTop() > 0; |
| 29 | + $el.scrollTop( 0 ); |
| 30 | + if ( canScroll ) { |
| 31 | + return el; |
| 32 | + } |
| 33 | + } |
| 34 | + } |
| 35 | + return []; |
| 36 | + } |
| 37 | + |
17 | 38 | function showLoading( $element ) { |
18 | 39 | $element.html( |
19 | 40 | mw.html.element( 'img', |
— | — | @@ -185,7 +206,7 @@ |
186 | 207 | ).appendTo( $list ); |
187 | 208 | count++; |
188 | 209 | } |
189 | | - $examplesButton.text( mw.msg( count === 1 ? 'apisb-example' : 'apisb-examples' ) ); |
| 210 | + $examplesButton.button( 'option', 'text', mw.msg( count === 1 ? 'apisb-example' : 'apisb-examples' ) ); |
190 | 211 | $list.appendTo( $examplesContent ); |
191 | 212 | if ( count ) { |
192 | 213 | $examplesButton.show(); |
— | — | @@ -199,7 +220,7 @@ |
200 | 221 | isQuery = action === 'query'; |
201 | 222 | |
202 | 223 | if ( action === '-' || ( isQuery && query === '-' ) ) { |
203 | | - $submit.prop( 'disabled', true ); |
| 224 | + $submit.button( 'option', 'disabled', true ); |
204 | 225 | return; |
205 | 226 | } |
206 | 227 | query = query.replace( /^.*=/, '' ); |
— | — | @@ -212,7 +233,7 @@ |
213 | 234 | getParamInfo( data, |
214 | 235 | function () { |
215 | 236 | showLoading( $mainContainer ); |
216 | | - $submit.prop( 'disabled', true ); |
| 237 | + $submit.button( 'option', 'disabled', true ); |
217 | 238 | $examplesContent.hide(); |
218 | 239 | }, |
219 | 240 | function () { |
— | — | @@ -224,11 +245,11 @@ |
225 | 246 | } |
226 | 247 | mainRequest = new UiBuilder( $mainContainer, info, '' ); |
227 | 248 | mainRequest.setHelp( $help ); |
228 | | - $submit.prop( 'disabled', false ); |
| 249 | + $submit.button( 'option', 'disabled', false ); |
229 | 250 | updateExamples( info ); |
230 | 251 | }, |
231 | 252 | function () { |
232 | | - $submit.removeAttr( 'disabled' ); |
| 253 | + $submit.button( 'option', 'disabled', false ); |
233 | 254 | showLoadError( $mainContainer, 'apisb-load-error' ); |
234 | 255 | $examplesContent.hide(); |
235 | 256 | } |
— | — | @@ -309,23 +330,29 @@ |
310 | 331 | * Creates inputs and places them into container |
311 | 332 | */ |
312 | 333 | createInputs: function () { |
313 | | - var $table, i, length, param, name; |
| 334 | + var $table, $tbody, i, length, param, name; |
314 | 335 | |
315 | | - $table = $( '<table class="api-sandbox-options"></table>' ); |
| 336 | + $table = $( '<table class="api-sandbox-params mw-datatable"><thead><tr></tr></thead><tbody></tbody></table>' ) |
| 337 | + .find( '> thead > tr' ) |
| 338 | + .append( mw.html.element( 'th', { 'class': 'api-sandbox-params-label' }, mw.msg( 'apisb-params-param' ) ) ) |
| 339 | + .append( mw.html.element( 'th', { 'class': 'api-sandbox-params-value' }, mw.msg( 'apisb-params-input' ) ) ) |
| 340 | + .append( mw.html.element( 'th', {}, mw.msg( 'apisb-params-desc' ) ) ) |
| 341 | + .end(); |
| 342 | + $tbody = $table.find( '> tbody' ) |
316 | 343 | for ( i = 0, length = this.params.length; i < length; i += 1 ) { |
317 | 344 | param = this.params[i]; |
318 | 345 | name = this.prefix + param.name; |
319 | 346 | |
320 | 347 | $( '<tr>' ) |
321 | 348 | .append( |
322 | | - $( '<td class="api-sandbox-label"></td>' ) |
| 349 | + $( '<td class="api-sandbox-params-label"></td>' ) |
323 | 350 | .html( mw.html.element( 'label', |
324 | | - { 'for': 'param-' + name }, name + '=' ) |
| 351 | + { 'for': 'param-' + name }, name ) |
325 | 352 | ) |
326 | 353 | ) |
327 | | - .append( $( '<td class="api-sandbox-value"></td>' ).html( this.input( param, name ) ) ) |
| 354 | + .append( $( '<td class="api-sandbox-params-value"></td>' ).html( this.input( param, name ) ) ) |
328 | 355 | .append( $( '<td>' ).html( smartEscape( param.description ) ) ) |
329 | | - .appendTo( $table ); |
| 356 | + .appendTo( $tbody ); |
330 | 357 | } |
331 | 358 | this.$container.html( $table ); |
332 | 359 | }, |
— | — | @@ -335,16 +362,16 @@ |
336 | 363 | * @param $container {jQuery} Container to use |
337 | 364 | */ |
338 | 365 | setHelp: function ( $container ) { |
339 | | - var desc = smartEscape( this.info.description ); |
| 366 | + var linkHtml = '', |
| 367 | + descTxt = smartEscape( this.info.description ); |
340 | 368 | if ( this.info.helpurls && this.info.helpurls[0] ) { |
341 | | - desc = desc.replace( /^([^\r\n\.]*)/, |
342 | | - mw.html.element( 'a', { |
343 | | - 'target': '_blank', |
344 | | - 'href': this.info.helpurls[0] |
345 | | - }, '$1' ) |
346 | | - ); |
| 369 | + descTxt = descTxt.replace( /^([^\r\n\.]*)/, '$1' ) + ' '; |
| 370 | + linkHtml = mw.html.element( 'a', { |
| 371 | + 'target': '_blank', |
| 372 | + 'href': this.info.helpurls[0] |
| 373 | + }, mw.msg( 'apisb-docs-more' ) ); |
347 | 374 | } |
348 | | - $container.html( desc ); |
| 375 | + $container.text( descTxt ).append( mw.msg( 'parentheses', linkHtml ) ); |
349 | 376 | }, |
350 | 377 | |
351 | 378 | input: function ( param, name ) { |
— | — | @@ -361,7 +388,8 @@ |
362 | 389 | s = mw.html.element( 'input', { |
363 | 390 | 'class': 'api-sandbox-input', |
364 | 391 | 'id': 'param-' + name, |
365 | | - 'value': value |
| 392 | + 'value': value, |
| 393 | + 'type': 'text' |
366 | 394 | } ); |
367 | 395 | break; |
368 | 396 | |
— | — | @@ -471,21 +499,44 @@ |
472 | 500 | $generatorContainer = $( '#api-sandbox-generator-inputs' ); |
473 | 501 | $queryContainer = $( '#api-sandbox-query-inputs' ); |
474 | 502 | $generatorBox = $( '#api-sandbox-generator-parameters' ); |
475 | | - $submit = $( '#api-sandbox-submit' ); |
476 | 503 | $requestUrl = $( '#api-sandbox-url' ); |
477 | 504 | $requestPost = $( '#api-sandbox-post' ); |
478 | 505 | $output = $( '#api-sandbox-output' ); |
479 | 506 | $postRow = $( '#api-sandbox-post-row' ); |
480 | 507 | $buttonsContainer = $( '#api-sandbox-buttons' ); |
| 508 | + $examplesContent = $( '#api-sandbox-examples' ); |
| 509 | + $pageScroll = $( getScrollableElement( 'body', 'html' ) ); |
| 510 | + $form = $( '#api-sandbox-form' ); |
| 511 | + $submit = $( '<button>' ) |
| 512 | + .text( mw.msg( 'apisb-submit' ) ) |
| 513 | + .appendTo( $buttonsContainer ); |
| 514 | + $submit = $submit.clone( /*dataAndEvents=*/true, /*deep=*/true ) |
| 515 | + .appendTo( '#api-sandbox-parameters' ) |
| 516 | + .add( $submit ) |
| 517 | + .click( function ( e ) { |
| 518 | + // Avoid triggering other stuff, including the sister-button |
| 519 | + e.stopImmediatePropagation(); |
| 520 | + $form.submit(); |
| 521 | + } ) |
| 522 | + .button({ disabled: true }); |
| 523 | + |
481 | 524 | $examplesButton = $( '<button>' ) |
| 525 | + .text( mw.msg( 'apisb-examples' ) ) |
482 | 526 | .click( function ( e ) { |
483 | | - e.preventDefault(); |
484 | 527 | $examplesContent.slideToggle(); |
485 | 528 | } ) |
| 529 | + .button() |
486 | 530 | .hide() |
487 | 531 | .appendTo( $buttonsContainer ); |
488 | | - $examplesContent = $( '#api-sandbox-examples' ); |
489 | 532 | |
| 533 | + $( '<button>' ) |
| 534 | + .text( mw.msg( 'apisb-clear' ) ) |
| 535 | + .click( function ( e ) { |
| 536 | + resetUI(); |
| 537 | + } ) |
| 538 | + .button() |
| 539 | + .appendTo( $buttonsContainer ); |
| 540 | + |
490 | 541 | // init caches |
491 | 542 | paramInfo = { modules: {}, querymodules: {} }; |
492 | 543 | namespaceOptions = []; |
— | — | @@ -503,14 +554,6 @@ |
504 | 555 | } |
505 | 556 | } ); |
506 | 557 | |
507 | | - $( '<button>' ) |
508 | | - .text( mw.msg( 'apisb-clear' ) ) |
509 | | - .click( function ( e ) { |
510 | | - e.preventDefault(); |
511 | | - resetUI(); |
512 | | - } ) |
513 | | - .insertAfter( $examplesButton ); |
514 | | - |
515 | 558 | // load stuff we need from the beginning |
516 | 559 | getParamInfo( |
517 | 560 | { |
— | — | @@ -554,19 +597,18 @@ |
555 | 598 | } ); |
556 | 599 | |
557 | 600 | |
558 | | - $( '#api-sandbox-form' ).submit( function ( e ) { |
559 | | - var url, params, mustBePosted, data; |
| 601 | + $form.submit( function ( e ) { |
| 602 | + var url, params, mustBePosted; |
560 | 603 | |
561 | 604 | e.preventDefault(); |
562 | 605 | |
563 | | - if ( $submit.prop( 'disabled' ) === true ) { |
| 606 | + if ( $submit.button( 'option', 'disabled' ) === true ) { |
564 | 607 | return; |
565 | 608 | } |
566 | 609 | |
567 | 610 | url = mw.util.wikiScript( 'api' ) + '?' + $.param({ action: $action.val() }); |
568 | 611 | params = mainRequest.getRequestData(); |
569 | 612 | mustBePosted = mainRequest.info.mustbeposted === ''; |
570 | | - debugger; |
571 | 613 | if ( $action.val() === 'query' ) { |
572 | 614 | url += '&' + $query.val(); |
573 | 615 | params += queryRequest.getRequestData(); |
— | — | @@ -591,7 +633,7 @@ |
592 | 634 | $postRow.hide(); |
593 | 635 | } |
594 | 636 | url = url.replace( /(&format=[^&]+)/, '$1fm' ); |
595 | | - data = { |
| 637 | + $.ajax({ |
596 | 638 | url: url, |
597 | 639 | data: params, |
598 | 640 | dataType: 'text', |
— | — | @@ -608,9 +650,14 @@ |
609 | 651 | }, |
610 | 652 | error: function () { |
611 | 653 | showLoadError( $output, 'apisb-request-error' ); |
| 654 | + }, |
| 655 | + // either success or error |
| 656 | + complete: function () { |
| 657 | + $pageScroll.animate({ scrollTop: $('#api-sandbox-result').offset().top }, 400, function () { |
| 658 | + window.location.hash = '#api-sandbox-result'; |
| 659 | + }); |
612 | 660 | } |
613 | | - }; |
614 | | - $.ajax( data ); |
| 661 | + }); |
615 | 662 | }); |
616 | 663 | |
617 | 664 | }); |
Index: trunk/extensions/ApiSandbox/ApiSandbox.i18n.php |
— | — | @@ -22,6 +22,10 @@ |
23 | 23 | 'apisb-select-action' => 'Select action', |
24 | 24 | 'apisb-select-query' => 'What to query?', |
25 | 25 | 'apisb-select-value' => 'Select value', |
| 26 | + 'apisb-docs-more' => 'read more', |
| 27 | + 'apisb-params-param' => 'Parameter', |
| 28 | + 'apisb-params-input' => 'Input', |
| 29 | + 'apisb-params-desc' => 'Description', |
26 | 30 | 'apisb-loading' => 'Loading...', |
27 | 31 | 'apisb-load-error' => 'Error loading API description', |
28 | 32 | 'apisb-request-error' => 'Error performing API request', |
— | — | @@ -128,7 +132,7 @@ |
129 | 133 | 'apisb-generator-parameters' => 'Генератор', |
130 | 134 | ); |
131 | 135 | |
132 | | -/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
| 136 | +/** Belarusian (Taraškievica orthography) (Беларуская (тарашкевіца)) |
133 | 137 | * @author EugeneZelenko |
134 | 138 | * @author Jim-by |
135 | 139 | * @author Wizardist |
— | — | @@ -278,7 +282,7 @@ |
279 | 283 | 'apisb-clear' => 'Leeren', |
280 | 284 | ); |
281 | 285 | |
282 | | -/** German (formal address) (Deutsch (Sie-Form)) |
| 286 | +/** German (formal address) (Deutsch (Sie-Form)) |
283 | 287 | * @author Kghbln |
284 | 288 | */ |
285 | 289 | $messages['de-formal'] = array( |
— | — | @@ -867,7 +871,7 @@ |
868 | 872 | 'apisb-query-list' => 'Leste', |
869 | 873 | ); |
870 | 874 | |
871 | | -/** Kurdish (Latin script) (Kurdî (latînî)) |
| 875 | +/** Kurdish (Latin script) (Kurdî (latînî)) |
872 | 876 | * @author George Animal |
873 | 877 | */ |
874 | 878 | $messages['ku-latn'] = array( |
— | — | @@ -1051,7 +1055,7 @@ |
1052 | 1056 | 'apisb-clear' => 'Padamkan', |
1053 | 1057 | ); |
1054 | 1058 | |
1055 | | -/** Norwegian (bokmål) (Norsk (bokmål)) |
| 1059 | +/** Norwegian (bokmål) (Norsk (bokmål)) |
1056 | 1060 | * @author Nghtwlkr |
1057 | 1061 | */ |
1058 | 1062 | $messages['nb'] = array( |
— | — | @@ -1470,7 +1474,7 @@ |
1471 | 1475 | 'apisb-clear' => 'Počisti', |
1472 | 1476 | ); |
1473 | 1477 | |
1474 | | -/** Serbian (Cyrillic script) (Српски (ћирилица)) |
| 1478 | +/** Serbian (Cyrillic script) (Српски (ћирилица)) |
1475 | 1479 | * @author Rancher |
1476 | 1480 | */ |
1477 | 1481 | $messages['sr-ec'] = array( |
— | — | @@ -1676,7 +1680,7 @@ |
1677 | 1681 | 'apisb-query-list' => 'ליסטעס', |
1678 | 1682 | ); |
1679 | 1683 | |
1680 | | -/** Simplified Chinese (中文(简体)) |
| 1684 | +/** Simplified Chinese (中文(简体)) |
1681 | 1685 | * @author Anakmalaysia |
1682 | 1686 | * @author Hydra |
1683 | 1687 | * @author Hzy980512 |
— | — | @@ -1715,7 +1719,7 @@ |
1716 | 1720 | 'apisb-examples' => '示例', |
1717 | 1721 | ); |
1718 | 1722 | |
1719 | | -/** Traditional Chinese (中文(繁體)) |
| 1723 | +/** Traditional Chinese (中文(繁體)) |
1720 | 1724 | * @author Anakmalaysia |
1721 | 1725 | * @author Liangent |
1722 | 1726 | */ |
Index: trunk/extensions/ApiSandbox/ApiSandbox.php |
— | — | @@ -31,14 +31,21 @@ |
32 | 32 | 'apisb-load-error', |
33 | 33 | 'apisb-request-error', |
34 | 34 | 'apisb-select-value', |
35 | | - 'apisb-namespaces-error', |
| 35 | + 'apisb-docs-more', |
| 36 | + 'apisb-params-param', |
| 37 | + 'apisb-params-input', |
| 38 | + 'apisb-params-desc', |
36 | 39 | 'apisb-ns-main', |
37 | 40 | 'apisb-example', |
38 | 41 | 'apisb-examples', |
39 | 42 | 'apisb-clear', |
| 43 | + 'apisb-submit', |
40 | 44 | 'parentheses', |
41 | 45 | ), |
42 | | - 'dependencies' => 'mediawiki.util', |
| 46 | + 'dependencies' => array( |
| 47 | + 'mediawiki.util', |
| 48 | + 'jquery.ui.button', |
| 49 | + ) |
43 | 50 | ); |
44 | 51 | |
45 | 52 | $wgHooks['APIGetDescription'][] = 'efASAPIGetDescription'; |
Index: trunk/extensions/ApiSandbox/ext.apiSandbox.css |
— | — | @@ -1,27 +1,76 @@ |
| 2 | +/* Buttons */ |
| 3 | +#api-sandbox-buttons { |
| 4 | + text-align: right; |
| 5 | +} |
| 6 | + |
| 7 | +/* Options */ |
| 8 | + |
2 | 9 | .api-sandbox-options { |
3 | 10 | width: 100%; |
| 11 | + table-layout: fixed; |
4 | 12 | } |
5 | 13 | |
6 | | -.api-sandbox-label { |
7 | | - text-align: right; |
8 | | - width: 12em; |
| 14 | +.api-sandbox-options th { |
| 15 | + text-align: left; |
| 16 | +} |
| 17 | + |
| 18 | +.api-sandbox-options td, |
| 19 | +.api-sandbox-options th { |
9 | 20 | vertical-align: top; |
| 21 | + width: 13em; |
10 | 22 | } |
11 | 23 | |
12 | | -.api-sandbox-result-label { |
| 24 | +.api-sandbox-options select { |
13 | 25 | width: 12em; |
14 | 26 | } |
15 | 27 | |
16 | | -.api-sandbox-value { |
17 | | - width: 18em; |
| 28 | +.api-sandbox-options .api-sandbox-docs-col { |
| 29 | + width: auto; |
| 30 | +} |
| 31 | + |
| 32 | +/* Params */ |
| 33 | +.api-sandbox-params { |
| 34 | + width: 100%; |
| 35 | + table-layout: fixed; |
| 36 | +} |
| 37 | + |
| 38 | +.api-sandbox-params td, |
| 39 | +.api-sandbox-params th { |
| 40 | + padding: 5px 7px; |
| 41 | +} |
| 42 | + |
| 43 | +.api-sandbox-params-label { |
18 | 44 | vertical-align: top; |
| 45 | + width: 12em; |
| 46 | + text-align: right; |
| 47 | +} |
| 48 | + |
| 49 | +.api-sandbox-params-value { |
| 50 | + width: 20em; |
| 51 | + vertical-align: top; |
19 | 52 | overflow: auto; |
20 | 53 | } |
21 | 54 | |
| 55 | +.api-sandbox-params input[type="text"] { |
| 56 | + padding: 2px 3px; |
| 57 | + width: 19em; |
| 58 | +} |
| 59 | + |
| 60 | +th.api-sandbox-params-label, |
| 61 | +th.api-sandbox-params-value { |
| 62 | + text-align: center; |
| 63 | +} |
| 64 | + |
| 65 | +/* Result */ |
| 66 | + |
22 | 67 | .api-sandbox-result-container { |
23 | 68 | width: 100%; |
24 | 69 | } |
25 | 70 | |
| 71 | +.api-sandbox-result-label { |
| 72 | + width: 12em; |
| 73 | +} |
| 74 | + |
26 | 75 | #api-sandbox-input { |
27 | 76 | width: 17em; |
28 | 77 | } |