(js) Update raw source when editing a draft
parent
315117b029
commit
42bdfbcf7b
|
@ -266,7 +266,7 @@
|
|||
</md-button>
|
||||
</md-card-actions>
|
||||
<md-card-content>
|
||||
<pre ng-bind-html="viewer.rawSource"><!-- raw source --></pre>
|
||||
<pre ng-bind-html="viewer.message.$rawSource"><!-- raw source --></pre>
|
||||
</md-card-content>
|
||||
</md-card>
|
||||
</div>
|
||||
|
|
|
@ -269,9 +269,9 @@
|
|||
}
|
||||
|
||||
function toggleRawSource($event) {
|
||||
if (!vm.showRawSource && !vm.rawSource) {
|
||||
if (!vm.showRawSource && !vm.message.$rawSource) {
|
||||
Message.$$resource.post(vm.message.id, "viewsource").then(function(data) {
|
||||
vm.rawSource = data;
|
||||
vm.message.$rawSource = data;
|
||||
vm.showRawSource = true;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -151,6 +151,7 @@
|
|||
function save() {
|
||||
var ctrls = $parentControllers();
|
||||
vm.message.$save().then(function(data) {
|
||||
vm.message.$rawSource = null;
|
||||
if (ctrls.draftMailboxCtrl) {
|
||||
// We're saving a draft from a popup window.
|
||||
// Reload draft mailbox
|
||||
|
|
Loading…
Reference in New Issue