Author: jleroux Date: Sat Oct 19 08:12:07 2019 New Revision: 1868615 URL: http://svn.apache.org/viewvc?rev=1868615&view=rev Log: Fixed: Fix multi modal opening (OFBIZ-11211)
Simplifies a little bit the current code. Thanks: Leila for patch and Carl for confirmation Modified: ofbiz/ofbiz-framework/trunk/themes/common-theme/webapp/common/js/util/OfbizUtil.js Modified: ofbiz/ofbiz-framework/trunk/themes/common-theme/webapp/common/js/util/OfbizUtil.js URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/common-theme/webapp/common/js/util/OfbizUtil.js?rev=1868615&r1=1868614&r2=1868615&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/themes/common-theme/webapp/common/js/util/OfbizUtil.js (original) +++ ofbiz/ofbiz-framework/trunk/themes/common-theme/webapp/common/js/util/OfbizUtil.js Sat Oct 19 08:12:07 2019 @@ -119,14 +119,12 @@ function bindObservers(bind_element) { }); jQuery(bind_element).on("click", "[data-dialog-url]", function(){ var element = jQuery(this); - var id = element.attr("id"); var url = element.data("dialog-url"); var title = element.data("dialog-title"); var width = element.data("dialog-width"); var height = element.data("dialog-height"); var params = element.data("dialog-params"); - var dialogContainer = jQuery('<div id="container_'+ id + '"/>'); - + var dialogContainer = jQuery('<div/>'); dialogContainer.dialog({ autoOpen: false, title: title, @@ -135,7 +133,7 @@ function bindObservers(bind_element) { modal: true, closeOnEscape: true, close: function() { - document.getElementById("container_" + id).parentElement.remove(); + dialogContainer.dialog('destroy'); }, open: function() { jQuery.ajax({