Remove beforeControlModal, it is not as useful as a component
This commit is contained in:
parent
edb3a7f646
commit
e7696ef483
|
@ -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) {
|
_showControlModal(type, user, opts) {
|
||||||
opts = opts || {};
|
opts = opts || {};
|
||||||
|
|
||||||
|
@ -44,11 +39,10 @@ export default Ember.Service.extend({
|
||||||
controller.set('post', opts.post);
|
controller.set('post', opts.post);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.beforeControlModal(controller).then(() => {
|
return (user.adminUserView ?
|
||||||
return user.adminUserView ?
|
|
||||||
Ember.RSVP.resolve(user) :
|
Ember.RSVP.resolve(user) :
|
||||||
AdminUser.find(user.get('id'));
|
AdminUser.find(user.get('id'))
|
||||||
}).then(loadedUser => {
|
).then(loadedUser => {
|
||||||
controller.setProperties({
|
controller.setProperties({
|
||||||
user: loadedUser,
|
user: loadedUser,
|
||||||
loadingUser: false,
|
loadingUser: false,
|
||||||
|
|
Loading…
Reference in New Issue