Skip to content

Commit b98163c

Browse files
committed
Move inline templates to standalone template file
Refs #3161 - Move two inline template snippets from the post tags input component into the .hbs template file so they can be pre-compiled. Needed when shipping only the handlebars runtime in production mode.
1 parent 3ff9146 commit b98163c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
<label class="tag-label" for="tags" title="Tags"><span class="hidden">Tags</span></label>
22
<div class="tags">
33
{{#each tags}}
4-
{{view view.tagView tag=this}}
4+
{{#view view.tagView tag=this}}
5+
{{view.tag.name}}
6+
{{/view}}
57
{{/each}}
68
</div>
79
<input type="hidden" class="tags-holder" id="tags-holder">
810
{{view view.tagInputView class="tag-input" id="tags" value=newTagText}}
911
<ul class="suggestions overlay" {{bind-attr style=view.overlayStyles}}>
1012
{{#each suggestions}}
11-
{{view view.suggestionView suggestion=this}}
13+
{{#view view.suggestionView suggestion=this}}
14+
<a href="javascript:void(0);">{{view.suggestion.highlightedName}}</a>
15+
{{/view}}
1216
{{/each}}
1317
</ul>

core/client/views/post-tags-input.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ var PostTagsInputView = Ember.View.extend({
111111

112112
tagView: Ember.View.extend({
113113
tagName: 'span',
114-
template: Ember.Handlebars.compile('{{view.tag.name}}'),
115114
classNames: 'tag',
116115

117116
tag: null,
@@ -124,7 +123,6 @@ var PostTagsInputView = Ember.View.extend({
124123

125124
suggestionView: Ember.View.extend({
126125
tagName: 'li',
127-
template: Ember.Handlebars.compile('<a href="javascript:void(0);">{{view.suggestion.highlightedName}}</a>'),
128126
classNameBindings: 'suggestion.selected',
129127

130128
suggestion: null,

0 commit comments

Comments
 (0)