From 743fc3aed2ac4523c315b5fd221ab6785b13b454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Sat, 18 Oct 2014 13:53:41 +0200 Subject: [PATCH] #101 --- app/webroot/js/dreamjob.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/webroot/js/dreamjob.js b/app/webroot/js/dreamjob.js index b91b6c7..2925ca8 100755 --- a/app/webroot/js/dreamjob.js +++ b/app/webroot/js/dreamjob.js @@ -28,6 +28,9 @@ var global_load = null; $("#popup .modal-footer").html($("#container div.box.2modal .modal-footer", data).html()); $("#popup .modal-body .modal-footer").remove(); $("#popup .modal-content").attr("action",$(".2modal form.modal-body",data).attr("action")); + $("#popup .modal-content").attr("enctype",$(".2modal form.modal-body[enctype]",data).attr("enctype")); + $("#popup .modal-content").attr("method",$(".2modal form.modal-body[method]",data).attr("method")); + event("#popup"); }, error: function(data) { }}); }); @@ -67,7 +70,8 @@ var global_load = null; }); }); - $(where + " form").submit(function(e) { + $(where + " form").submit(function(e) { + $("#popup").modal('hide'); if ($(this).attr('enctype') != 'multipart/form-data') { stopLoad(e); if ($(this).hasClass('tableForm')) { @@ -98,8 +102,9 @@ var global_load = null; $(this).attr('target', 'fileUpload'); $(":input[ name *= '_wysihtml5_mod' ]", this).remove(); $(this).submit(function() { - stopLoad(evt); + //stopLoad(evt); frame = $('#fileUpload').load(function() { + console.log("aha"); setContent($('#fileUpload').contents().find('html').html()); $('#fileUpload').unbind('load'); setTimeout(function() {