From 44d38b2b8d020b9f223723afb2faefcd487b9c60 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 9 Jan 2017 16:37:07 +0100 Subject: [PATCH] =?utf8?q?kivi.popup=5Fdialog:=20neuer=20Callback=20=C2=BB?= =?utf8?q?load=C2=AB=20nach=20erfolgreichem=20AJAX-Laden=20des=20Inhalts?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- js/kivi.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/kivi.js b/js/kivi.js index c935c34cd..c456bd71d 100644 --- a/js/kivi.js +++ b/js/kivi.js @@ -307,6 +307,7 @@ namespace("kivi", function(ns) { // - id: dialog DIV ID (optional; defaults to 'jqueryui_popup_dialog') // - url, data, type: passed as the first three arguments to the $.ajax() call if an AJAX call is made, otherwise ignored. // - dialog: an optional object of options passed to the $.dialog() call + // - load: an optional function that is called after the content has been loaded successfully (only if an AJAX call is made) ns.popup_dialog = function(params) { var dialog; @@ -360,6 +361,8 @@ namespace("kivi", function(ns) { success: function(new_html) { dialog.html(new_html); dialog.removeClass('loading'); + if (params.load) + params.load(); } }); } -- 2.20.1