Skip to content

Commit

Permalink
Upgrade handlebars to v4.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
heldersilva committed Feb 23, 2016
1 parent b1cb50e commit f8e534b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 47 deletions.
75 changes: 33 additions & 42 deletions template/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ <h1>{{name}}</h1>
<strong>{{version}}</strong>&nbsp;<span class="caret"></span>
</button>
<ul id="versions" class="dropdown-menu open-left">
<li><a id="compareAllWithPredecessor" href="#">{{__ "Compare all with predecessor"}}</a></li>
<li class="divider"></li>
<li class="disabled"><a href="#">{{__ "show up to version:"}}</a></li>
{{#each versions}}
<li><a id="compareAllWithPredecessor" href="#">{{__ "Compare all with predecessor"}}</a></li>
<li class="divider"></li>
<li class="disabled"><a href="#">{{__ "show up to version:"}}</a></li>
{{#each versions}}
<li class="version"><a href="#">{{this}}</a></li>
{{/each}}
{{/each}}
</ul>
</div>
</div>
Expand Down Expand Up @@ -108,9 +108,9 @@ <h1>{{article.groupTitle}}{{#if article.title}} - {{article.title}}{{/if}}</h1>
</button>
<ul class="versions dropdown-menu open-left">
<li class="disabled"><a href="#">{{__ "compare changes to:"}}</a></li>
{{#each versions}}
{{#each versions}}
<li class="version"><a href="#">{{this}}</a></li>
{{/each}}
{{/each}}
</ul>
</div>
</div>
Expand Down Expand Up @@ -161,7 +161,6 @@ <h1>{{article.groupTitle}}{{#if article.title}} - {{article.title}}{{/if}}</h1>
{{subTemplate "article-param-block" params=article.error _col1="Name" _hasType=_hasTypeInErrorFields section="error"}}

{{subTemplate "article-sample-request" article=article id=id}}

</article>
</script>

Expand All @@ -172,13 +171,13 @@ <h2>{{__ @key}}</h2>
<table>
<thead>
<tr>
<th style="width: 30%">{{#if ../../_col1}}{{__ ../../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#if ../../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
<th style="width: {{#if _hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
<tbody>
{{#each this}}
{{#each this}}
<tr>
<td class="code">{{{splitFill field "." "&nbsp;&nbsp;"}}}{{#if optional}} <span class="label label-optional">{{__ "optional"}}</span>{{/if}}</td>
{{#if ../../_hasType}}
Expand All @@ -198,18 +197,17 @@ <h2>{{__ @key}}</h2>
{{/if}}
</td>
</tr>
{{/each}}
{{/each}}
</tbody>
</table>
{{/each}}

{{#if_gt params.examples.length compare=0}}
<ul class="nav nav-tabs nav-tabs-examples">
{{#each params.examples}}
<li{{#if_eq @index compare=0}} class="active"{{/if_eq}}>
<a href="#{{../section}}-examples-{{../id}}-{{@index}}">{{title}}</a>
</li>
{{/each}}
{{#each params.examples}}
<li{{#if_eq @index compare=0}} class="active"{{/if_eq}}>
<a href="#{{../section}}-examples-{{../id}}-{{@index}}">{{title}}</a>
</li>
{{/each}}
</ul>

<div class="tab-content">
Expand All @@ -220,7 +218,6 @@ <h2>{{__ @key}}</h2>
{{/each}}
</div>
{{/if_gt}}

{{/if}}
</script>

Expand Down Expand Up @@ -280,15 +277,13 @@ <h4><input type="radio" data-sample-request-param-group-id="sample-request-param
<button class="btn btn-primary sample-request-send" data-sample-request-type="{{article.type}}">{{__ "Send"}}</button>
</div>
</div>

<div class="form-group sample-request-response" style="display: none;">
<h3>
{{__ "Response"}}
<button class="btn btn-default btn-xs pull-right sample-request-clear">X</button>
</h3>
<pre class="prettyprint language-json" data-type="json"><code class="sample-request-response-json"></code></pre>
</div>

</fieldset>
</form>
{{/if}}
Expand All @@ -311,9 +306,9 @@ <h1>{{underscoreToSpace article.group}} - {{{showDiff article.title compare.titl
<ul class="versions dropdown-menu open-left">
<li class="disabled"><a href="#">{{__ "compare changes to:"}}</a></li>
<li class="divider"></li>
{{#each versions}}
{{#each versions}}
<li class="version"><a href="#">{{this}}</a></li>
{{/each}}
{{/each}}
</ul>
</div>
</div>
Expand All @@ -333,7 +328,6 @@ <h1>{{underscoreToSpace article.group}} - {{{showDiff article.title compare.titl

<ul class="nav nav-tabs nav-tabs-examples">
{{#each_compare_title article.examples compare.examples}}

{{#if typeSame}}
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
<a href="#compare-examples-{{../../article.id}}-{{index}}">{{{showDiff source.title compare.title}}}</a>
Expand All @@ -351,7 +345,6 @@ <h1>{{underscoreToSpace article.group}} - {{{showDiff article.title compare.titl
<a href="#compare-examples-{{../../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a>
</li>
{{/if}}

{{/each_compare_title}}
</ul>

Expand Down Expand Up @@ -465,12 +458,12 @@ <h2>{{__ source.key}}</h2>
<table>
<thead>
<tr>
<th style="width: 30%">{{#if ../../_col1}}{{__ ../../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#if ../../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
<th style="width: {{#if _hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
{{subTemplate "article-compare-param-block-body" source=source.value compare=compare.value _hasType=../../_hasType}}
{{subTemplate "article-compare-param-block-body" source=source.value compare=compare.value _hasType=../_hasType}}
</table>
{{/if}}

Expand All @@ -479,12 +472,12 @@ <h2><ins>{{__ source.key}}</ins></h2>
<table class="ins">
<thead>
<tr>
<th style="width: 30%">{{#if ../../_col1}}{{__ ../../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#if ../../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
<th style="width: {{#if _hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
{{subTemplate "article-compare-param-block-body" source=source.value compare=source.value _hasType=../../_hasType}}
{{subTemplate "article-compare-param-block-body" source=source.value compare=source.value _hasType=../_hasType}}
</table>
{{/if}}

Expand All @@ -493,19 +486,19 @@ <h2><del>{{__ compare.key}}</del></h2>
<table class="del">
<thead>
<tr>
<th style="width: 30%">{{#if ../../_col1}}{{__ ../../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#if ../../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
<th style="width: {{#if _hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
<th style="width: 30%">{{#if ../_col1}}{{__ ../_col1}}{{else}}{{__ "Field"}}{{/if}}</th>
{{#if ../_hasType}}<th style="width: 10%">{{__ "Type"}}</th>{{/if}}
<th style="width: {{#if ../_hasType}}60%{{else}}70%{{/if}}">{{__ "Description"}}</th>
</tr>
</thead>
{{subTemplate "article-compare-param-block-body" source=compare.value compare=compare.value _hasType=../../_hasType}}
{{subTemplate "article-compare-param-block-body" source=compare.value compare=compare.value _hasType=../_hasType}}
</table>
{{/if}}
{{/each_compare_keys}}

{{#if source.examples}}
<ul class="nav nav-tabs nav-tabs-examples">
{{#each_compare_title source.examples compare.examples}}

{{#if typeSame}}
<li{{#if_eq index compare=0}} class="active"{{/if_eq}}>
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}">{{{showDiff source.title compare.title}}}</a>
Expand All @@ -523,7 +516,6 @@ <h2><del>{{__ compare.key}}</del></h2>
<a href="#{{../../section}}-compare-examples-{{../../article.id}}-{{index}}"><del>{{{compare.title}}}</del></a>
</li>
{{/if}}

{{/each_compare_title}}
</ul>

Expand All @@ -547,10 +539,9 @@ <h2><del>{{__ compare.key}}</del></h2>
<pre class="prettyprint language-{{source.type}}" data-type="{{compare.type}}"><code>{{{compare.content}}}</code></pre>
</div>
{{/if}}

{{/each_compare_title}}
</div>

{{/if}}
{{/if}}
</script>

Expand Down
Loading

0 comments on commit f8e534b

Please sign in to comment.