Skip to content

Commit

Permalink
(js) Fix usage of MessageEditorController
Browse files Browse the repository at this point in the history
  • Loading branch information
cgx committed Aug 22, 2018
1 parent 3e5a486 commit 838e1ac
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions UI/WebServerResources/js/Contacts/AddressBookController.js
Expand Up @@ -339,7 +339,8 @@
var account = _.find(accounts, function(o) {
if (o.id === 0)
return o;
});
}),
onCompleteDeferred = $q.defer();

// We must initialize the Account with its mailbox
// list before proceeding with message's creation
Expand All @@ -354,9 +355,15 @@
templateUrl: '../Mail/UIxMailEditor',
controller: 'MessageEditorController',
controllerAs: 'editor',
onComplete: function (scope, element) {
return onCompleteDeferred.resolve(element);
},
locals: {
stateAccount: account,
stateMessage: message
stateMessage: message,
onCompletePromise: function () {
return onCompleteDeferred.promise;
}
}
});
});
Expand Down

0 comments on commit 838e1ac

Please sign in to comment.