From 93337c10199314d65497ab5c5cb18e09bb8aa59c Mon Sep 17 00:00:00 2001 From: manson Date: Tue, 19 Aug 2014 18:00:12 +0800 Subject: [PATCH] fix preview for IE --- app/assets/javascripts/lib/modal-preview.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/lib/modal-preview.js b/app/assets/javascripts/lib/modal-preview.js index 8fe3e21..47e93df 100644 --- a/app/assets/javascripts/lib/modal-preview.js +++ b/app/assets/javascripts/lib/modal-preview.js @@ -7,7 +7,12 @@ $(function() { for ( instance in CKEDITOR.instances ) CKEDITOR.instances[instance].updateElement(); - var formData = new FormData( $('form.previewable')[0] ); + var formData; + if(typeof(FormData) == "function"){ + formData = new FormData( $('form.previewable')[0] ); + }else{ + formData = $('form.previewable').serialize() + } $.ajax({ type: "post",