From: Moritz Bunkus Date: Fri, 7 Jun 2013 11:36:35 +0000 (+0200) Subject: jqModal: open_jqm_window() auch den Requesttyp mitgeben können X-Git-Tag: release-3.1.0beta1~331^2~48 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0038d2a7a4bb627191ee20942bab28c45b54fa17;p=kivitendo-erp.git jqModal: open_jqm_window() auch den Requesttyp mitgeben können --- 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; }