Fixed multiple dialog render (#4642)
This commit is contained in:
parent
2760f049ac
commit
c4e1ba8bbf
2 changed files with 3 additions and 2 deletions
|
|
@ -103,9 +103,11 @@ frappe.ui.Dialog = frappe.ui.FieldGroup.extend({
|
|||
// show it
|
||||
this.$wrapper.modal("show");
|
||||
this.primary_action_fulfilled = false;
|
||||
this.is_visible = true;
|
||||
},
|
||||
hide: function(from_event) {
|
||||
this.$wrapper.modal("hide");
|
||||
this.is_visible = false;
|
||||
},
|
||||
get_close_btn: function() {
|
||||
return this.$wrapper.find(".btn-modal-close");
|
||||
|
|
|
|||
|
|
@ -235,8 +235,7 @@ frappe.verify_password = function(callback) {
|
|||
}
|
||||
|
||||
frappe.show_progress = function(title, count, total=100, description) {
|
||||
if(frappe.cur_progress && frappe.cur_progress.title === title
|
||||
&& frappe.cur_progress.$wrapper.is(":visible")) {
|
||||
if(frappe.cur_progress && frappe.cur_progress.title === title && frappe.cur_progress.is_visible) {
|
||||
var dialog = frappe.cur_progress;
|
||||
} else {
|
||||
var dialog = new frappe.ui.Dialog({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue