Don't use Handlebars.compile, ember-cli includes only runtime for performance
This commit is contained in:
parent
e00d0b00a3
commit
f82025c6d5
|
@ -27,7 +27,7 @@ label = (options) ->
|
||||||
options.hashTypes.for = 'STRING'
|
options.hashTypes.for = 'STRING'
|
||||||
options.hashContexts.for = this
|
options.hashContexts.for = this
|
||||||
if options.hash.content
|
if options.hash.content
|
||||||
options.fn = Ember.Handlebars.compile("{{view.content}}")
|
view = view.extend(templateName: 'helpers/label')
|
||||||
|
|
||||||
Ember.Handlebars.helpers.view.call(this, view, options)
|
Ember.Handlebars.helpers.view.call(this, view, options)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
ErrorsView = Ember.View.extend
|
ErrorsView = Ember.View.extend
|
||||||
tagName: 'span'
|
tagName: 'span'
|
||||||
template: Ember.Handlebars.compile("{{#each view.errors}}{{message}}{{/each}}")
|
templateName: 'helpers/travis-errors'
|
||||||
classNames: ['error']
|
classNames: ['error']
|
||||||
classNameBindings: ['codes']
|
classNameBindings: ['codes']
|
||||||
attributeBindings: ['style']
|
attributeBindings: ['style']
|
||||||
|
|
1
app/templates/accounts-list/empty.hbs
Normal file
1
app/templates/accounts-list/empty.hbs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<div class="loading"><span>Loading</span></div>
|
1
app/templates/helpers/label.hbs
Normal file
1
app/templates/helpers/label.hbs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{{view.content}}
|
1
app/templates/helpers/travis-errors.hbs
Normal file
1
app/templates/helpers/travis-errors.hbs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{{#each view.errors}}{{message}}{{/each}}
|
1
app/templates/repos-list/empty.hbs
Normal file
1
app/templates/repos-list/empty.hbs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<div class="loading"><span>Loading</span></div>
|
1
app/templates/show-more-button.hbs
Normal file
1
app/templates/show-more-button.hbs
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{{view.label}}
|
|
@ -7,7 +7,7 @@ View = Ember.CollectionView.extend
|
||||||
tagName: 'ul'
|
tagName: 'ul'
|
||||||
|
|
||||||
emptyView: Ember.View.extend
|
emptyView: Ember.View.extend
|
||||||
template: Ember.Handlebars.compile('<div class="loading"><span>Loading</span></div>')
|
templateName: 'accounts-list/empty'
|
||||||
|
|
||||||
itemViewClass: Ember.View.extend
|
itemViewClass: Ember.View.extend
|
||||||
accountBinding: 'content'
|
accountBinding: 'content'
|
||||||
|
|
|
@ -6,7 +6,7 @@ View = Ember.CollectionView.extend
|
||||||
tagName: 'ul'
|
tagName: 'ul'
|
||||||
|
|
||||||
emptyView: Ember.View.extend
|
emptyView: Ember.View.extend
|
||||||
template: Ember.Handlebars.compile('<div class="loading"><span>Loading</span></div>')
|
templateName: 'repos-list/empty'
|
||||||
|
|
||||||
itemViewClass: Ember.View.extend
|
itemViewClass: Ember.View.extend
|
||||||
repoBinding: 'content'
|
repoBinding: 'content'
|
||||||
|
|
|
@ -6,7 +6,7 @@ View = Ember.View.extend
|
||||||
showMore: true
|
showMore: true
|
||||||
attributeBindings: ['disabled']
|
attributeBindings: ['disabled']
|
||||||
isLoadingBinding: 'controller.isLoading'
|
isLoadingBinding: 'controller.isLoading'
|
||||||
template: Ember.Handlebars.compile('{{view.label}}')
|
templateName: 'show-more-button'
|
||||||
|
|
||||||
disabledBinding: 'isLoading'
|
disabledBinding: 'isLoading'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user