发布v2.6.0版本

This commit is contained in:
雨中磐石
2023-08-22 21:55:04 +08:00
parent f9001fbb46
commit ad77fdd196
17 changed files with 295 additions and 146 deletions

View File

@@ -179,6 +179,7 @@ js.serverdt=function(atype){
return dt;
}
js.open=function(url,w,h,wina,can,wjcan){
if(apicloud){api.openWin({url:url});return;}
if(wina){try{var owina = this.openarr[wina];owina.document.body;owina.focus();return owina;}catch(e){}}
if(!w)w=750;if(!h)h=500;
var l=(screen.width-w)*0.5,t=(screen.height-h)*0.5-50,rnd = parseInt(Math.random()*50);
@@ -1025,7 +1026,14 @@ js.filelxext = function(lx){
if(js.fileall.indexOf(','+lx+',')<0)lx='wz';
return lx;
}
js.datechange=function(o1,lx){
js.datechange=function(o1,lx,isbo){
if(!$(o1).rockdatepicker && !isbo){
js.importcss('mode/plugin/css/jquery-rockdatepicker.css');
js.importjs('mode/plugin/jquery-rockdatepicker.js', function(){
js.datechange(o1,lx, true);
});
return;
}
if(!lx)lx='date';
$(o1).rockdatepicker({'view':lx,'initshow':true});
return false;
@@ -1036,7 +1044,7 @@ js.selectdate=function(o1,inp,lx){
return false;
}
js.importjs=function(url,fun){
var sid = jm.encrypt(url);
var sid = jm.base64encode(url);
if(!fun)fun=function(){};
if(get(sid)){fun();return;}
var scr = document.createElement('script');
@@ -1053,6 +1061,16 @@ js.importjs=function(url,fun){
return false;
}
js.importcss = function(url){
var sid = jm.base64encode(url);
if(get(sid))return;
var scr = document.createElement('link');
scr.href = url;
scr.id = sid;
scr.rel = 'stylesheet';
document.getElementsByTagName('head')[0].appendChild(scr);
}
js.replacecn=function(o1){
var val = strreplace(o1.value);
val = val.replace(/[\u4e00-\u9fa5]/g,'');

View File

@@ -180,7 +180,7 @@ js.showmenu=function(d){
var h1=$(window).height(),h2=document.body.scrollHeight,s1;
if(h2>h1)h1=h2;
var col='',oix;
var s='<div align="center" id="menulistshow" style="background:rgba(0,0,0,0.6);height:'+h1+'px;width:100%;position:absolute;left:0px;top:0px;z-index:198;" >';
var s='<div align="center" id="menulistshow" style="background:rgba(0,0,0,0.6);height:'+h1+'px;width:100%;position:absolute;left:0px;top:0px;z-index:198;" oncontextmenu="return false">';
s+='<div id="menulistshow_s" style="width:'+d.width+'px;margin-top:'+d.top+';position:fixed;-webkit-overflow-scrolling:touch;" class="menulist">';
for(var i=0;i<a.length;i++){
oix = '0';
@@ -326,7 +326,7 @@ function touchclass(cans){
this.islongbool = false;
if(!this.initbool){
o1.addEventListener('click', function(){
me._onclick(this, event);
me.onclicks(this, event);
}, false);
}
this.obj = o1;
@@ -335,13 +335,30 @@ function touchclass(cans){
this.touchtime = setTimeout('touchnowobj=false',1000);
return true;
}
this._onclick=function(o1, evt){
if(!this.islongbool)this.onclick(o1, evt);
this.ismobile=function(){
var llq = navigator.userAgent;
llq = llq.toLowerCase();
var sarr= ['micromessenger','android','mobile','iphone'],bo=false,i;
for(i=0;i<sarr.length;i++){
if(llq.indexOf(sarr[i])>-1){
bo=true;
break;
}
}
return bo;
}
this.onclicks=function(o1, evt){
var lx = evt.target.nodeName.toLowerCase();
if(!this.islongbool && lx!='a')this.onclick(o1, evt);
}
this.touchstring=function(){
var rnd = 'a'+js.getrand();
touchnowoba[rnd] = this;
var str = ' ontouchstart="return touchnowoba.'+rnd+'.touchstart(this,event)"';
if(!this.ismobile()){
str = ' onmouseover="touchnowoba.'+rnd+'.touchstart(this,event)"';
str+= ' oncontextmenu="touchnowoba.'+rnd+'.onlongclick();return false;"';
}
return str;
}
this.reglongmenu=function(){