Parcourir la source

Add new mailform clenup

Alexey Edelev il y a 5 ans
Parent
commit
c3f5c58657
1 fichiers modifiés avec 10 ajouts et 1 suppressions
  1. 10 1
      web/js/index.js

+ 10 - 1
web/js/index.js

@@ -394,6 +394,15 @@ function setMailNewVisible(visible) {
         $("#mailNew").hide()
         $("#mailList").css({pointerEvents: "auto"})
     }
+
+    while (toEmailList.length > 0 && $("#toEmailList").children().length > 1) {
+        removeToEmail($("#toEmailList").children()[$("#toEmailList").children().length - 2].id, toEmailList[toEmailList.length - 1])
+    }
+    toEmailList = new Array()
+    $("#newMailEditor").val("")
+    $("#newMailSubject").val("")
+    $("#newMailTo").val("")
+    $("#toEmailField").val("")
 }
 
 function updateMailList(folder, page) {
@@ -511,4 +520,4 @@ window.onbeforeunload = function() {
         notifierSocket.onclose = function () {}; // disable onclose handler first
         notifierSocket.close();
     }
-};
+};