aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'view/js/main.js')
-rw-r--r--view/js/main.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 3981d4266..1d6eca91d 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -1146,6 +1146,25 @@ function preview_post() {
return true;
}
+function preview_mail() {
+ $("#mail-preview").val("1");
+ $("#mail-preview-content").show();
+ $.post(
+ "mail",
+ $("#prvmail-form").serialize(),
+ function(data) {
+ if(data.preview) {
+ $("#mail-preview-content").html(data.preview);
+ $("#mail-preview-content" + " a").click(function() { return false; });
+ }
+ },
+ "json"
+ );
+ $("#mail-preview").val("0");
+ return true;
+}
+
+
function unpause() {
// unpause auto reloads if they are currently stopped
totStopped = false;