{"size": 5299, "ext": "js", "max_stars_repo_path": "fd/dialog.min.js", "max_stars_repo_name": "wlk23wlk/dialog", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "fd/dialog.min.js", "max_issues_repo_name": "wlk23wlk/dialog", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "fd/dialog.min.js", "max_forks_repo_name": "wlk23wlk/dialog", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 2649.5, "max_line_length": 5158, "alphanum_fraction": 0.6444612191}
﻿(function(e){function f(k,h){this.m_id=arguments[0]||null;this.cur_id=arguments[1]||null;this.flag=0;this.x=null;this.y=null;this.cur_left=null;this.cur_top=null}f.prototype={_mousedown:function(){var h=this;e(h.cur_id).on("mousedown",function(k){h.x=k.pageX;h.y=k.pageY;h.cur_left=parseFloat(e(h.m_id).css("left"),10);h.cur_top=parseFloat(e(h.m_id).css("top"),10);h.flag=1})},_mouseup:function(){var h=this;e(document).on("mouseup",function(k){h.flag=0})},_mousemove:function(){var h=this;e(document).on("mousemove",function(k){if(h.flag==1){var o=k.pageX;var m=k.pageY;var l=o-h.x;var n=m-h.y;e(h.m_id).css({left:h.cur_left+l,top:h.cur_top+n})}})}};var g=0;var b=null;var d=null;function a(l,h){var m={_dom:{"box":["div",".dialog",""],"prompt":["h2",".dialog>''","提示："],"close":["span","h2>.close","&times;"]},_css:{".dialog":{display:"none",width:"350px",minHeight:"100px",position:"absolute",left:"50%",top:"50%",marginLeft:"-150px",marginTop:"-50px",backgroundColor:"#fff",borderRadius:"3px",overflow:"hidden",zIndex:100000,boxShadow:"0 0 5px rgba(0,0,0,0.5)"},"span":{display:"inline-block",width:"20px",height:"20px",fontSize:"14px",lineHeight:"20px",textAlign:"center","float":"right",margin:"5px",cursor:"pointer",textIndent:0},"h2":{position:"relative",height:"32px",marginBottom:"10px",backgroundColor:"#5092cf",lineHeight:"32px",textAlign:"center",color:"#fff",fontWeight:"bold",fontSize:"16px",textAlign:"left",textIndent:"10px"},"p":{fontSize:"14px"}},drag:true,mask:true,position:true};a.prototype.baseOption=m;++g;if(l==undefined||typeof(arguments[0])=="string"){var h=arguments[0]}else{var k=this.baseOption;for(i in k){if(k[i] instanceof Object){k[i]=e.extend(true,{},k[i],l[i])}else{if(l[i]!=undefined){k[i]=l[i]}}}a.prototype.baseOption=k}l=this.baseOption;if(l instanceof Object){this.createMask(l);this.createDom(l,h);this.addCss(l,h);if(l.drag){this._drag(l,h)}if(l.position){this._position(l)}}}a.prototype={getClassAttr:function(h){var l=/[A-Z]/;if(l.exec(h)!==null){var n=l.exec(h)[0];var k="-"+l.exec(h)[0].toLowerCase()}else{str=""}var m=h.replace(n,k);if(l.test(m)){return this.getClassAttr(m)}else{return m}},createDom:function(l,o){for(i in l._dom){var q=l._dom[i][1].split(">");var r=q.length;var m=null;if(/\./g.test(q[r-1])){m='class="';_className=q[r-1].replace(/\./g,"")+'"'}else{if(/\#/g.test(q[r-1])){m="id=";_className=q[r-1].replace(/\#/g,"")+'"'}else{m="";_className=""}}var n=["area","base","basefont","br","col","hr","img","input","keygen","link","param","source","track"];var h=null;for(var k=0;k<n.length;k++){if(n[k]==l._dom[i][0]){h=0;break}else{h=1}}var p=h==0?"<"+l._dom[i][0]+" "+m+_className+" />":"<"+l._dom[i][0]+" "+m+_className+">"+l._dom[i][2]+"</"+l._dom[i][0]+">";if(r>1){if(e(q[r-2]).hasClass(o)){e(q[r-2]+"."+o).append(p)}else{if(q[r-2]!==".mask"){e("."+o).find(q[r-2]).append(p)}else{e(q[r-2]).append(p)}}}else{e("body").append(p);if(o!=undefined){if(e("."+_className.replace(/\"/,"")).length>1){e("."+_className.replace(/\"/,"")).eq(g-1).addClass(o)}else{e("."+_className.replace(/\"/,"")).addClass(o)}}}}},createMask:function(k){if(k.mask){var h={_dom:{"mask":["div",".mask",""],"mask-box":["div",".mask>.mask-box",""]},_css:{".mask":{display:"none",position:"absolute",left:"0",top:"0",width:"100%",height:"100%",zIndex:"1000"},".mask-box":{width:"100%",height:"100%",zIndex:9990,filter:"Alpha(opacity=50)",opacity:"0.5",zoom:1,backgroundColor:"#000"}}};k._dom=e.extend({},k._dom,h._dom);k._css=e.extend({},k._css,h._css)}},addCss:function(n,k){var k=k||"";for(i in n._css){var m="";var l=[];var h=[];for(j in n._css[i]){m+=this.getClassAttr(j)+":"+n._css[i][j]+";"}if(n._dom["box"][1]==i||i==".mask"){e(i+"."+k).attr("style",m)}else{e("."+k).find(i).attr("style",m)}}},_drag:function(l,k){_c1=l._dom.box[1];_c2=l._dom.prompt[0];e("."+k+">"+_c2).css({cursor:"move"});var h=new f(_c1+"."+k,"."+k+">"+_c2);h._mousedown();h._mouseup();h._mousemove()},_position:function(m){var p=this;var h=e(m._dom["box"][1]).innerWidth();var l=e(m._dom["box"][1]).innerHeight();var o=e(window).width();var k=e(window).height();if(!!window.ActiveXObject&&!window.XMLHttpRequest){var n=e(document).scrollTop();e(m._dom["box"][1]).css({position:"absolute",left:"50%",marginLeft:-(w/2),top:n});e(window).on("scroll",function(){var q=e(document).scrollTop();if(e(m._dom["box"][1]).is(":visible")){e(m._dom["box"][1]).stop().animate({top:q},200)}})}else{if(l>k){e(m._dom["box"][1]).css({position:"fixed",left:"50%",top:0,marginLeft:-h/2,marginTop:0})}else{e(m._dom["box"][1]).css({position:"fixed",left:"50%",top:"50%",marginLeft:-h/2,marginTop:-(l/2)})}}},_open:function(h){var h=h==undefined?"":"."+h;var k=this;e(k.baseOption._dom["box"][1]+h).fadeIn();if(k.baseOption._dom["mask"]){e(k.baseOption._dom["mask"][1]+h).fadeIn()}},_close:function(h){var h=h==undefined?"":"."+h;var k=this;e(k.baseOption._dom["box"][1]+h).fadeOut();if(k.baseOption._dom["mask"]){e(k.baseOption._dom["mask"][1]+h).fadeOut()}}};var c=null;e.extend({fD:function(k,h){c=new a(k,h)},fD_text:function(l,h){if(e("."+h).length==0){var k={_dom:{"message":["div",".dialog>.message",l]},_css:{".message":{padding:"5px",wordWrap:"break-word"}}};
c=new a(k,h);c._open(h)}else{e(".message").text(l);c._open(h)}},fDOpen:function(h){c._open(h)},fDClose:function(h){c._close(h)}})})(jQuery);