Deprecation: somethingBinding is deprecated in newer embers

This commit is contained in:
Robin Ward 2016-05-09 13:05:16 -04:00
parent e3f016a79b
commit c7beecd8e3
No known key found for this signature in database
GPG Key ID: 0E091E2B4ED1B83D
7 changed files with 5 additions and 20 deletions

View File

@ -7,7 +7,6 @@ import PermissionType from 'discourse/models/permission-type';
export default ComboboxView.extend({ export default ComboboxView.extend({
classNames: ['combobox category-combobox'], classNames: ['combobox category-combobox'],
dataAttributes: ['id', 'description_text'], dataAttributes: ['id', 'description_text'],
valueBinding: Ember.Binding.oneWay('source'),
overrideWidths: true, overrideWidths: true,
castInteger: true, castInteger: true,

View File

@ -1,4 +1,3 @@
Ember.Handlebars.registerBoundHelper("boundI18n", function(property, options) { Ember.Handlebars.registerBoundHelper("boundI18n", function(property, options) {
return new Handlebars.SafeString(I18n.t(property, options.hash)); return new Handlebars.SafeString(I18n.t(property, options.hash));
}); });

View File

@ -27,18 +27,6 @@ Discourse.Utilities = {
return size; return size;
}, },
/**
Allows us to supply bindings without "binding" to a helper.
**/
normalizeHash: function(hash, hashTypes) {
for (var prop in hash) {
if (hashTypes[prop] === 'ID') {
hash[prop + 'Binding'] = hash[prop];
delete hash[prop];
}
}
},
// Handlebars no longer allows spaces in its `escapeExpression` code which makes it // Handlebars no longer allows spaces in its `escapeExpression` code which makes it
// unsuitable for many of Discourse's uses. Use `Handlebars.Utils.escapeExpression` // unsuitable for many of Discourse's uses. Use `Handlebars.Utils.escapeExpression`
// when escaping an attribute in HTML, otherwise this one will do. // when escaping an attribute in HTML, otherwise this one will do.

View File

@ -5,7 +5,7 @@
{{d-button action="loadPreviousVersion" icon="backward" title="post.revisions.controls.previous" disabled=loadPreviousDisabled}} {{d-button action="loadPreviousVersion" icon="backward" title="post.revisions.controls.previous" disabled=loadPreviousDisabled}}
<div id="revision-numbers" class="{{unless displayRevisions 'invisible'}}"> <div id="revision-numbers" class="{{unless displayRevisions 'invisible'}}">
{{#conditional-loading-spinner condition=loading size="small"}} {{#conditional-loading-spinner condition=loading size="small"}}
{{boundI18n revisionsTextKey previousBinding="previousVersion" currentBinding="model.current_version" totalBinding="model.version_count"}} {{boundI18n revisionsTextKey previous=previousVersion current=model.current_version total=model.version_count}}
{{/conditional-loading-spinner}} {{/conditional-loading-spinner}}
</div> </div>
{{d-button action="loadNextVersion" icon="forward" title="post.revisions.controls.next" disabled=loadNextDisabled}} {{d-button action="loadNextVersion" icon="forward" title="post.revisions.controls.next" disabled=loadNextDisabled}}

View File

@ -20,7 +20,7 @@
{{text-field id="edit-title" value=buffered.title maxlength=siteSettings.max_topic_title_length autofocus="true"}} {{text-field id="edit-title" value=buffered.title maxlength=siteSettings.max_topic_title_length autofocus="true"}}
{{#if showCategoryChooser}} {{#if showCategoryChooser}}
<br> <br>
{{category-chooser valueAttribute="id" value=buffered.category_id source=buffered.category_id}} {{category-chooser valueAttribute="id" value=buffered.category_id}}
{{/if}} {{/if}}
{{#if canEditTags}} {{#if canEditTags}}

View File

@ -5,9 +5,9 @@ import Scrolling from 'discourse/mixins/scrolling';
const TopicView = Ember.View.extend(AddCategoryClass, AddArchetypeClass, Scrolling, { const TopicView = Ember.View.extend(AddCategoryClass, AddArchetypeClass, Scrolling, {
templateName: 'topic', templateName: 'topic',
topicBinding: 'controller.model', topic: Ember.computed.alias('controller.model'),
userFilters: Ember.computed.alias('controller.model.userFilters'), userFilters: Ember.computed.alias('topic.userFilters'),
classNameBindings: ['controller.multiSelect:multi-select', classNameBindings: ['controller.multiSelect:multi-select',
'topic.archetype', 'topic.archetype',
'topic.is_warning', 'topic.is_warning',
@ -119,7 +119,7 @@ const TopicView = Ember.View.extend(AddCategoryClass, AddArchetypeClass, Scrolli
this.set("offset", offset); this.set("offset", offset);
const topic = this.get('controller.model'); const topic = this.get('topic');
const showTopic = this.showTopicInHeader(topic, offset); const showTopic = this.showTopicInHeader(topic, offset);
if (showTopic !== this._lastShowTopic) { if (showTopic !== this._lastShowTopic) {
this._lastShowTopic = showTopic; this._lastShowTopic = showTopic;

View File

@ -2,5 +2,4 @@ import ScrollTop from 'discourse/mixins/scroll-top';
export default Ember.View.extend(ScrollTop, { export default Ember.View.extend(ScrollTop, {
templateName: 'user/user', templateName: 'user/user',
userBinding: 'controller.content'
}); });