Skip to content

Commit

Permalink
Fixed: Fix multi modal opening
Browse files Browse the repository at this point in the history
(OFBIZ-11211)

Simplifies a little bit the current code.

Thanks: Leila for patch and Carl for confirmation

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868615 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
JacquesLeRoux committed Oct 19, 2019
1 parent 1ef8312 commit 2328629
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions themes/common-theme/webapp/common/js/util/OfbizUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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({
Expand Down

0 comments on commit 2328629

Please sign in to comment.