From 1321cea241e0fa3f3ac7da38b7364b46e0858f11 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 13 Nov 2020 11:55:56 -0500 Subject: Redirect to edit draft after saving message --- themes/alps/assets/compose.js | 10 +++++++--- themes/alps/compose.html | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'themes/alps') diff --git a/themes/alps/assets/compose.js b/themes/alps/assets/compose.js index e6f057f..a980d77 100644 --- a/themes/alps/assets/compose.js +++ b/themes/alps/assets/compose.js @@ -1,3 +1,6 @@ +const sendButton = document.getElementById("send-button"), + saveButton = document.getElementById("save-button"); + const composeForm = document.getElementById("compose-form"); const sendProgress = document.getElementById("send-progress"); composeForm.addEventListener("submit", ev => { @@ -6,6 +9,10 @@ composeForm.addEventListener("submit", ev => { sendProgress.style.display = 'flex'; }); +saveButton.addEventListener("click", ev => { + sendProgress.querySelector(".info").innerText = "Saving draft..."; +}); + let attachments = []; const headers = document.querySelector(".create-update .headers"); @@ -41,9 +48,6 @@ function dragNOP(e) { e.preventDefault(); } -const sendButton = document.getElementById("send-button"), - saveButton = document.getElementById("save-button"); - const attachmentUUIDsNode = document.getElementById("attachment-uuids"); function updateState() { let complete = true; diff --git a/themes/alps/compose.html b/themes/alps/compose.html index 5f9d3ea..82ee283 100644 --- a/themes/alps/compose.html +++ b/themes/alps/compose.html @@ -70,7 +70,7 @@ License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --> - Sending message... + Sending message... -- cgit v1.2.3