mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-12 06:55:26 +00:00
(feat) show toast when saving and sending messages
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
ng-disabled="!(editor.message.editable.to.length > 0 || editor.message.editable.cc.length > 0 || editor.message.editable.bcc.length > 0)">
|
||||
<md-icon>send</md-icon>
|
||||
</md-button>
|
||||
<md-button class="sg-icon-button" ng-click="editor.message.$save()">
|
||||
<md-button class="sg-icon-button" ng-click="editor.save()">
|
||||
<md-icon>save</md-icon>
|
||||
</md-button>
|
||||
<md-button class="sg-icon-button" ng-click="editor.cancel()">
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
vm.hideCc = true;
|
||||
vm.hideBcc = true;
|
||||
vm.cancel = cancel;
|
||||
vm.save = save;
|
||||
vm.send = send;
|
||||
vm.removeAttachment = removeAttachment;
|
||||
vm.contactFilter = contactFilter;
|
||||
@@ -111,11 +112,26 @@
|
||||
$mdDialog.cancel();
|
||||
}
|
||||
|
||||
function save() {
|
||||
vm.message.$save().then(function(data) {
|
||||
$mdToast.show(
|
||||
$mdToast.simple()
|
||||
.content(l('Your email has been saved'))
|
||||
.position('top right')
|
||||
.hideDelay(3000));
|
||||
});
|
||||
}
|
||||
|
||||
function send() {
|
||||
if (vm.autosave)
|
||||
$timeout.cancel(vm.autosave);
|
||||
|
||||
vm.message.$send().then(function(data) {
|
||||
$mdToast.show(
|
||||
$mdToast.simple()
|
||||
.content(l('Your email has been sent'))
|
||||
.position('top right')
|
||||
.hideDelay(3000));
|
||||
$mdDialog.hide();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user