From 638128ff932eaacdfff32ad8b5f17c0c321f6d50 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Mon, 17 Jan 2022 16:39:10 +0100 Subject: [PATCH] Attachmnet => Attachment --- dev/View/User/MailBox/MessageView.js | 14 +++++++------- .../app/libraries/RainLoop/Actions/Messages.php | 4 ++-- .../app/templates/Views/User/MailMessageView.html | 8 ++++---- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dev/View/User/MailBox/MessageView.js b/dev/View/User/MailBox/MessageView.js index f4c360e3a..03a572fb0 100644 --- a/dev/View/User/MailBox/MessageView.js +++ b/dev/View/User/MailBox/MessageView.js @@ -124,7 +124,7 @@ export class MailMessageView extends AbstractViewRight { this.oMessageScrollerDom = null; this.addObservables({ - showAttachmnetControls: false, + showAttachmentControls: false, downloadAsZipLoading: false, lastReplyAction_: '', showFullInfo: '1' === Local.get(ClientSideKeyName.MessageHeaderFullInfo), @@ -150,7 +150,7 @@ export class MailMessageView extends AbstractViewRight { this.messageListOfThreadsLoading = ko.observable(false).extend({ rateLimit: 1 }); this.highlightUnselectedAttachments = ko.observable(false).extend({ falseTimeout: 2000 }); - this.showAttachmnetControlsState = v => Local.set(ClientSideKeyName.MessageAttachmentControls, !!v); + this.showAttachmentControlsState = v => Local.set(ClientSideKeyName.MessageAttachmentControls, !!v); this.downloadAsZipError = ko.observable(false).extend({ falseTimeout: 7000 }); @@ -198,9 +198,9 @@ export class MailMessageView extends AbstractViewRight { }); this.addComputables({ - allowAttachmnetControls: () => this.attachmentsActions.length && Settings.capa(Capa.AttachmentsActions), + allowAttachmentControls: () => this.attachmentsActions.length && Settings.capa(Capa.AttachmentsActions), - downloadAsZipAllowed: () => this.attachmentsActions.includes('zip') && this.allowAttachmnetControls(), + downloadAsZipAllowed: () => this.attachmentsActions.includes('zip') && this.allowAttachmentControls(), lastReplyAction: { read: this.lastReplyAction_, @@ -248,7 +248,7 @@ export class MailMessageView extends AbstractViewRight { }); this.addSubscribables({ - showAttachmnetControls: v => MessageUserStore.message() + showAttachmentControls: v => MessageUserStore.message() && MessageUserStore.message().attachments.forEach(item => item && item.checked(!!v)), lastReplyAction_: value => Local.set(ClientSideKeyName.LastReplyAction, value), @@ -257,10 +257,10 @@ export class MailMessageView extends AbstractViewRight { this.messageActiveDom(null); if (message) { - this.showAttachmnetControls(false); + this.showAttachmentControls(false); if (Local.get(ClientSideKeyName.MessageAttachmentControls)) { setTimeout(() => { - this.showAttachmnetControls(true); + this.showAttachmentControls(true); }, 50); } diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Messages.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Messages.php index 1b3611e0b..dacaf9299 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Messages.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Actions/Messages.php @@ -253,7 +253,7 @@ trait Messages \fclose($rMessageStream); } - $this->deleteMessageAttachmnets($oAccount); + $this->deleteMessageAttachments($oAccount); $sDraftFolder = $this->GetActionParam('MessageFolder', ''); $iDraftUid = (int) $this->GetActionParam('MessageUid', 0); @@ -820,7 +820,7 @@ trait Messages return $this->TrueResponse($sResponseFunction); } - private function deleteMessageAttachmnets(Account $oAccount) : void + private function deleteMessageAttachments(Account $oAccount) : void { $aAttachments = $this->GetActionParam('Attachments', null); diff --git a/snappymail/v/0.0.0/app/templates/Views/User/MailMessageView.html b/snappymail/v/0.0.0/app/templates/Views/User/MailMessageView.html index 946c65416..4d1599597 100644 --- a/snappymail/v/0.0.0/app/templates/Views/User/MailMessageView.html +++ b/snappymail/v/0.0.0/app/templates/Views/User/MailMessageView.html @@ -274,7 +274,7 @@
+ css: {'selection-mode' : showAttachmentControls, 'unselectedAttachmentsError': highlightUnselectedAttachments}">
- +
+ data-bind="visible: showAttachmentControls() && message() && message().attachments().hasVisible()"> @@ -316,7 +316,7 @@ × + data-bind="click: function () { showAttachmentControls(false); showAttachmentControlsState(false); }">×