remove delete feature
This commit is contained in:
parent
135f1f184b
commit
76b93f5d13
3 changed files with 1 additions and 25 deletions
|
@ -2,17 +2,8 @@ class MailController {
|
|||
/*@ngInject*/
|
||||
constructor(mailboxService) {
|
||||
this.mailboxService = mailboxService;
|
||||
this.deleted = false;
|
||||
this.displayMode = 'text'
|
||||
}
|
||||
|
||||
deleteMail(id) {
|
||||
this.mailboxService.deleteMail(id)
|
||||
.then(()=> {
|
||||
this.deleted = true;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default MailController;
|
|
@ -1,11 +1,7 @@
|
|||
<section ng-hide="$ctrl.deleted" class="email">
|
||||
<section class="email">
|
||||
<div class="row ">
|
||||
<div class="col-sm-4 email-summary">{{$ctrl.mail.fromAddress}}</div>
|
||||
<div class="col-sm-8 email-summary">{{$ctrl.mail.subject}}</div>
|
||||
<!--<div class="col-sm-2 email-summary">-->
|
||||
<!-- -->
|
||||
<!--<button class="btn btn-primary" ng-click="$ctrl.deleteMail($ctrl.mail.id)">Delete</button>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
|
|
@ -19,17 +19,6 @@ class MailboxService {
|
|||
this.$state.go('inbox', {username: username});
|
||||
}
|
||||
|
||||
deleteMail(id) {
|
||||
this.$log.info('deleting mails with id ' + id);
|
||||
return this.$http.post(this.config.backend_url, {
|
||||
params: {
|
||||
id: id,
|
||||
username: this.getCurrentUsername(),
|
||||
action: "delete"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
loadEmails(username) {
|
||||
return this.$http.get(this.config.backend_url, {params: {username: username, action: "get"}})
|
||||
.then(response=> {
|
||||
|
|
Loading…
Reference in a new issue