From 0038d2a7a4bb627191ee20942bab28c45b54fa17 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 7 Jun 2013 13:36:35 +0200 Subject: [PATCH] =?utf8?q?jqModal:=20open=5Fjqm=5Fwindow()=20auch=20den=20?= =?utf8?q?Requesttyp=20mitgeben=20k=C3=B6nnen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- js/common.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/js/common.js b/js/common.js index d2594a277..8e3e5a120 100644 --- a/js/common.js +++ b/js/common.js @@ -162,25 +162,26 @@ function focus_by_name(name){ function open_jqm_window(params) { params = params || { }; - var url = params.url; - var id = params.id ? params.id : 'jqm_popup_dialog'; - - if (params.data) { - var data = typeof params.data === "string" ? params.data : $.param(params.data); - url += (/\?/.exec(url) ? "&" : "?") + data; - } + var id = params.id ? params.id : 'jqm_popup_dialog'; $('#' + id).remove(); var div = $('
').hide().appendTo('body'); var close = $('
').appendTo(div); var content = $('
').appendTo(div); + div.jqm({ modal: true }); div.jqmShow(); - $.ajax({ url: url, success: function(new_html) { $(content).html(new_html); } }); $(close).click(function() { div.jqmClose(); }); + $.ajax({ + url: params.url, + data: params.data, + type: params.type, + success: function(new_html) { $(content).html(new_html); } + }); + return true; } -- 2.20.1