Deprecation: `somethingBinding` is deprecated in newer embers
This commit is contained in:
parent
e3f016a79b
commit
c7beecd8e3
|
@ -7,7 +7,6 @@ import PermissionType from 'discourse/models/permission-type';
|
|||
export default ComboboxView.extend({
|
||||
classNames: ['combobox category-combobox'],
|
||||
dataAttributes: ['id', 'description_text'],
|
||||
valueBinding: Ember.Binding.oneWay('source'),
|
||||
overrideWidths: true,
|
||||
castInteger: true,
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
Ember.Handlebars.registerBoundHelper("boundI18n", function(property, options) {
|
||||
return new Handlebars.SafeString(I18n.t(property, options.hash));
|
||||
});
|
||||
|
||||
|
|
|
@ -27,18 +27,6 @@ Discourse.Utilities = {
|
|||
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
|
||||
// unsuitable for many of Discourse's uses. Use `Handlebars.Utils.escapeExpression`
|
||||
// when escaping an attribute in HTML, otherwise this one will do.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{{d-button action="loadPreviousVersion" icon="backward" title="post.revisions.controls.previous" disabled=loadPreviousDisabled}}
|
||||
<div id="revision-numbers" class="{{unless displayRevisions 'invisible'}}">
|
||||
{{#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}}
|
||||
</div>
|
||||
{{d-button action="loadNextVersion" icon="forward" title="post.revisions.controls.next" disabled=loadNextDisabled}}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
{{text-field id="edit-title" value=buffered.title maxlength=siteSettings.max_topic_title_length autofocus="true"}}
|
||||
{{#if showCategoryChooser}}
|
||||
<br>
|
||||
{{category-chooser valueAttribute="id" value=buffered.category_id source=buffered.category_id}}
|
||||
{{category-chooser valueAttribute="id" value=buffered.category_id}}
|
||||
{{/if}}
|
||||
|
||||
{{#if canEditTags}}
|
||||
|
|
|
@ -5,9 +5,9 @@ import Scrolling from 'discourse/mixins/scrolling';
|
|||
|
||||
const TopicView = Ember.View.extend(AddCategoryClass, AddArchetypeClass, Scrolling, {
|
||||
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',
|
||||
'topic.archetype',
|
||||
'topic.is_warning',
|
||||
|
@ -119,7 +119,7 @@ const TopicView = Ember.View.extend(AddCategoryClass, AddArchetypeClass, Scrolli
|
|||
|
||||
this.set("offset", offset);
|
||||
|
||||
const topic = this.get('controller.model');
|
||||
const topic = this.get('topic');
|
||||
const showTopic = this.showTopicInHeader(topic, offset);
|
||||
if (showTopic !== this._lastShowTopic) {
|
||||
this._lastShowTopic = showTopic;
|
||||
|
|
|
@ -2,5 +2,4 @@ import ScrollTop from 'discourse/mixins/scroll-top';
|
|||
|
||||
export default Ember.View.extend(ScrollTop, {
|
||||
templateName: 'user/user',
|
||||
userBinding: 'controller.content'
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue