index.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  5. <title>Loading...</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  8. <link href="vendor/bootstrap.min.css" rel="stylesheet" media="screen">
  9. <link href="vendor/prism.css" rel="stylesheet" />
  10. <link href="css/style.css" rel="stylesheet" media="screen, print">
  11. <link href="img/favicon.ico" rel="icon" type="image/x-icon">
  12. <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
  13. <link rel="icon" type="image/png" sizes="32x32" href="img/favicon-32x32.png">
  14. <link rel="icon" type="image/png" sizes="16x16" href="img/favicon-16x16.png">
  15. <script src="vendor/polyfill.js"></script>
  16. </head>
  17. <body class="container-fluid">
  18. <script id="template-sidenav" type="text/x-handlebars-template">
  19. <nav id="scrollingNav">
  20. <div class="sidenav-search">
  21. <input class="form-control search" type="text" placeholder="{{__ "Filter..."}}">
  22. <span class="search-reset">x</span>
  23. </div>
  24. <ul class="sidenav nav nav-list list">
  25. {{#each nav}}
  26. {{#if title}}
  27. {{#if isHeader}}
  28. {{#if isFixed}}
  29. <li class="nav-fixed nav-header navbar-btn nav-list-item" data-group="{{group}}"><a href="#api-{{group}}" data-name="show-api-{{group}}" class="show-api api-{{group}}-init">{{underscoreToSpace title}}</a></li>
  30. {{else}}
  31. <li class="nav-header nav-list-item" data-group="{{group}}"><a href="#api-{{group}}" data-group="show-api-{{group}}" class="show-group api-{{group}}-init">{{underscoreToSpace title}}</a></li>
  32. {{/if}}
  33. {{else}}
  34. <li class="{{#if hidden}}hide {{/if}}" data-group="{{group}}" data-name="{{name}}" data-version="{{version}}">
  35. <a href="#api-{{group}}-{{name}}" title="{{url}}" data-group="show-api-{{group}}" data-name="show-api-{{group}}-{{name}}" class="nav-list-item show-api api-{{group}}-{{name}}-init">{{title}}<div class="nav-list-url-item hide">{{url}}</div></a>
  36. </li>
  37. {{/if}}
  38. {{/if}}
  39. {{/each}}
  40. </ul>
  41. </nav>
  42. </script>
  43. <script id="template-project" type="text/x-handlebars-template">
  44. <div class="pull-left">
  45. <h1>{{name}}</h1>
  46. {{#if description}}<h2>{{{nl2br description}}}</h2>{{/if}}
  47. </div>
  48. <div class="pull-right">
  49. {{#if template.withCompare}}
  50. <div class="btn-group">
  51. <button id="version" class="btn btn-lg btn-default dropdown-toggle" data-toggle="dropdown">
  52. <strong>{{version}}</strong>&nbsp;<span class="caret"></span>
  53. </button>
  54. <ul id="versions" class="dropdown-menu open-left">
  55. <li><a id="compareAllWithPredecessor" href="#">{{__ "Compare all with predecessor"}}</a></li>
  56. <li class="divider"></li>
  57. <li class="disabled"><a href="#">{{__ "show up to version:"}}</a></li>
  58. {{#each versions}}
  59. <li class="version"><a href="#">{{this}}</a></li>
  60. {{/each}}
  61. </ul>
  62. </div>
  63. {{else}}
  64. <div id="version" class="well well-sm">
  65. <strong>{{version}}</strong>
  66. </div>
  67. {{/if}}
  68. </div>
  69. <div class="clearfix"></div>
  70. </script>
  71. <script id="template-header" type="text/x-handlebars-template">
  72. {{#if content}}
  73. <div id="api-_" class="show-api-article show-api-_-article">{{{content}}}</div>
  74. {{/if}}
  75. </script>
  76. <script id="template-footer" type="text/x-handlebars-template">
  77. {{#if content}}
  78. <div id="api-_footer" class="show-api-article show-api-_-article">{{{content}}}</div>
  79. {{/if}}
  80. </script>
  81. <script id="template-generator" type="text/x-handlebars-template">
  82. {{#if template.withGenerator}}
  83. {{#if generator}}
  84. <div class="content">
  85. {{__ "Generated with"}} <a href="{{{generator.url}}}">{{{generator.name}}}</a> {{{generator.version}}} - {{{generator.time}}}
  86. </div>
  87. {{/if}}
  88. {{/if}}
  89. </script>
  90. <script id="template-sections" type="text/x-handlebars-template">
  91. <section id="api-{{group}}" class="show-api-group show-api-{{group}}-group {{#if aloneDisplay}} hide{{/if}}">
  92. <h1>{{underscoreToSpace title}}</h1>
  93. {{#if description}}
  94. <p>{{{nl2br description}}}</p>
  95. {{/if}}
  96. {{#each articles}}
  97. <div id="api-{{group}}-{{name}}" class="show-api-article show-api-{{group}}-article show-api-{{group}}-{{name}}-article {{#if aloneDisplay}} hide{{/if}}">
  98. {{{article}}}
  99. </div>
  100. {{/each}}
  101. </section>
  102. </script>
  103. <script id="template-article" type="text/x-handlebars-template">
  104. <article id="api-{{article.group}}-{{article.name}}-{{article.version}}" {{#if hidden}}class="hide"{{/if}} data-group="{{article.group}}" data-name="{{article.name}}" data-version="{{article.version}}">
  105. <div class="pull-left">
  106. <h1>{{underscoreToSpace article.groupTitle}}{{#if article.title}} - {{article.title}}{{/if}}</h1>
  107. </div>
  108. {{#if template.withCompare}}
  109. <div class="pull-right">
  110. <div class="btn-group">
  111. <button class="version btn btn-default dropdown-toggle" data-toggle="dropdown">
  112. <strong>{{article.version}}</strong>&nbsp;<span class="caret"></span>
  113. </button>
  114. <ul class="versions dropdown-menu open-left">
  115. <li class="disabled"><a href="#">{{__ "compare changes to:"}}</a></li>
  116. {{#each versions}}
  117. <li class="version"><a href="#">{{this}}</a></li>
  118. {{/each}}
  119. </ul>
  120. </div>
  121. </div>
  122. {{/if}}
  123. <div class="clearfix"></div>
  124. {{#if article.author}}<h4 class="muted">Authored by: {{article.author}}</h4>{{/if}}
  125. {{#if article.deprecated}}
  126. <p class="deprecated"><span>{{__ "DEPRECATED"}}</span>
  127. {{{markdown article.deprecated.content}}}
  128. </p>
  129. {{/if}}
  130. {{#if article.description}}
  131. <p>{{{nl2br article.description}}}</p>
  132. {{/if}}
  133. <span class="type type__{{toLowerCase article.type}}">{{toLowerCase article.type}}</span>
  134. <pre data-type="{{toLowerCase article.type}}"><code class="language-http">{{article.url}}</code></pre>
  135. {{#if article.permission}}
  136. <p>
  137. {{__ "Permission:"}}
  138. {{#each article.permission}}
  139. {{name}}
  140. {{#if title}}
  141. <button type="button" class="btn btn-info btn-xs" data-title="{{title}}" data-content="{{nl2br description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
  142. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
  143. </button>
  144. {{/if}}
  145. {{/each}}
  146. </p>
  147. {{/if}}
  148. {{!-- CODE EXAMPLES IN TABS --}}
  149. {{#if_gt article.examples.length compare=0}}
  150. <ul class="nav nav-tabs nav-tabs-examples">
  151. {{#each article.examples}}
  152. <li{{#if_eq @index compare=0}} class="active"{{/if_eq}}>
  153. <a href="#examples-{{../id}}-{{@index}}">{{title}}</a>
  154. </li>
  155. {{/each}}
  156. </ul>
  157. <div class="tab-content">
  158. {{#each article.examples}}
  159. <div class="tab-pane{{#if_eq @index compare=0}} active{{/if_eq}}" id="examples-{{../id}}-{{@index}}">
  160. <pre data-type="{{type}}"><code class="language-{{type}}">{{content}}</code></pre>
  161. </div>
  162. {{/each}}
  163. </div>
  164. {{/if_gt}}
  165. {{subTemplate "article-param-block" params=article.header _hasType=_hasTypeInHeaderFields section="header"}}
  166. {{subTemplate "article-param-block" params=article.parameter _hasType=_hasTypeInParameterFields section="parameter"}}
  167. {{subTemplate "article-param-block" params=article.success _hasType=_hasTypeInSuccessFields section="success"}}
  168. {{subTemplate "article-query-block" params=article.query _hasType=_hasTypeInParameterFields section="query"}}
  169. {{subTemplate "article-param-block" params=article.body _hasType=_hasTypeInSuccessFields section="body"}}
  170. {{subTemplate "article-param-block" params=article.error _col1="Name" _hasType=_hasTypeInErrorFields section="error"}}
  171. {{subTemplate "article-sample-request" article=article id=id}}
  172. </article>
  173. </script>
  174. <script id="template-article-query-block" type="text/x-handlebars-template">
  175. {{#if article.query}}
  176. <h2>Query Parameter(s)</h2>
  177. <table>
  178. <thead>
  179. <tr>
  180. <th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
  181. {{#unless this.Type compare=null}}
  182. <th style="width: 10%">{{__ "Type"}}</th>
  183. {{/unless}}
  184. <th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
  185. </tr>
  186. </thead>
  187. <tbody>
  188. {{#each params}}
  189. <tr>
  190. <td class="code">{{this.field}}</td>
  191. {{#unless this.Type compare=null}}
  192. <td>{{this.type}}</td>
  193. {{/unless}}
  194. <td>{{{nl2br this.description}}}</td>
  195. </tr>
  196. {{/each}}
  197. </tbody>
  198. </table>
  199. {{/if}}
  200. </script>
  201. <script id="template-article-body-block" type="text/x-handlebars-template">
  202. {{#if article.body}}
  203. <h2>Request Body</h2>
  204. <table>
  205. <thead>
  206. <tr>
  207. <th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
  208. {{#unless this.Type compare=null}}
  209. <th style="width: 10%">{{__ "Type"}}</th>
  210. {{/unless}}
  211. <th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
  212. </tr>
  213. </thead>
  214. <tbody>
  215. {{#each params}}
  216. <tr>
  217. <td class="code">{{this.field}}</td>
  218. {{#unless this.Type compare=null}}
  219. <td>{{this.type}}</td>
  220. {{/unless}}
  221. <td>
  222. {{{nl2br this.description}}}
  223. {{#if defaultValue}}
  224. <p class="default-value">{{__ "Default value:"}} <code>{{{defaultValue}}}</code></p>
  225. {{/if}}
  226. {{#if size}}
  227. <p class="type-size">{{__ "Size range:"}} <code>{{{size}}}</code></p>
  228. {{/if}}
  229. {{#if allowedValues}}
  230. <p class="type-size">{{__ "Allowed values:"}}
  231. {{#each allowedValues}}
  232. <code>{{{this}}}</code>{{#unless @last}}, {{/unless}}
  233. {{/each}}
  234. </p>
  235. {{/if}}
  236. </td>
  237. </tr>
  238. {{/each}}
  239. </tbody>
  240. </table>
  241. {{/if}}
  242. </script>
  243. <script id="template-article-param-block" type="text/x-handlebars-template">
  244. {{#if params}}
  245. {{#each params.fields}}
  246. <h2>{{__ @key}}</h2>
  247. <table>
  248. <thead>
  249. <tr>
  250. <th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
  251. {{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
  252. <th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
  253. </tr>
  254. </thead>
  255. <tbody>
  256. {{#each this}}
  257. <tr>
  258. <td class="code">{{{splitFill field "." "&nbsp;&nbsp;"}}}{{#if optional}}<span class="label label-optional">{{__ "optional"}}</span>{{/if}}</td>
  259. {{#if ../../_hasType}}
  260. <td>
  261. {{{type}}}
  262. </td>
  263. {{/if}}
  264. <td>
  265. {{{nl2br description}}}
  266. {{#if defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{defaultValue}}}</code></p>{{/if}}
  267. {{#if size}}<p class="type-size">{{__ "Size range:"}} <code>{{{size}}}</code></p>{{/if}}
  268. {{#if allowedValues}}<p class="type-size">{{__ "Allowed values:"}}
  269. {{#each allowedValues}}
  270. <code>{{{this}}}</code>{{#unless @last}}, {{/unless}}
  271. {{/each}}
  272. </p>
  273. {{/if}}
  274. </td>
  275. </tr>
  276. {{/each}}
  277. </tbody>
  278. </table>
  279. {{/each}}
  280. {{#if_gt params.examples.length compare=0}}
  281. <ul class="nav nav-tabs nav-tabs-examples">
  282. {{#each params.examples}}
  283. <li{{#if_eq @index compare=0}} class="active"{{/if_eq}}>
  284. <a href="#{{../section}}-examples-{{../id}}-{{@index}}">{{title}}</a>
  285. </li>
  286. {{/each}}
  287. </ul>
  288. <div class="tab-content">
  289. {{#each params.examples}}
  290. <div class="tab-pane{{#if_eq @index compare=0}} active{{/if_eq}}" id="{{../section}}-examples-{{../id}}-{{@index}}">
  291. <pre data-type="{{type}}"><code class="language-{{type}}">{{reformat content type}}</code></pre>
  292. </div>
  293. {{/each}}
  294. </div>
  295. {{/if_gt}}
  296. {{/if}}
  297. </script>
  298. <script id="template-article-sample-request" type="text/x-handlebars-template">
  299. {{#if article.sampleRequest}}
  300. <h2>{{__ "Send a Sample Request"}}</h2>
  301. <form class="form-horizontal">
  302. <fieldset>
  303. <div class="form-group">
  304. <label class="col-md-3 control-label" for="{{../id}}-sample-request-url"></label>
  305. <div class="input-group">
  306. <input id="{{../id}}-sample-request-url" type="text" class="form-control sample-request-url" value="{{article.sampleRequest.0.url}}" />
  307. <span class="input-group-addon">{{__ "url"}}</span>
  308. </div>
  309. </div>
  310. {{#if article.header}}
  311. {{#if article.header.fields}}
  312. <h3>{{__ "Headers"}}</h3>
  313. {{#each article.header.fields}}
  314. <h4><input type="checkbox" data-sample-request-header-group-id="sample-request-header-{{@index}}" name="{{../id}}-sample-request-header" value="{{@index}}" class="sample-request-header sample-request-switch" checked />{{__ @key}}</h4>
  315. <div class="{{../id}}-sample-request-header-fields">
  316. {{#each this}}
  317. <div class="form-group">
  318. <label class="col-md-3 control-label" for="sample-request-header-field-{{field}}">{{field}}</label>
  319. <div class="input-group">
  320. <input type="text" placeholder="{{field}}" value="{{defaultValue}}" id="sample-request-header-field-{{field}}" class="form-control sample-request-header" data-sample-request-header-name="{{field}}" data-sample-request-header-group="sample-request-header-{{@../index}}">
  321. <span class="input-group-addon">{{{type}}}</span>
  322. </div>
  323. </div>
  324. {{/each}}
  325. </div>
  326. {{/each}}
  327. {{/if}}
  328. {{/if}}
  329. {{#if article.parameter}}
  330. {{#if article.parameter.fields}}
  331. <h3>{{__ "Parameters"}}</h3>
  332. {{#each article.parameter.fields}}
  333. <h4><input type="checkbox" data-sample-request-param-group-id="sample-request-param-{{@index}}" name="{{../id}}-sample-request-param" value="{{@index}}" class="sample-request-param sample-request-switch" checked/>{{__ @key}}
  334. <select name="{{../id}}-sample-header-content-type" class="{{../id}}-sample-request-param-select sample-header-content-type sample-header-content-type-switch">
  335. <option value="undefined" selected>ajax-auto</option>
  336. <option value="body-json" >body/json</option>
  337. <option value="body-form-data" >body/form-data</option>
  338. </select>
  339. </h4>
  340. <div class="{{../id}}-sample-request-param-body {{../id}}-sample-header-content-type-body hide">
  341. <div class="form-group">
  342. <div class="input-group">
  343. <textarea id="sample-request-body-json" class="form-control sample-request-body" data-sample-request-body-group="sample-request-param-{{@./index}}" rows="6" style="OVERFLOW: visible" {{#if optional}}data-sample-request-param-optional="true"{{/if}}></textarea>
  344. <div class="input-group-addon">json</div>
  345. </div>
  346. </div>
  347. </div>
  348. <div class="{{../id}}-sample-request-param-fields {{../id}}-sample-header-content-type-fields">
  349. {{#each this}}
  350. <div class="form-group">
  351. <label class="col-md-3 control-label" for="sample-request-param-field-{{field}}">{{field}}</label>
  352. <div class="input-group">
  353. <input id="sample-request-param-field-{{field}}" type="{{setInputType type}}" placeholder="{{field}}" class="form-control sample-request-param" data-sample-request-param-name="{{field}}" data-sample-request-param-group="sample-request-param-{{@../index}}" {{#if optional}}data-sample-request-param-optional="true"{{/if}}>
  354. <div class="input-group-addon">{{{type}}}</div>
  355. </div>
  356. </div>
  357. {{/each}}
  358. </div>
  359. {{/each}}
  360. {{/if}}
  361. {{/if}}
  362. {{#if article.query}}
  363. <h3>{{__ "Query Parameters"}}</h3>
  364. <div class="{{../id}}-sample-request-param-fields {{../id}}-sample-header-content-type-fields">
  365. {{#each article.query}}
  366. <div class="form-group">
  367. <label class="col-md-3 control-label" for="sample-request-param-field-{{field}}">{{field}}</label>
  368. <div class="input-group">
  369. <input id="sample-request-param-field-{{field}}" type="{{setInputType type}}" placeholder="{{field}}" class="form-control sample-request-param" data-sample-request-param-name="{{field}}"
  370. data-sample-request-param-group="sample-request-param-{{@../index}}" {{#if optional}}data-sample-request-param-optional="true" {{/if}}>
  371. <div class="input-group-addon">{{{type}}}</div>
  372. </div>
  373. </div>
  374. {{/each}}
  375. </div>
  376. {{/if}}
  377. {{#if article.body}}
  378. {{log this}}
  379. <h3>{{__ "Body"}}</h3>
  380. <h4><input type="checkbox" data-sample-request-param-group-id="sample-request-param-{{@index}}" name="{{this.id}}-sample-request-param" value="{{@index}}" class="sample-request-param sample-request-switch" checked />{{__ @key}}
  381. <select name="{{this.id}}-sample-header-content-type" class="{{this.id}}-sample-request-param-select sample-header-content-type sample-header-content-type-switch">
  382. <option value="body-json" selected>body/json</option>
  383. <option value="body-form-data">body/form-data</option>
  384. </select>
  385. </h4>
  386. <div class="{{this.id}}-sample-request-param-body {{this.id}}-sample-header-content-type-body">
  387. <div class="form-group">
  388. <div class="input-group">
  389. <textarea id="sample-request-body-json" class="form-control sample-request-body" data-sample-request-body-group="sample-request-param-{{@./index}}" rows="6" style="OVERFLOW: visible"
  390. {{#if optional}}data-sample-request-param-optional="true" {{/if}}>{{gen_body article.body}}</textarea>
  391. <div class="input-group-addon">json</div>
  392. </div>
  393. </div>
  394. </div>
  395. <div class="{{this.id}}-sample-request-param-fields {{this.id}}-sample-header-content-type-fields hide">
  396. {{#each article.body}}
  397. <div class="form-group">
  398. <label class="col-md-3 control-label" for="sample-request-param-field-{{field}}">{{field}}</label>
  399. <div class="input-group">
  400. <input id="sample-request-param-field-{{field}}" type="{{setInputType type}}" placeholder="{{field}}" class="form-control sample-request-param" data-sample-request-param-name="{{field}}"
  401. data-sample-request-param-group="sample-request-param-{{@../index}}" {{#if optional}}data-sample-request-param-optional="true" {{/if}}>
  402. <div class="input-group-addon">{{{type}}}</div>
  403. </div>
  404. </div>
  405. {{/each}}
  406. </div>
  407. {{/if}}
  408. <div class="form-group">
  409. <div class="controls pull-right">
  410. <button class="btn btn-primary sample-request-send" data-sample-request-type="{{article.type}}">{{__ "Send"}}</button>
  411. </div>
  412. </div>
  413. <div class="form-group sample-request-response" style="display: none;">
  414. <h3>
  415. {{__ "Response"}}
  416. <button class="btn btn-default btn-xs pull-right sample-request-clear">X</button>
  417. </h3>
  418. <pre data-type="json"><code class="language-json sample-request-response-json"></code></pre>
  419. </div>
  420. </fieldset>
  421. </form>
  422. {{/if}}
  423. </script>
  424. <script id="template-compare-article" type="text/x-handlebars-template">
  425. <article id="api-{{article.group}}-{{article.name}}-{{article.version}}" {{#if hidden}}class="hide"{{/if}} data-group="{{article.group}}" data-name="{{article.name}}" data-version="{{article.version}}" data-compare-version="{{compare.version}}">
  426. <div class="pull-left">
  427. <h1>{{underscoreToSpace article.group}} - {{{showDiff article.title compare.title}}}</h1>
  428. </div>
  429. <div class="pull-right">
  430. <div class="btn-group">
  431. <button class="btn btn-success" disabled>
  432. <strong>{{article.version}}</strong> {{__ "compared to"}}
  433. </button>
  434. <button class="version btn btn-danger dropdown-toggle" data-toggle="dropdown">
  435. <strong>{{compare.version}}</strong>&nbsp;<span class="caret"></span>
  436. </button>
  437. <ul class="versions dropdown-menu open-left">
  438. <li class="disabled"><a href="#">{{__ "compare changes to:"}}</a></li>
  439. <li class="divider"></li>
  440. {{#each versions}}
  441. <li class="version"><a href="#">{{this}}</a></li>
  442. {{/each}}
  443. </ul>
  444. </div>
  445. </div>
  446. <div class="clearfix"></div>
  447. {{#if article.description}}
  448. <p>{{{showDiff article.description compare.description "nl2br"}}}</p>
  449. {{else}}
  450. {{#if compare.description}}
  451. <p>{{{showDiff "" compare.description "nl2br"}}}</p>
  452. {{/if}}
  453. {{/if}}
  454. <pre data-type="{{toLowerCase article.type}}"><code class="language-html">{{{showDiff article.url compare.url}}}</code></pre>
  455. {{subTemplate "article-compare-permission" article=article compare=compare}}
  456. <ul class="nav nav-tabs nav-tabs-examples">
  457. {{#each_compare_title article.examples compare.examples}}
  458. {{#if typeSame}}
  459. <li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
  460. <a href="#compare-examples-{{../../article.id}}-{{index}}">{{{showDiff source.title compare.title}}}</a>
  461. </li>
  462. {{/if}}
  463. {{#if typeIns}}
  464. <li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
  465. <a href="#compare-examples-{{../../article.id}}-{{index}}"><ins>{{{source.title}}}</ins></a>
  466. </li>
  467. {{/if}}
  468. {{#if typeDel}}
  469. <li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
  470. <a href="#compare-examples-{{../../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a>
  471. </li>
  472. {{/if}}
  473. {{/each_compare_title}}
  474. </ul>
  475. <div class="tab-content">
  476. {{#each_compare_title article.examples compare.examples}}
  477. {{#if typeSame}}
  478. <div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="compare-examples-{{../../article.id}}-{{index}}">
  479. <pre data-type="{{source.type}}"><code class="language-{{source.type}}">{{{showDiff source.content compare.content}}}</code></pre>
  480. </div>
  481. {{/if}}
  482. {{#if typeIns}}
  483. <div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="compare-examples-{{../../article.id}}-{{index}}">
  484. <pre data-type="{{source.type}}"><code class="language-{{source.type}}">{{{source.content}}}</code></pre>
  485. </div>
  486. {{/if}}
  487. {{#if typeDel}}
  488. <div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="compare-examples-{{../../article.id}}-{{index}}">
  489. <pre data-type="{{compare.type}}"><code class="language-{{source.type}}">{{{compare.content}}}</code></pre>
  490. </div>
  491. {{/if}}
  492. {{/each_compare_title}}
  493. </div>
  494. {{subTemplate "article-compare-param-block" source=article.parameter compare=compare.parameter _hasType=_hasTypeInParameterFields section="parameter"}}
  495. {{subTemplate "article-compare-param-block" source=article.success compare=compare.success _hasType=_hasTypeInSuccessFields section="success"}}
  496. {{subTemplate "article-compare-param-block" source=article.error compare=compare.error _col1="Name" _hasType=_hasTypeInErrorFields section="error"}}
  497. {{subTemplate "article-sample-request" article=article id=id}}
  498. </article>
  499. </script>
  500. <script id="template-article-compare-permission" type="text/x-handlebars-template">
  501. <p>
  502. {{__ "Permission:"}}
  503. {{#each_compare_list_field article.permission compare.permission field="name"}}
  504. {{#if source}}
  505. {{#if typeSame}}
  506. {{source.name}}
  507. {{#if source.title}}
  508. <button type="button" class="btn btn-info btn-xs" data-title="{{source.title}}" data-content="{{nl2br source.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
  509. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
  510. </button>
  511. {{#unless _last}}, {{/unless}}
  512. {{/if}}
  513. {{/if}}
  514. {{#if typeIns}}
  515. <ins>{{source.name}}</ins>
  516. {{#if source.title}}
  517. <button type="button" class="btn btn-info btn-xs" data-title="{{source.title}}" data-content="{{nl2br source.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
  518. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
  519. </button>
  520. {{#unless _last}}, {{/unless}}
  521. {{/if}}
  522. {{/if}}
  523. {{#if typeDel}}
  524. <del>{{source.name}}</del>
  525. {{#if source.title}}
  526. <button type="button" class="btn btn-info btn-xs" data-title="{{source.title}}" data-content="{{nl2br source.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
  527. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
  528. </button>
  529. {{#unless _last}}, {{/unless}}
  530. {{/if}}
  531. {{/if}}
  532. {{else}}
  533. {{#if typeSame}}
  534. {{compare.name}}
  535. {{#if compare.title}}
  536. <button type="button" class="btn btn-info btn-xs" data-title="{{compare.title}}" data-content="{{nl2br compare.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
  537. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
  538. </button>
  539. {{#unless _last}}, {{/unless}}
  540. {{/if}}
  541. {{/if}}
  542. {{#if typeIns}}
  543. <ins>{{compare.name}}</ins>
  544. {{#if compare.title}}
  545. <button type="button" class="btn btn-info btn-xs" data-title="{{compare.title}}" data-content="{{nl2br compare.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
  546. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
  547. </button>
  548. {{#unless _last}}, {{/unless}}
  549. {{/if}}
  550. {{/if}}
  551. {{#if typeDel}}
  552. <del>{{compare.name}}</del>
  553. {{#if compare.title}}
  554. <button type="button" class="btn btn-info btn-xs" data-title="{{compare.title}}" data-content="{{nl2br compare.description}}" data-html="true" data-toggle="popover" data-placement="right" data-trigger="hover">
  555. <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
  556. </button>
  557. {{#unless _last}}, {{/unless}}
  558. {{/if}}
  559. {{/if}}
  560. {{/if}}
  561. {{/each_compare_list_field}}
  562. </p>
  563. </script>
  564. <script id="template-article-compare-param-block" type="text/x-handlebars-template">
  565. {{#if source}}
  566. {{#each_compare_keys source.fields compare.fields}}
  567. {{#if typeSame}}
  568. <h2>{{__ source.key}}</h2>
  569. <table>
  570. <thead>
  571. <tr>
  572. <th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
  573. {{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
  574. <th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
  575. </tr>
  576. </thead>
  577. {{subTemplate "article-compare-param-block-body" source=source.value compare=compare.value _hasType=../_hasType}}
  578. </table>
  579. {{/if}}
  580. {{#if typeIns}}
  581. <h2><ins>{{__ source.key}}</ins></h2>
  582. <table class="ins">
  583. <thead>
  584. <tr>
  585. <th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
  586. {{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
  587. <th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
  588. </tr>
  589. </thead>
  590. {{subTemplate "article-compare-param-block-body" source=source.value compare=source.value _hasType=../_hasType}}
  591. </table>
  592. {{/if}}
  593. {{#if typeDel}}
  594. <h2><del>{{__ compare.key}}</del></h2>
  595. <table class="del">
  596. <thead>
  597. <tr>
  598. <th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
  599. {{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
  600. <th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
  601. </tr>
  602. </thead>
  603. {{subTemplate "article-compare-param-block-body" source=compare.value compare=compare.value _hasType=../_hasType}}
  604. </table>
  605. {{/if}}
  606. {{/each_compare_keys}}
  607. {{#if source.examples}}
  608. <ul class="nav nav-tabs nav-tabs-examples">
  609. {{#each_compare_title source.examples compare.examples}}
  610. {{#if typeSame}}
  611. <li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
  612. <a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">{{{showDiff source.title compare.title}}}</a>
  613. </li>
  614. {{/if}}
  615. {{#if typeIns}}
  616. <li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
  617. <a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}"><ins>{{{source.title}}}</ins></a>
  618. </li>
  619. {{/if}}
  620. {{#if typeDel}}
  621. <li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
  622. <a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a>
  623. </li>
  624. {{/if}}
  625. {{/each_compare_title}}
  626. </ul>
  627. <div class="tab-content">
  628. {{#each_compare_title source.examples compare.examples}}
  629. {{#if typeSame}}
  630. <div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
  631. <pre data-type="{{source.type}}"><code class="language-{{source.type}}">{{{showDiff source.content compare.content}}}</code></pre>
  632. </div>
  633. {{/if}}
  634. {{#if typeIns}}
  635. <div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
  636. <pre data-type="{{source.type}}"><code class="language-{{source.type}}">{{{source.content}}}</code></pre>
  637. </div>
  638. {{/if}}
  639. {{#if typeDel}}
  640. <div class="tab-pane{{#if_eq index compare=0}} active{{/if_eq}}" id="{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">
  641. <pre data-type="{{compare.type}}"><code class="language-{{source.type}}">{{{compare.content}}}</code></pre>
  642. </div>
  643. {{/if}}
  644. {{/each_compare_title}}
  645. </div>
  646. {{/if}}
  647. {{/if}}
  648. </script>
  649. <script id="template-article-compare-param-block-body" type="text/x-handlebars-template">
  650. <tbody>
  651. {{#each_compare_field source compare}}
  652. {{#if typeSame}}
  653. <tr>
  654. <td class="code">
  655. {{{splitFill source.field "." "&nbsp;&nbsp;"}}}
  656. {{#if source.optional}}
  657. {{#if compare.optional}} <span class="label label-optional">{{__ "optional"}}</span>
  658. {{else}} <span class="label label-optional label-ins">{{__ "optional"}}</span>
  659. {{/if}}
  660. {{else}}
  661. {{#if compare.optional}} <span class="label label-optional label-del">{{__ "optional"}}</span>{{/if}}
  662. {{/if}}
  663. </td>
  664. {{#if source.type}}
  665. {{#if compare.type}}
  666. <td>{{{showDiff source.type compare.type}}}</td>
  667. {{else}}
  668. <td>{{{source.type}}}</td>
  669. {{/if}}
  670. {{else}}
  671. {{#if compare.type}}
  672. <td>{{{compare.type}}}</td>
  673. {{else}}
  674. {{#if ../../../../_hasType}}<td></td>{{/if}}
  675. {{/if}}
  676. {{/if}}
  677. <td>
  678. {{{showDiff source.description compare.description "nl2br"}}}
  679. {{#if source.defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{showDiff source.defaultValue compare.defaultValue}}}</code><p>{{/if}}
  680. </td>
  681. </tr>
  682. {{/if}}
  683. {{#if typeIns}}
  684. <tr class="ins">
  685. <td class="code">
  686. {{{splitFill source.field "." "&nbsp;&nbsp;"}}}
  687. {{#if source.optional}} <span class="label label-optional label-ins">{{__ "optional"}}</span>{{/if}}
  688. </td>
  689. {{#if source.type}}
  690. <td>{{{source.type}}}</td>
  691. {{else}}
  692. {{{typRowTd}}}
  693. {{/if}}
  694. <td>
  695. {{{nl2br source.description}}}
  696. {{#if source.defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{source.defaultValue}}}</code><p>{{/if}}
  697. </td>
  698. </tr>
  699. {{/if}}
  700. {{#if typeDel}}
  701. <tr class="del">
  702. <td class="code">
  703. {{{splitFill compare.field "." "&nbsp;&nbsp;"}}}
  704. {{#if compare.optional}} <span class="label label-optional label-del">{{__ "optional"}}</span>{{/if}}
  705. </td>
  706. {{#if compare.type}}
  707. <td>{{{compare.type}}}</td>
  708. {{else}}
  709. {{{typRowTd}}}
  710. {{/if}}
  711. <td>
  712. {{{nl2br compare.description}}}
  713. {{#if compare.defaultValue}}<p class="default-value">{{__ "Default value:"}} <code>{{{compare.defaultValue}}}</code><p>{{/if}}
  714. </td>
  715. </tr>
  716. {{/if}}
  717. {{/each_compare_field}}
  718. </tbody>
  719. </script>
  720. <div class="container-fluid">
  721. <div class="row">
  722. <div id="sidenav" class="span2"></div>
  723. <div id="content">
  724. <div id="project"></div>
  725. <div id="header"></div>
  726. <div id="sections"></div>
  727. <div id="footer"></div>
  728. <div id="generator"></div>
  729. </div>
  730. </div>
  731. </div>
  732. <div id="loader">
  733. <div class="spinner">
  734. <div class="spinner-container container1">
  735. <div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div>
  736. </div>
  737. <div class="spinner-container container2">
  738. <div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div>
  739. </div>
  740. <div class="spinner-container container3">
  741. <div class="circle1"></div><div class="circle2"></div><div class="circle3"></div><div class="circle4"></div>
  742. </div>
  743. <p>Loading...</p>
  744. </div>
  745. </div>
  746. <script data-main="main.js" src="vendor/require.min.js"></script>
  747. </body>
  748. </html>