From 79c3cd6520eef63ec33d5393a84efb7267a3067a Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 28 Nov 2018 17:37:34 +0800 Subject: [PATCH] Uncommited changes synced --- Roo/bootstrap/Modal.js | 23 +++++++++++++++++------ roojs-bootstrap-debug.js | 23 +++++++++++++++++------ roojs-bootstrap.js | 21 +++++++++++---------- 3 files changed, 45 insertions(+), 22 deletions(-) diff --git a/Roo/bootstrap/Modal.js b/Roo/bootstrap/Modal.js index ec70c2631f..0620b1f014 100644 --- a/Roo/bootstrap/Modal.js +++ b/Roo/bootstrap/Modal.js @@ -333,16 +333,19 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { } //this.el.setStyle('display', 'block'); - this.el.removeClass('hideing'); - this.el.addClass('show d-block'); + this.el.removeClass('hideing'); + this.el.dom.style.display='block'; + Roo.get(document.body).addClass('modal-open'); if(this.animate){ // element has 'fade' - so stuff happens after .3s ?- not sure why the delay? var _this = this; (function(){ + this.el.addClass('show'); this.el.addClass('in'); }).defer(50, this); }else{ + this.el.addClass('show'); this.el.addClass('in'); } @@ -355,7 +358,9 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { this.maskEl.setSize(Roo.lib.Dom.getViewWidth(true), Roo.lib.Dom.getViewHeight(true)); this.maskEl.setStyle('z-index', Roo.bootstrap.Modal.zIndex++); - this.maskEl.addClass('show d-block'); + this.maskEl.dom.style.display = 'block'; + this.maskEl.addClass('show'); + this.resize(); @@ -375,25 +380,31 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { hide : function() { if(this.fireEvent("beforehide", this) !== false){ - this.maskEl.removeClass('show d-block'); + + this.maskEl.removeClass('show'); + + this.maskEl.dom.style.display = ''; Roo.get(document.body).removeClass("x-body-masked"); this.el.removeClass('in'); this.el.select('.modal-dialog', true).first().setStyle('transform',''); if(this.animate){ // why this.el.addClass('hideing'); + this.el.removeClass('show'); (function(){ if (!this.el.hasClass('hideing')) { return; // it's been shown again... } - this.el.removeClass('show d-block'); + + this.el.dom.style.display=''; Roo.get(document.body).removeClass('modal-open'); this.el.removeClass('hideing'); }).defer(150,this); }else{ - this.el.removeClass('show d-block'); + this.el.removeClass('show'); + this.el.dom.style.display=''; Roo.get(document.body).removeClass('modal-open'); } diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index af5fe74db2..025975cfca 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -2920,16 +2920,19 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { } //this.el.setStyle('display', 'block'); - this.el.removeClass('hideing'); - this.el.addClass('show d-block'); + this.el.removeClass('hideing'); + this.el.dom.style.display='block'; + Roo.get(document.body).addClass('modal-open'); if(this.animate){ // element has 'fade' - so stuff happens after .3s ?- not sure why the delay? var _this = this; (function(){ + this.el.addClass('show'); this.el.addClass('in'); }).defer(50, this); }else{ + this.el.addClass('show'); this.el.addClass('in'); } @@ -2942,7 +2945,9 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { this.maskEl.setSize(Roo.lib.Dom.getViewWidth(true), Roo.lib.Dom.getViewHeight(true)); this.maskEl.setStyle('z-index', Roo.bootstrap.Modal.zIndex++); - this.maskEl.addClass('show d-block'); + this.maskEl.dom.style.display = 'block'; + this.maskEl.addClass('show'); + this.resize(); @@ -2962,25 +2967,31 @@ Roo.extend(Roo.bootstrap.Modal, Roo.bootstrap.Component, { hide : function() { if(this.fireEvent("beforehide", this) !== false){ - this.maskEl.removeClass('show d-block'); + + this.maskEl.removeClass('show'); + + this.maskEl.dom.style.display = ''; Roo.get(document.body).removeClass("x-body-masked"); this.el.removeClass('in'); this.el.select('.modal-dialog', true).first().setStyle('transform',''); if(this.animate){ // why this.el.addClass('hideing'); + this.el.removeClass('show'); (function(){ if (!this.el.hasClass('hideing')) { return; // it's been shown again... } - this.el.removeClass('show d-block'); + + this.el.dom.style.display=''; Roo.get(document.body).removeClass('modal-open'); this.el.removeClass('hideing'); }).defer(150,this); }else{ - this.el.removeClass('show d-block'); + this.el.removeClass('show'); + this.el.dom.style.display=''; Roo.get(document.body).removeClass('modal-open'); } diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 6c96433749..f478cc5565 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -116,16 +116,17 @@ for(var i=0;i