From e7696ef4838e2d9a21ae6e1bbe7d2bb551e325e6 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 10 Jan 2018 14:48:11 -0500 Subject: [PATCH] Remove beforeControlModal, it is not as useful as a component --- .../javascripts/admin/services/admin-tools.js.es6 | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/app/assets/javascripts/admin/services/admin-tools.js.es6 b/app/assets/javascripts/admin/services/admin-tools.js.es6 index a1b4b0c2926..fb78de0663b 100644 --- a/app/assets/javascripts/admin/services/admin-tools.js.es6 +++ b/app/assets/javascripts/admin/services/admin-tools.js.es6 @@ -28,11 +28,6 @@ export default Ember.Service.extend({ }; }, - // Can be overridden to extend the modal contents if necessary - beforeControlModal() { - return Ember.RSVP.resolve(); - }, - _showControlModal(type, user, opts) { opts = opts || {}; @@ -44,11 +39,10 @@ export default Ember.Service.extend({ controller.set('post', opts.post); } - return this.beforeControlModal(controller).then(() => { - return user.adminUserView ? - Ember.RSVP.resolve(user) : - AdminUser.find(user.get('id')); - }).then(loadedUser => { + return (user.adminUserView ? + Ember.RSVP.resolve(user) : + AdminUser.find(user.get('id')) + ).then(loadedUser => { controller.setProperties({ user: loadedUser, loadingUser: false,