aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-12-13 17:30:02 -0800
committerzotlabs <mike@macgirvin.com>2016-12-13 17:30:02 -0800
commitf111c5c325fec1139ee7ea36c691de452469fa5a (patch)
tree2d70f0df06bb4959257a523c8ed093aaff18a7f2 /view/js
parentc4a9b61da6a86ca58a850967a81d7e4b39a482f6 (diff)
downloadvolse-hubzilla-f111c5c325fec1139ee7ea36c691de452469fa5a.tar.gz
volse-hubzilla-f111c5c325fec1139ee7ea36c691de452469fa5a.tar.bz2
volse-hubzilla-f111c5c325fec1139ee7ea36c691de452469fa5a.zip
mail preview (basic functionality)
Diffstat (limited to 'view/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;