Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
csonlai committed Apr 28, 2013
1 parent bc7237c commit f341a8f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions js/JM.js
Original file line number Diff line number Diff line change
Expand Up @@ -1382,6 +1382,7 @@ J.$package(function(J){
var isPost = 'POST' == m;
var isComplete = false;
var overtime = o.overtime;
var withCredentials = o.withCredentials;//跨域ajax

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

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

if(withCredentials) xhr.withCredentials = true;

isPost && xhr.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );

xhr.onreadystatechange = function(){
Expand Down
12 changes: 11 additions & 1 deletion js/dialog.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
JM.$package("MUI",function(J){
var $D = J.dom,
$E = J.event;
$E = J.event,
$U = J.Util;
var _transform = $D.getVendorPropertyName("transform");

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

},
show:function(type){
type = type || "none";
showEffect[type].call(this ,this.elem ,this.mask ,this.onShow);
if(this.preventScroll){
$U.preventScrolling();
}
$E.fire(this,"show");
},
hide:function(type){
type = type || "none";
hideEffect[type].call(this ,this.elem ,this.mask);
if(this.preventScroll){
$U.activeScrolling();
}
$E.fire(this,"hide");
},
destory:function(){
$D.remove(this.mask);
Expand Down

0 comments on commit f341a8f

Please sign in to comment.