From f111c5c325fec1139ee7ea36c691de452469fa5a Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 13 Dec 2016 17:30:02 -0800 Subject: mail preview (basic functionality) --- view/js/main.js | 19 +++++++++++++++++++ view/tpl/prv_message.tpl | 11 ++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) (limited to 'view') 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; diff --git a/view/tpl/prv_message.tpl b/view/tpl/prv_message.tpl index 0c9b9ba1d..67588f717 100755 --- a/view/tpl/prv_message.tpl +++ b/view/tpl/prv_message.tpl @@ -10,6 +10,7 @@ + {{if $new}}
@@ -35,9 +36,16 @@
-
+
+ +
+ +
+ + +
+
{{if $new}} -- cgit v1.2.3