The entire qunit suite runs without any deprecations

This commit is contained in:
Robin Ward 2015-05-27 14:59:52 -04:00
parent c22cc2bf03
commit 23eadc3fb1
3 changed files with 13 additions and 7 deletions
app/assets/javascripts/discourse
templates/group
views
test/javascripts/controllers

View File

@ -3,7 +3,7 @@
<tr> <tr>
<th colspan="3" class="seen">{{i18n 'last_seen'}}</th> <th colspan="3" class="seen">{{i18n 'last_seen'}}</th>
</tr> </tr>
{{#each m in members}} {{#each model.members as |m|}}
<tr> <tr>
<td class='avatar'> <td class='avatar'>
{{avatar m imageSize="large"}} {{avatar m imageSize="large"}}

View File

@ -59,7 +59,7 @@ const ComposerView = Discourse.View.extend(Ember.Evented, {
resize: function() { resize: function() {
const self = this; const self = this;
Em.run.scheduleOnce('afterRender', function() { Ember.run.scheduleOnce('afterRender', function() {
const h = $('#reply-control').height() || 0; const h = $('#reply-control').height() || 0;
self.movePanels.apply(self, [h + "px"]); self.movePanels.apply(self, [h + "px"]);
@ -116,11 +116,17 @@ const ComposerView = Discourse.View.extend(Ember.Evented, {
const $replyControl = $('#reply-control'), const $replyControl = $('#reply-control'),
self = this; self = this;
const resizer = function() {
Ember.run(function() {
self.resize();
});
};
$replyControl.DivResizer({ $replyControl.DivResizer({
resize: this.resize.bind(self), resize: resizer,
onDrag(sizePx) { self.movePanels.apply(self, [sizePx]); } onDrag(sizePx) { self.movePanels.apply(self, [sizePx]); }
}); });
afterTransition($replyControl, this.resize.bind(self)); afterTransition($replyControl, resizer);
this.ensureMaximumDimensionForImagesInPreview(); this.ensureMaximumDimensionForImagesInPreview();
this.set('controller.view', this); this.set('controller.view', this);

View File

@ -40,7 +40,7 @@ test("editingMode", function() {
test("toggledSelectedPost", function() { test("toggledSelectedPost", function() {
var tc = this.subject({ model: buildTopic() }), var tc = this.subject({ model: buildTopic() }),
post = Discourse.Post.create({id: 123, post_number: 2}), post = Discourse.Post.create({id: 123, post_number: 2}),
postStream = tc.get('postStream'); postStream = tc.get('model.postStream');
postStream.appendPost(post); postStream.appendPost(post);
postStream.appendPost(Discourse.Post.create({id: 124, post_number: 3})); postStream.appendPost(Discourse.Post.create({id: 124, post_number: 3}));
@ -62,7 +62,7 @@ test("toggledSelectedPost", function() {
test("selectAll", function() { test("selectAll", function() {
var tc = this.subject({model: buildTopic()}), var tc = this.subject({model: buildTopic()}),
post = Discourse.Post.create({id: 123, post_number: 2}), post = Discourse.Post.create({id: 123, post_number: 2}),
postStream = tc.get('postStream'); postStream = tc.get('model.postStream');
postStream.appendPost(post); postStream.appendPost(post);
@ -80,7 +80,7 @@ test("Automating setting of allPostsSelected", function() {
var topic = buildTopic(), var topic = buildTopic(),
tc = this.subject({model: topic}), tc = this.subject({model: topic}),
post = Discourse.Post.create({id: 123, post_number: 2}), post = Discourse.Post.create({id: 123, post_number: 2}),
postStream = tc.get('postStream'); postStream = tc.get('model.postStream');
topic.set('posts_count', 1); topic.set('posts_count', 1);
postStream.appendPost(post); postStream.appendPost(post);