Skip to content

Commit f341a8f

Browse files
committed
..
1 parent bc7237c commit f341a8f

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

js/JM.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,6 +1382,7 @@ J.$package(function(J){
13821382
var isPost = 'POST' == m;
13831383
var isComplete = false;
13841384
var overtime = o.overtime;
1385+
var withCredentials = o.withCredentials;//跨域ajax
13851386

13861387
var xhr = window.XMLHttpRequest ? new XMLHttpRequest() : false;
13871388
if ( !xhr ) {
@@ -1396,6 +1397,8 @@ J.$package(function(J){
13961397

13971398
xhr.open( m, o.url, true );
13981399

1400+
if(withCredentials) xhr.withCredentials = true;
1401+
13991402
isPost && xhr.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
14001403

14011404
xhr.onreadystatechange = function(){

js/dialog.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
JM.$package("MUI",function(J){
22
var $D = J.dom,
3-
$E = J.event;
3+
$E = J.event,
4+
$U = J.Util;
45
var _transform = $D.getVendorPropertyName("transform");
56

67
//show 效果
@@ -179,15 +180,24 @@ JM.$package("MUI",function(J){
179180
this.maskClassName = this.maskClassName || "mask";
180181
this.mask = $D.className(this.maskClassName)[0];
181182
this.use3d = options.use3d;
183+
this.preventScroll = options.preventScroll;
182184

183185
},
184186
show:function(type){
185187
type = type || "none";
186188
showEffect[type].call(this ,this.elem ,this.mask ,this.onShow);
189+
if(this.preventScroll){
190+
$U.preventScrolling();
191+
}
192+
$E.fire(this,"show");
187193
},
188194
hide:function(type){
189195
type = type || "none";
190196
hideEffect[type].call(this ,this.elem ,this.mask);
197+
if(this.preventScroll){
198+
$U.activeScrolling();
199+
}
200+
$E.fire(this,"hide");
191201
},
192202
destory:function(){
193203
$D.remove(this.mask);

0 commit comments

Comments
 (0)