From 742f01f82c649f547b16c84fecc5d8cdb2c603a1 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Thu, 17 Nov 2016 14:00:37 -0500 Subject: [PATCH] Deprecate ModalBodyview --- .../javascripts/discourse/views/modal-body.js.es6 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/discourse/views/modal-body.js.es6 b/app/assets/javascripts/discourse/views/modal-body.js.es6 index 55ce0fca0ba..84191664210 100644 --- a/app/assets/javascripts/discourse/views/modal-body.js.es6 +++ b/app/assets/javascripts/discourse/views/modal-body.js.es6 @@ -1,10 +1,14 @@ -import { observes, on } from "ember-addons/ember-computed-decorators"; +import { observes } from "ember-addons/ember-computed-decorators"; +import deprecated from 'discourse-common/lib/deprecated'; export default Ember.View.extend({ focusInput: true, - @on("didInsertElement") - _setupModal() { + didInsertElement() { + this._super(); + + deprecated('ModalBodyView is deprecated. Use the `d-modal-body` component instead'); + $('#modal-alert').hide(); $('#discourse-modal').modal('show'); Ember.run.scheduleOnce('afterRender', this, this._afterFirstRender);