@ -0,0 +1,41 @@ |
|||||
|
|
||||
|
{include file="public:tabbar"/} |
||||
|
<script> |
||||
|
<!--点击我要托管开始--> |
||||
|
function tgcheck(){ |
||||
|
$.ajax({type:"POST", |
||||
|
url:"{:url('index/tg_check')}", |
||||
|
data:"", |
||||
|
async: false, |
||||
|
success:function (data) { |
||||
|
window.location.href=data.url; |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
function actcheck(){ |
||||
|
$.ajax({type:"POST", |
||||
|
url:"{:url('index/tg_check')}", |
||||
|
data:"", |
||||
|
async: false, |
||||
|
success:function (data) { |
||||
|
if(data.code){ |
||||
|
window.location.href="{:url('activity/index')}"; |
||||
|
}else{ |
||||
|
window.location.href=data.url; |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
function fbcheck(){ |
||||
|
$.ajax({type:"POST", |
||||
|
url:"{:url('index/fb_check')}", |
||||
|
data:"", |
||||
|
async: false, |
||||
|
success:function (data) { |
||||
|
window.location.href=data.url; |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
</script> |
||||
|
</body> |
||||
|
</html> |
||||
@ -0,0 +1,114 @@ |
|||||
|
{layout name="public/layout" /} |
||||
|
<style> |
||||
|
.disable { |
||||
|
pointer-events: none; |
||||
|
} |
||||
|
</style> |
||||
|
<div id="login"> |
||||
|
<img src="{$yf_theme_path}/public/img/logbg.jpg" width="100%"/> |
||||
|
<div class="wraper"> |
||||
|
<form id="regForm" class="form-horizontal" action="{:url('runforgot_pwd')}" method="post"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-xs-3 control-label">手机号:</label> |
||||
|
<div class="col-xs-8" style="padding-left:0px;"> |
||||
|
<input type="text" class="form-control" name="member_list_tel" placeholder="手机号" autocomplete="off"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-xs-3 control-label"> </label> |
||||
|
<div class="col-xs-8"> |
||||
|
<div id="fogCaptcha" type="button" class="btn btn-danger" style="width:100%;cursor:pointer;text-align:center;">验证</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-xs-3 control-label"> </label> |
||||
|
<div class="col-xs-8"> |
||||
|
<input type="text" class="form-control" name="verify" placeholder="验证码(600s有效)" autocomplete="off"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-xs-3 control-label"> </label> |
||||
|
<div class="col-xs-8"> |
||||
|
<button type="submit" class="btn btn-danger" style="width:100%;">下一步</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<div class="col-xs-offset-3 col-xs-8"> |
||||
|
<div class="checkbox"> |
||||
|
<label> |
||||
|
已有帐号?<a href="{:url('index')}">立即登录</a> |
||||
|
</label> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
</div> |
||||
|
<!--手机注册page结束--> |
||||
|
<script src="{$yf_theme_path}public/js/jquery.form.js"></script> |
||||
|
<script src="{$yf_theme_path}public/js/jquery.validate.min.js"></script> |
||||
|
<script src="{$yf_theme_path}public/js/layer/layer.js"></script> |
||||
|
<script src="{$yf_theme_path}public/js/base.js"></script> |
||||
|
<script src="https://ssl.captcha.qq.com/TCaptcha.js"></script> |
||||
|
<script> |
||||
|
new TencentCaptcha(document.getElementById('fogCaptcha'),'2002258607', |
||||
|
function(res){ /* callback */ |
||||
|
if(res.ret === 0){ |
||||
|
var url="{:url('register/sendRegisterSms',['check'=>1,'smstype'=>'forget'])}"; |
||||
|
var account = $("#regForm input[name='member_list_tel']"); |
||||
|
if(!account.val()){ |
||||
|
account.focus(); |
||||
|
return false; |
||||
|
}else if(!(/^1[3456789]\d{9}$/.test(account.val()))){ |
||||
|
layer.alert('手机号格式不正确', {icon: 5}, function (index) { |
||||
|
layer.close(index); |
||||
|
account.focus(); |
||||
|
}); |
||||
|
return false; |
||||
|
} |
||||
|
var obj=$("#fogCaptcha"); |
||||
|
$.post(url,{ticket:res.ticket,randstr:res.randstr,mobile:account.val()},function(res){ |
||||
|
if(res.code==1){ |
||||
|
obj.addClass('disabled'); |
||||
|
var numts=600; |
||||
|
obj.html("再获取:"+numts); |
||||
|
var codets=setInterval(function(){ |
||||
|
numts--; |
||||
|
obj.html("再获取:"+numts); |
||||
|
if(numts==0){ |
||||
|
obj.html("发送验证"); |
||||
|
clearInterval(codets); |
||||
|
obj.removeClass('disabled'); |
||||
|
} |
||||
|
},1000); |
||||
|
} |
||||
|
layer.msg(res.msg); |
||||
|
}); |
||||
|
}else{ |
||||
|
layer.msg("验证失败"); |
||||
|
} |
||||
|
},{}); |
||||
|
|
||||
|
<!--注册开始--> |
||||
|
var rules={ |
||||
|
"member_list_tel":"required", |
||||
|
"password":"required", |
||||
|
"repassword":{ |
||||
|
equalTo:"#password" |
||||
|
}, |
||||
|
"verify":"required", |
||||
|
}; |
||||
|
var messages={ |
||||
|
"password":"密码必填", |
||||
|
"repassword":{ |
||||
|
equalTo:"密码与确认密码不一致" |
||||
|
}, |
||||
|
"verify":"验证码必填", |
||||
|
"member_list_tel":{ |
||||
|
"required":"手机号码必填", |
||||
|
"isMobile":"请正确填写手机号码" |
||||
|
} |
||||
|
}; |
||||
|
tool.commonForm("#regForm",rules,messages,tool.tipError); |
||||
|
<!--注册结束--> |
||||
|
</script> |
||||
@ -0,0 +1,58 @@ |
|||||
|
<!DOCTYPE html> |
||||
|
<html lang="zh-CN"> |
||||
|
<head> |
||||
|
<meta charset="utf-8"> |
||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
||||
|
<meta name="viewport" content="width=device-width, initial-scale=1"> |
||||
|
|
||||
|
<title>{$site_seo_title} {$site_name}</title> |
||||
|
<meta name="keywords" content="{$site_seo_keywords}" /> |
||||
|
<meta name="description" content="{$site_seo_description}"> |
||||
|
<link rel="stylesheet" href="{$yf_theme_path}/public/css/font-awesome/css/font-awesome.min.css"> |
||||
|
<link rel="stylesheet" href="{$yf_theme_path}/public/css/weui.css"> |
||||
|
<!-- Bootstrap --> |
||||
|
<link href="{$yf_theme_path}/public/css/bootstrap.min.css" rel="stylesheet"> |
||||
|
<link rel="stylesheet" href="{$yf_theme_path}/public/js/slick/slick.css"> |
||||
|
<link rel="stylesheet" href="{$yf_theme_path}/public/js/slick/slick-theme.css"> |
||||
|
<link rel="stylesheet" href="{$yf_theme_path}/public/css/base.css"> |
||||
|
|
||||
|
<script src="{$yf_theme_path}/public/js/jquery-2.1.4.js"></script> |
||||
|
<script src='{$yf_theme_path}/public/js/popper.min.js'></script> |
||||
|
<script src='{$yf_theme_path}/public/js/bootstrap.min.js'></script> |
||||
|
<script src="{$yf_theme_path}/public/js/slick/slick.min.js"></script> |
||||
|
<script> |
||||
|
var _hmt = _hmt || []; |
||||
|
(function() { |
||||
|
var hm = document.createElement("script"); |
||||
|
hm.src = "https://hm.baidu.com/hm.js?a2721abaefc1e9338149a599c47a8326"; |
||||
|
var s = document.getElementsByTagName("script")[0]; |
||||
|
s.parentNode.insertBefore(hm, s); |
||||
|
})(); |
||||
|
</script> |
||||
|
|
||||
|
</head> |
||||
|
<body> |
||||
|
<div id="header"> |
||||
|
<nav class="navbar navbar-default"> |
||||
|
<div class="container"> |
||||
|
<div class="navbar-header"> |
||||
|
<a class="navbar-brand" href="{:url('index/index')}"><img src="{$yf_theme_path}/public/img/logo.png" width="100%"></a> |
||||
|
{if condition="ACTION_NAME neq 'video'"} |
||||
|
<div id="navs" class="pull-right"> |
||||
|
<ul> |
||||
|
<li><a href="{:url('Index/index')}" >首页</a></li> |
||||
|
{empty name="user.member_list_id"} |
||||
|
<li><a href="{:url('login/index')}">登录</a></li> |
||||
|
<li><a href="{:url('login/reg')}" style="display:none;">注册</a></li> |
||||
|
{/empty} |
||||
|
{notempty name="user.member_list_id"} |
||||
|
<li><a href="{:url('Center/index')}" >用户中心</a></li> |
||||
|
<li><a href="{:url('Login/logout')}">登出</a></li> |
||||
|
{/notempty} |
||||
|
</ul> |
||||
|
</div> |
||||
|
{/if} |
||||
|
</div> |
||||
|
</div> |
||||
|
</nav> |
||||
|
</div> |
||||
@ -0,0 +1,351 @@ |
|||||
|
var tool={ |
||||
|
isInclude:function(name){ |
||||
|
var js= /js$/i.test(name); |
||||
|
var es=document.getElementsByTagName(js?'script':'link'); |
||||
|
for(var i=0;i<es.length;i++) |
||||
|
if(es[i][js?'src':'href'].indexOf(name)!=-1)return true; |
||||
|
return false; |
||||
|
}, |
||||
|
uploadFile:function(uploadurl,btn,input,callback){ |
||||
|
//插件jquery.fileupload.js
|
||||
|
jQuery(btn).fileupload({ |
||||
|
url: uploadurl, |
||||
|
dataType: 'json', |
||||
|
done: function (e, data) { |
||||
|
var file=data.result; |
||||
|
console.log("============done==============="); |
||||
|
console.log(file); |
||||
|
if(file['code']==0){ |
||||
|
tool.msg(file['msg']); |
||||
|
}else{ |
||||
|
var pic=file['data']['path']; |
||||
|
console.log(input); |
||||
|
jQuery(input).val(pic); |
||||
|
if(typeof callback=='function'){ |
||||
|
callback(input,pic); |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
progressall: function (e, data) { |
||||
|
var progress = parseInt(data.loaded / data.total * 100, 10); |
||||
|
console.log("============progressall==============="); |
||||
|
console.log(progress); |
||||
|
tool.showProcess(input,progress); |
||||
|
} |
||||
|
}).bind('fileuploadadd',function(e,data){ |
||||
|
var file=data['files'][0]; |
||||
|
var url = null; |
||||
|
console.log(data); |
||||
|
if (window.createObjectURL != undefined) { |
||||
|
url = window.createObjectURL(file); |
||||
|
} else if (window.URL != undefined) { |
||||
|
url = window.URL.createObjectURL(file); |
||||
|
} else if (window.webkitURL != undefined) { |
||||
|
url = window.webkitURL.createObjectURL(file); |
||||
|
} |
||||
|
console.log("============fileuploadadd==============="); |
||||
|
console.log(url); |
||||
|
//if(/.(gif|jpg|jpeg|png|gif|jpg|png)$/.test(url)){
|
||||
|
tool.showPic(input,url); |
||||
|
//}
|
||||
|
}).prop('disabled', !$.support.fileInput).parent().addClass($.support.fileInput ? undefined : 'disabled'); |
||||
|
|
||||
|
}, |
||||
|
showPic:function(obj,pic){ |
||||
|
if(typeof obj=='undefined'||typeof pic=='undefined')return false; |
||||
|
var obj=jQuery(obj); |
||||
|
var parent=obj.parent("div"); |
||||
|
var check=parent.find(".showPic img"); |
||||
|
if(check.length){ |
||||
|
check.attr('src',pic); |
||||
|
}else{ |
||||
|
var html='<p></p><span class="label showPic"><img src="'+pic+'" class="img-thumbnail" style="max-width:100px !important;"></span>'; |
||||
|
parent.append(html); |
||||
|
} |
||||
|
}, |
||||
|
showProcess:function(obj,progress){ |
||||
|
if(typeof obj=='undefined'||typeof progress=='undefined')return false; |
||||
|
var obj=jQuery(obj); |
||||
|
var parent=obj.parent("div"); |
||||
|
var child=parent.find(".showProcessTxt"); |
||||
|
if(child.length){ |
||||
|
// child.find(".progress-bar").css({width:progress+'%'});
|
||||
|
parent.find(".showProcessTxt").html(progress+'%'); |
||||
|
}else{ |
||||
|
//parent.append('<div class="progress xs progress-striped active showProcess" style="width:140px;display: inline-block;margin-bottom:0px;"><div class="progress-bar progress-bar-primary " style="width:'+progress+'%"></div></div>');
|
||||
|
parent.append('<span class="showProcessTxt badge bg-light-blue">'+progress+'%</span>'); |
||||
|
} |
||||
|
}, |
||||
|
dynamicLoadJs:function(url, callback) { |
||||
|
var script = document.createElement('script'); |
||||
|
script.type = 'text/javascript'; |
||||
|
script.src = url; |
||||
|
if(typeof(callback)=='function'){ |
||||
|
script.onload = script.onreadystatechange = function () { |
||||
|
if (!this.readyState || this.readyState === "loaded" || this.readyState === "complete"){ |
||||
|
callback(); |
||||
|
script.onload = script.onreadystatechange = null; |
||||
|
} |
||||
|
}; |
||||
|
} |
||||
|
document.body.appendChild(script); |
||||
|
}, |
||||
|
dynamicLoadCss:function(url,callback) { |
||||
|
var head = document.getElementsByTagName('head')[0]; |
||||
|
var link = document.createElement('link'); |
||||
|
link.type='text/css'; |
||||
|
link.rel = 'stylesheet'; |
||||
|
link.href = url; |
||||
|
head.appendChild(link); |
||||
|
callback(); |
||||
|
}, |
||||
|
loadScript:function(urls, callback) { |
||||
|
var self=this; |
||||
|
urls=urls.split(","); |
||||
|
if(urls.length){ |
||||
|
var len=urls.length; |
||||
|
var index=1; |
||||
|
urls.forEach(function(url){ |
||||
|
if(!self.isInclude(url)){ |
||||
|
var isJs=/js$/i.test(url); |
||||
|
if(isJs){ |
||||
|
self.dynamicLoadJs(url,function(){ |
||||
|
if(len==index)callback(); |
||||
|
index++; |
||||
|
}); |
||||
|
}else{ |
||||
|
self.dynamicLoadCss(url,function(){ |
||||
|
if(len==index)callback(); |
||||
|
index++; |
||||
|
}); |
||||
|
} |
||||
|
}else{ |
||||
|
index++; |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
delCookie:function(name) |
||||
|
{ |
||||
|
var exp = new Date(); |
||||
|
exp.setTime(exp.getTime() - 1); |
||||
|
var cval=tools.getCookie(name); |
||||
|
if(cval!=null) |
||||
|
document.cookie= name + "="+cval+";expires="+exp.toGMTString(); |
||||
|
}, |
||||
|
setCookie:function(name,value) |
||||
|
{ |
||||
|
var Days = 30; |
||||
|
var exp = new Date(); |
||||
|
exp.setTime(exp.getTime() + Days*24*60*60*1000); |
||||
|
document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString(); |
||||
|
}, |
||||
|
getCookie:function(name) |
||||
|
{ |
||||
|
var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)"); |
||||
|
if(arr=document.cookie.match(reg)) |
||||
|
return unescape(arr[2]); |
||||
|
else |
||||
|
return null; |
||||
|
}, |
||||
|
tooltip:function(el,msg){ |
||||
|
|
||||
|
if(typeof more=='undefined')more=true; |
||||
|
if(typeof direction=='undefined')direction=3; |
||||
|
|
||||
|
layer.tips(msg,el, { |
||||
|
tipsMore:more, |
||||
|
time: 6000, |
||||
|
tips: [direction,'#e50112'] |
||||
|
}); |
||||
|
}, |
||||
|
tipError:function(errorMap,errorList){ |
||||
|
console.log(errorList); |
||||
|
if(errorList.length){ |
||||
|
errorList.forEach(function(item){ |
||||
|
console.log($(item['element'])); |
||||
|
tool.tooltip(item['element'],item['message']); |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
slick:function(obj,option){ |
||||
|
var allOption=$.extend({ |
||||
|
autoplay:true, |
||||
|
autoplaySpeed:1000, |
||||
|
swipe: false, |
||||
|
arrows:false, |
||||
|
dots:false, |
||||
|
fade:true, |
||||
|
speed:500, |
||||
|
pauseOnHover:false, |
||||
|
slidesToShow:1, |
||||
|
slidesToScroll:1 |
||||
|
},option||{}); |
||||
|
jQuery(obj).slick(allOption); |
||||
|
}, |
||||
|
date:function(startobj,date_format,endDate){ |
||||
|
console.log(endDate); |
||||
|
if(typeof date_format=='undefined')date_format='yyyy-mm-dd'; |
||||
|
var params={ |
||||
|
autoclose: 1, |
||||
|
todayHighlight: 1, |
||||
|
startView: 2, |
||||
|
minView: 2, |
||||
|
forceParse: 0, |
||||
|
format:date_format |
||||
|
}; |
||||
|
if(typeof endDate!='undefined')params.endDate=endDate; |
||||
|
console.log(params); |
||||
|
$(startobj).datetimepicker(params); |
||||
|
}, |
||||
|
dateTodate:function(startobj,endobj,date_format,istime,min,max){ |
||||
|
if(typeof date_format=='undefined')date_format='DD/MM/YYYY'; |
||||
|
if(typeof istime=='undefined')istime=true; |
||||
|
if(typeof min=='undefined')min=false; |
||||
|
if(typeof max=='undefined')max='2099-06-16 23:59:59'; |
||||
|
var start = { |
||||
|
elem:startobj, |
||||
|
format:date_format, |
||||
|
min: min, //设定最小日期为当前日期
|
||||
|
max: max, //最大日期
|
||||
|
istime:istime, |
||||
|
istoday: false, |
||||
|
choose: function(datas){ |
||||
|
end.min = datas; //开始日选好后,重置结束日的最小日期
|
||||
|
end.start = datas //将结束日的初始值设定为开始日
|
||||
|
} |
||||
|
}; |
||||
|
var end = { |
||||
|
elem:endobj, |
||||
|
format:date_format, |
||||
|
min:min, //设定最小日期为当前日期
|
||||
|
max:max, //最大日期
|
||||
|
istime:istime, |
||||
|
istoday: false, |
||||
|
choose: function(datas){ |
||||
|
start.max = datas; //结束日选好后,重置开始日的最大日期
|
||||
|
} |
||||
|
}; |
||||
|
laydate(start); |
||||
|
laydate(end); |
||||
|
}, |
||||
|
loading:function(msg){ |
||||
|
if(typeof msg=='undefined'||msg=='')msg=''; |
||||
|
layer.msg('加載中', {icon: 16}); |
||||
|
}, |
||||
|
closeloading:function(){ |
||||
|
setTimeout(function(){ |
||||
|
layer.closeAll('loading'); |
||||
|
}, 2000); |
||||
|
}, |
||||
|
showResponse:function (data){ |
||||
|
if(typeof data=='string'){ |
||||
|
try{ |
||||
|
data=JSON.parse(data); |
||||
|
}catch(err){ |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
tool.msg(data.msg,3000,0.2,function(){ |
||||
|
if(data.code==0&&data.url){ |
||||
|
window.location.href=data.url; |
||||
|
} |
||||
|
if(data.code==1||data.code==200){ |
||||
|
window.location.href=data.url; |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
msg:function(msg,time,shade,callback){ |
||||
|
if(typeof msg=='undefined')return false; |
||||
|
if(typeof time=='undefined'||time=='')time=3000; |
||||
|
if(typeof shade=='undefined')shade=0; |
||||
|
layer.msg(msg, { |
||||
|
time:time //2秒关闭(如果不配置,默认是3秒)
|
||||
|
,shade:shade |
||||
|
}, function(){ |
||||
|
//do something
|
||||
|
if(typeof callback!='undefined')callback(); |
||||
|
}); |
||||
|
}, |
||||
|
delItem:function(msg,url,title){ |
||||
|
if(typeof title=='undefined')title='刪除提示'; |
||||
|
tool.confirm(msg,title,0.2,function(index){ |
||||
|
$.get(url,function(data){ |
||||
|
layer.close(index); |
||||
|
tool.msg(data.info,3000,0.2,function(){ |
||||
|
if(data.status==1){ |
||||
|
window.location.href=data.url; |
||||
|
} |
||||
|
}); |
||||
|
}); |
||||
|
}); |
||||
|
}, |
||||
|
confirm:function(msg,title,shade,callback){ |
||||
|
if(typeof msg=='undefined')return false; |
||||
|
if(typeof shade=='undefined')shade=0.2; |
||||
|
if(typeof title=='undefined')title='提示'; |
||||
|
layer.confirm(msg, {shade:shade, title:title}, function(index){ |
||||
|
//do something
|
||||
|
if(typeof callback!='undefined')callback(); |
||||
|
layer.close(index); |
||||
|
}); |
||||
|
|
||||
|
}, |
||||
|
commonForm:function(form,rules,messages,showErrors,submitHandler,success){ |
||||
|
if(typeof form=='undefined')return false; |
||||
|
if(typeof showErrors=='undefined'||showErrors=='')showErrors=false; |
||||
|
if(typeof success!='function')success=tool.showResponse; |
||||
|
|
||||
|
|
||||
|
jQuery(form).validate({ |
||||
|
debug:false, |
||||
|
onfocusout:false, |
||||
|
onkeyup:false, |
||||
|
onclick:false, |
||||
|
rules:rules, |
||||
|
messages:messages, |
||||
|
showErrors:showErrors, |
||||
|
submitHandler:function(form){ |
||||
|
if(typeof submitHandler=='function'){ |
||||
|
var rst=submitHandler(this); |
||||
|
if(rst==false)return false; |
||||
|
} |
||||
|
var options={ |
||||
|
success:success |
||||
|
}; |
||||
|
jQuery(form).ajaxSubmit(options); |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
popup:function(title,url,area,callback,option){ |
||||
|
var callbackInvoke=false; |
||||
|
var fn = function(result){ |
||||
|
callbackInvoke=true; |
||||
|
callback(result); |
||||
|
layer.close(index); |
||||
|
} |
||||
|
|
||||
|
var o = $.extend({ |
||||
|
content:url, |
||||
|
type:2, |
||||
|
area:area, |
||||
|
title:title, |
||||
|
shadeClose: true, |
||||
|
shade: 0.8, |
||||
|
success:function(){ |
||||
|
var iframe = $('#layui-layer-iframe'+index)[0]; |
||||
|
iframe.contentWindow.callbackSelector = fn; |
||||
|
$(iframe).on('load',function(){ |
||||
|
iframe.contentWindow.callbackSelector = fn; |
||||
|
}); |
||||
|
}, |
||||
|
end:function(){ |
||||
|
if(!callbackInvoke) callback(); |
||||
|
}},option||{}); |
||||
|
console.log(o); |
||||
|
if(!o.area) o.area = ['800px','500px']; |
||||
|
var index = layer.open(o); |
||||
|
|
||||
|
} |
||||
|
}; |
||||
@ -0,0 +1,316 @@ |
|||||
|
/** |
||||
|
* dropload |
||||
|
* 西门(http://ons.me/526.html)
|
||||
|
* 0.9.1(161205) |
||||
|
*/ |
||||
|
|
||||
|
;(function($){ |
||||
|
'use strict'; |
||||
|
var win = window; |
||||
|
var doc = document; |
||||
|
var $win = $(win); |
||||
|
var $doc = $(doc); |
||||
|
$.fn.dropload = function(options){ |
||||
|
return new MyDropLoad(this, options); |
||||
|
}; |
||||
|
var MyDropLoad = function(element, options){ |
||||
|
var me = this; |
||||
|
me.$element = element; |
||||
|
// 上方是否插入DOM
|
||||
|
me.upInsertDOM = false; |
||||
|
// loading状态
|
||||
|
me.loading = false; |
||||
|
// 是否锁定
|
||||
|
me.isLockUp = false; |
||||
|
me.isLockDown = false; |
||||
|
// 是否有数据
|
||||
|
me.isData = true; |
||||
|
me._scrollTop = 0; |
||||
|
me._threshold = 0; |
||||
|
me.init(options); |
||||
|
}; |
||||
|
|
||||
|
// 初始化
|
||||
|
MyDropLoad.prototype.init = function(options){ |
||||
|
var me = this; |
||||
|
me.opts = $.extend(true, {}, { |
||||
|
scrollArea : me.$element, // 滑动区域
|
||||
|
domUp : { // 上方DOM
|
||||
|
domClass : 'dropload-up', |
||||
|
domRefresh : '<div class="dropload-refresh">↓下拉刷新</div>', |
||||
|
domUpdate : '<div class="dropload-update">↑释放更新</div>', |
||||
|
domLoad : '<div class="dropload-load"><span class="loading"></span>加载中...</div>' |
||||
|
}, |
||||
|
domDown : { // 下方DOM
|
||||
|
domClass : 'dropload-down', |
||||
|
domRefresh : '<div class="dropload-refresh">↑上拉加载更多</div>', |
||||
|
domLoad : '<div class="dropload-load"><span class="loading"></span>加载中...</div>', |
||||
|
domNoData : '<div class="dropload-noData">暂无数据</div>' |
||||
|
}, |
||||
|
autoLoad : true, // 自动加载
|
||||
|
distance : 50, // 拉动距离
|
||||
|
threshold : '', // 提前加载距离
|
||||
|
loadUpFn : '', // 上方function
|
||||
|
loadDownFn : '' // 下方function
|
||||
|
}, options); |
||||
|
|
||||
|
// 如果加载下方,事先在下方插入DOM
|
||||
|
if(me.opts.loadDownFn != ''){ |
||||
|
me.$element.append('<div class="'+me.opts.domDown.domClass+'">'+me.opts.domDown.domRefresh+'</div>'); |
||||
|
me.$domDown = $('.'+me.opts.domDown.domClass); |
||||
|
} |
||||
|
|
||||
|
// 计算提前加载距离
|
||||
|
if(!!me.$domDown && me.opts.threshold === ''){ |
||||
|
// 默认滑到加载区2/3处时加载
|
||||
|
me._threshold = Math.floor(me.$domDown.height()*1/3); |
||||
|
}else{ |
||||
|
me._threshold = me.opts.threshold; |
||||
|
} |
||||
|
|
||||
|
// 判断滚动区域
|
||||
|
if(me.opts.scrollArea == win){ |
||||
|
me.$scrollArea = $win; |
||||
|
// 获取文档高度
|
||||
|
me._scrollContentHeight = $doc.height(); |
||||
|
// 获取win显示区高度 —— 这里有坑
|
||||
|
me._scrollWindowHeight = doc.documentElement.clientHeight; |
||||
|
}else{ |
||||
|
me.$scrollArea = me.opts.scrollArea; |
||||
|
me._scrollContentHeight = me.$element[0].scrollHeight; |
||||
|
me._scrollWindowHeight = me.$element.height(); |
||||
|
} |
||||
|
fnAutoLoad(me); |
||||
|
|
||||
|
// 窗口调整
|
||||
|
$win.on('resize',function(){ |
||||
|
clearTimeout(me.timer); |
||||
|
me.timer = setTimeout(function(){ |
||||
|
if(me.opts.scrollArea == win){ |
||||
|
// 重新获取win显示区高度
|
||||
|
me._scrollWindowHeight = win.innerHeight; |
||||
|
}else{ |
||||
|
me._scrollWindowHeight = me.$element.height(); |
||||
|
} |
||||
|
fnAutoLoad(me); |
||||
|
},150); |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
// 绑定触摸
|
||||
|
me.$element.on('touchstart',function(e){ |
||||
|
if(!me.loading){ |
||||
|
fnTouches(e); |
||||
|
fnTouchstart(e, me); |
||||
|
} |
||||
|
}); |
||||
|
me.$element.on('touchmove',function(e){ |
||||
|
if(!me.loading){ |
||||
|
fnTouches(e, me); |
||||
|
fnTouchmove(e, me); |
||||
|
} |
||||
|
}); |
||||
|
me.$element.on('touchend',function(){ |
||||
|
if(!me.loading){ |
||||
|
fnTouchend(me); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
// 加载下方
|
||||
|
me.$scrollArea.on('scroll',function(){ |
||||
|
me._scrollTop = me.$scrollArea.scrollTop(); |
||||
|
|
||||
|
// 滚动页面触发加载数据
|
||||
|
if(me.opts.loadDownFn != '' && !me.loading && !me.isLockDown && (me._scrollContentHeight - me._threshold) <= (me._scrollWindowHeight + me._scrollTop)){ |
||||
|
loadDown(me); |
||||
|
} |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
// touches
|
||||
|
function fnTouches(e){ |
||||
|
if(!e.touches){ |
||||
|
e.touches = e.originalEvent.touches; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// touchstart
|
||||
|
function fnTouchstart(e, me){ |
||||
|
me._startY = e.touches[0].pageY; |
||||
|
// 记住触摸时的scrolltop值
|
||||
|
me.touchScrollTop = me.$scrollArea.scrollTop(); |
||||
|
} |
||||
|
|
||||
|
// touchmove
|
||||
|
function fnTouchmove(e, me){ |
||||
|
me._curY = e.touches[0].pageY; |
||||
|
me._moveY = me._curY - me._startY; |
||||
|
|
||||
|
if(me._moveY > 0){ |
||||
|
me.direction = 'down'; |
||||
|
}else if(me._moveY < 0){ |
||||
|
me.direction = 'up'; |
||||
|
} |
||||
|
|
||||
|
var _absMoveY = Math.abs(me._moveY); |
||||
|
|
||||
|
// 加载上方
|
||||
|
if(me.opts.loadUpFn != '' && me.touchScrollTop <= 0 && me.direction == 'down' && !me.isLockUp){ |
||||
|
e.preventDefault(); |
||||
|
|
||||
|
me.$domUp = $('.'+me.opts.domUp.domClass); |
||||
|
// 如果加载区没有DOM
|
||||
|
if(!me.upInsertDOM){ |
||||
|
me.$element.prepend('<div class="'+me.opts.domUp.domClass+'"></div>'); |
||||
|
me.upInsertDOM = true; |
||||
|
} |
||||
|
|
||||
|
fnTransition(me.$domUp,0); |
||||
|
|
||||
|
// 下拉
|
||||
|
if(_absMoveY <= me.opts.distance){ |
||||
|
me._offsetY = _absMoveY; |
||||
|
// todo:move时会不断清空、增加dom,有可能影响性能,下同
|
||||
|
me.$domUp.html(me.opts.domUp.domRefresh); |
||||
|
// 指定距离 < 下拉距离 < 指定距离*2
|
||||
|
}else if(_absMoveY > me.opts.distance && _absMoveY <= me.opts.distance*2){ |
||||
|
me._offsetY = me.opts.distance+(_absMoveY-me.opts.distance)*0.5; |
||||
|
me.$domUp.html(me.opts.domUp.domUpdate); |
||||
|
// 下拉距离 > 指定距离*2
|
||||
|
}else{ |
||||
|
me._offsetY = me.opts.distance+me.opts.distance*0.5+(_absMoveY-me.opts.distance*2)*0.2; |
||||
|
} |
||||
|
|
||||
|
me.$domUp.css({'height': me._offsetY}); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// touchend
|
||||
|
function fnTouchend(me){ |
||||
|
var _absMoveY = Math.abs(me._moveY); |
||||
|
if(me.opts.loadUpFn != '' && me.touchScrollTop <= 0 && me.direction == 'down' && !me.isLockUp){ |
||||
|
fnTransition(me.$domUp,300); |
||||
|
|
||||
|
if(_absMoveY > me.opts.distance){ |
||||
|
me.$domUp.css({'height':me.$domUp.children().height()}); |
||||
|
me.$domUp.html(me.opts.domUp.domLoad); |
||||
|
me.loading = true; |
||||
|
me.opts.loadUpFn(me); |
||||
|
}else{ |
||||
|
me.$domUp.css({'height':'0'}).on('webkitTransitionEnd mozTransitionEnd transitionend',function(){ |
||||
|
me.upInsertDOM = false; |
||||
|
$(this).remove(); |
||||
|
}); |
||||
|
} |
||||
|
me._moveY = 0; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 如果文档高度不大于窗口高度,数据较少,自动加载下方数据
|
||||
|
function fnAutoLoad(me){ |
||||
|
if(me.opts.loadDownFn != '' && me.opts.autoLoad){ |
||||
|
if((me._scrollContentHeight - me._threshold) <= me._scrollWindowHeight){ |
||||
|
loadDown(me); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 重新获取文档高度
|
||||
|
function fnRecoverContentHeight(me){ |
||||
|
if(me.opts.scrollArea == win){ |
||||
|
me._scrollContentHeight = $doc.height(); |
||||
|
}else{ |
||||
|
me._scrollContentHeight = me.$element[0].scrollHeight; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 加载下方
|
||||
|
function loadDown(me){ |
||||
|
me.direction = 'up'; |
||||
|
me.$domDown.html(me.opts.domDown.domLoad); |
||||
|
me.loading = true; |
||||
|
me.opts.loadDownFn(me); |
||||
|
} |
||||
|
|
||||
|
// 锁定
|
||||
|
MyDropLoad.prototype.lock = function(direction){ |
||||
|
var me = this; |
||||
|
// 如果不指定方向
|
||||
|
if(direction === undefined){ |
||||
|
// 如果操作方向向上
|
||||
|
if(me.direction == 'up'){ |
||||
|
me.isLockDown = true; |
||||
|
// 如果操作方向向下
|
||||
|
}else if(me.direction == 'down'){ |
||||
|
me.isLockUp = true; |
||||
|
}else{ |
||||
|
me.isLockUp = true; |
||||
|
me.isLockDown = true; |
||||
|
} |
||||
|
// 如果指定锁上方
|
||||
|
}else if(direction == 'up'){ |
||||
|
me.isLockUp = true; |
||||
|
// 如果指定锁下方
|
||||
|
}else if(direction == 'down'){ |
||||
|
me.isLockDown = true; |
||||
|
// 为了解决DEMO5中tab效果bug,因为滑动到下面,再滑上去点tab,direction=down,所以有bug
|
||||
|
me.direction = 'up'; |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
// 解锁
|
||||
|
MyDropLoad.prototype.unlock = function(){ |
||||
|
var me = this; |
||||
|
// 简单粗暴解锁
|
||||
|
me.isLockUp = false; |
||||
|
me.isLockDown = false; |
||||
|
// 为了解决DEMO5中tab效果bug,因为滑动到下面,再滑上去点tab,direction=down,所以有bug
|
||||
|
me.direction = 'up'; |
||||
|
}; |
||||
|
|
||||
|
// 无数据
|
||||
|
MyDropLoad.prototype.noData = function(flag){ |
||||
|
var me = this; |
||||
|
if(flag === undefined || flag == true){ |
||||
|
me.isData = false; |
||||
|
}else if(flag == false){ |
||||
|
me.isData = true; |
||||
|
} |
||||
|
console.log("noData",me); |
||||
|
}; |
||||
|
|
||||
|
// 重置
|
||||
|
MyDropLoad.prototype.resetload = function(){ |
||||
|
var me = this; |
||||
|
console.log("resetload",me); |
||||
|
if(me.direction == 'down' && me.upInsertDOM){ |
||||
|
me.$domUp.css({'height':'0'}).on('webkitTransitionEnd mozTransitionEnd transitionend',function(){ |
||||
|
me.loading = false; |
||||
|
me.upInsertDOM = false; |
||||
|
$(this).remove(); |
||||
|
fnRecoverContentHeight(me); |
||||
|
}); |
||||
|
}else if(me.direction == 'up'){ |
||||
|
me.loading = false; |
||||
|
// 如果有数据
|
||||
|
if(me.isData){ |
||||
|
// 加载区修改样式
|
||||
|
me.$domDown.html(me.opts.domDown.domRefresh); |
||||
|
fnRecoverContentHeight(me); |
||||
|
fnAutoLoad(me); |
||||
|
}else{ |
||||
|
console.log("domNoData",me.$domDown,me.opts.domDown.domNoData); |
||||
|
// 如果没数据
|
||||
|
me.$domDown.html(me.opts.domDown.domNoData); |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
// css过渡
|
||||
|
function fnTransition(dom,num){ |
||||
|
dom.css({ |
||||
|
'-webkit-transition':'all '+num+'ms', |
||||
|
'transition':'all '+num+'ms' |
||||
|
}); |
||||
|
} |
||||
|
})(window.Zepto || window.jQuery); |
||||
@ -0,0 +1,530 @@ |
|||||
|
/*! |
||||
|
* jQuery UI Widget 1.10.4+amd |
||||
|
* https://github.com/blueimp/jQuery-File-Upload
|
||||
|
* |
||||
|
* Copyright 2014 jQuery Foundation and other contributors |
||||
|
* Released under the MIT license. |
||||
|
* http://jquery.org/license
|
||||
|
* |
||||
|
* http://api.jqueryui.com/jQuery.widget/
|
||||
|
*/ |
||||
|
|
||||
|
(function (factory) { |
||||
|
if (typeof define === "function" && define.amd) { |
||||
|
// Register as an anonymous AMD module:
|
||||
|
define(["jquery"], factory); |
||||
|
} else { |
||||
|
// Browser globals:
|
||||
|
factory(jQuery); |
||||
|
} |
||||
|
}(function( $, undefined ) { |
||||
|
|
||||
|
var uuid = 0, |
||||
|
slice = Array.prototype.slice, |
||||
|
_cleanData = $.cleanData; |
||||
|
$.cleanData = function( elems ) { |
||||
|
for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { |
||||
|
try { |
||||
|
$( elem ).triggerHandler( "remove" ); |
||||
|
// http://bugs.jquery.com/ticket/8235
|
||||
|
} catch( e ) {} |
||||
|
} |
||||
|
_cleanData( elems ); |
||||
|
}; |
||||
|
|
||||
|
$.widget = function( name, base, prototype ) { |
||||
|
var fullName, existingConstructor, constructor, basePrototype, |
||||
|
// proxiedPrototype allows the provided prototype to remain unmodified
|
||||
|
// so that it can be used as a mixin for multiple widgets (#8876)
|
||||
|
proxiedPrototype = {}, |
||||
|
namespace = name.split( "." )[ 0 ]; |
||||
|
|
||||
|
name = name.split( "." )[ 1 ]; |
||||
|
fullName = namespace + "-" + name; |
||||
|
|
||||
|
if ( !prototype ) { |
||||
|
prototype = base; |
||||
|
base = $.Widget; |
||||
|
} |
||||
|
|
||||
|
// create selector for plugin
|
||||
|
$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { |
||||
|
return !!$.data( elem, fullName ); |
||||
|
}; |
||||
|
|
||||
|
$[ namespace ] = $[ namespace ] || {}; |
||||
|
existingConstructor = $[ namespace ][ name ]; |
||||
|
constructor = $[ namespace ][ name ] = function( options, element ) { |
||||
|
// allow instantiation without "new" keyword
|
||||
|
if ( !this._createWidget ) { |
||||
|
return new constructor( options, element ); |
||||
|
} |
||||
|
|
||||
|
// allow instantiation without initializing for simple inheritance
|
||||
|
// must use "new" keyword (the code above always passes args)
|
||||
|
if ( arguments.length ) { |
||||
|
this._createWidget( options, element ); |
||||
|
} |
||||
|
}; |
||||
|
// extend with the existing constructor to carry over any static properties
|
||||
|
$.extend( constructor, existingConstructor, { |
||||
|
version: prototype.version, |
||||
|
// copy the object used to create the prototype in case we need to
|
||||
|
// redefine the widget later
|
||||
|
_proto: $.extend( {}, prototype ), |
||||
|
// track widgets that inherit from this widget in case this widget is
|
||||
|
// redefined after a widget inherits from it
|
||||
|
_childConstructors: [] |
||||
|
}); |
||||
|
|
||||
|
basePrototype = new base(); |
||||
|
// we need to make the options hash a property directly on the new instance
|
||||
|
// otherwise we'll modify the options hash on the prototype that we're
|
||||
|
// inheriting from
|
||||
|
basePrototype.options = $.widget.extend( {}, basePrototype.options ); |
||||
|
$.each( prototype, function( prop, value ) { |
||||
|
if ( !$.isFunction( value ) ) { |
||||
|
proxiedPrototype[ prop ] = value; |
||||
|
return; |
||||
|
} |
||||
|
proxiedPrototype[ prop ] = (function() { |
||||
|
var _super = function() { |
||||
|
return base.prototype[ prop ].apply( this, arguments ); |
||||
|
}, |
||||
|
_superApply = function( args ) { |
||||
|
return base.prototype[ prop ].apply( this, args ); |
||||
|
}; |
||||
|
return function() { |
||||
|
var __super = this._super, |
||||
|
__superApply = this._superApply, |
||||
|
returnValue; |
||||
|
|
||||
|
this._super = _super; |
||||
|
this._superApply = _superApply; |
||||
|
|
||||
|
returnValue = value.apply( this, arguments ); |
||||
|
|
||||
|
this._super = __super; |
||||
|
this._superApply = __superApply; |
||||
|
|
||||
|
return returnValue; |
||||
|
}; |
||||
|
})(); |
||||
|
}); |
||||
|
constructor.prototype = $.widget.extend( basePrototype, { |
||||
|
// TODO: remove support for widgetEventPrefix
|
||||
|
// always use the name + a colon as the prefix, e.g., draggable:start
|
||||
|
// don't prefix for widgets that aren't DOM-based
|
||||
|
widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name |
||||
|
}, proxiedPrototype, { |
||||
|
constructor: constructor, |
||||
|
namespace: namespace, |
||||
|
widgetName: name, |
||||
|
widgetFullName: fullName |
||||
|
}); |
||||
|
|
||||
|
// If this widget is being redefined then we need to find all widgets that
|
||||
|
// are inheriting from it and redefine all of them so that they inherit from
|
||||
|
// the new version of this widget. We're essentially trying to replace one
|
||||
|
// level in the prototype chain.
|
||||
|
if ( existingConstructor ) { |
||||
|
$.each( existingConstructor._childConstructors, function( i, child ) { |
||||
|
var childPrototype = child.prototype; |
||||
|
|
||||
|
// redefine the child widget using the same prototype that was
|
||||
|
// originally used, but inherit from the new version of the base
|
||||
|
$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); |
||||
|
}); |
||||
|
// remove the list of existing child constructors from the old constructor
|
||||
|
// so the old child constructors can be garbage collected
|
||||
|
delete existingConstructor._childConstructors; |
||||
|
} else { |
||||
|
base._childConstructors.push( constructor ); |
||||
|
} |
||||
|
|
||||
|
$.widget.bridge( name, constructor ); |
||||
|
}; |
||||
|
|
||||
|
$.widget.extend = function( target ) { |
||||
|
var input = slice.call( arguments, 1 ), |
||||
|
inputIndex = 0, |
||||
|
inputLength = input.length, |
||||
|
key, |
||||
|
value; |
||||
|
for ( ; inputIndex < inputLength; inputIndex++ ) { |
||||
|
for ( key in input[ inputIndex ] ) { |
||||
|
value = input[ inputIndex ][ key ]; |
||||
|
if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { |
||||
|
// Clone objects
|
||||
|
if ( $.isPlainObject( value ) ) { |
||||
|
target[ key ] = $.isPlainObject( target[ key ] ) ? |
||||
|
$.widget.extend( {}, target[ key ], value ) : |
||||
|
// Don't extend strings, arrays, etc. with objects
|
||||
|
$.widget.extend( {}, value ); |
||||
|
// Copy everything else by reference
|
||||
|
} else { |
||||
|
target[ key ] = value; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
return target; |
||||
|
}; |
||||
|
|
||||
|
$.widget.bridge = function( name, object ) { |
||||
|
var fullName = object.prototype.widgetFullName || name; |
||||
|
$.fn[ name ] = function( options ) { |
||||
|
var isMethodCall = typeof options === "string", |
||||
|
args = slice.call( arguments, 1 ), |
||||
|
returnValue = this; |
||||
|
|
||||
|
// allow multiple hashes to be passed on init
|
||||
|
options = !isMethodCall && args.length ? |
||||
|
$.widget.extend.apply( null, [ options ].concat(args) ) : |
||||
|
options; |
||||
|
|
||||
|
if ( isMethodCall ) { |
||||
|
this.each(function() { |
||||
|
var methodValue, |
||||
|
instance = $.data( this, fullName ); |
||||
|
if ( !instance ) { |
||||
|
return $.error( "cannot call methods on " + name + " prior to initialization; " + |
||||
|
"attempted to call method '" + options + "'" ); |
||||
|
} |
||||
|
if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { |
||||
|
return $.error( "no such method '" + options + "' for " + name + " widget instance" ); |
||||
|
} |
||||
|
methodValue = instance[ options ].apply( instance, args ); |
||||
|
if ( methodValue !== instance && methodValue !== undefined ) { |
||||
|
returnValue = methodValue && methodValue.jquery ? |
||||
|
returnValue.pushStack( methodValue.get() ) : |
||||
|
methodValue; |
||||
|
return false; |
||||
|
} |
||||
|
}); |
||||
|
} else { |
||||
|
this.each(function() { |
||||
|
var instance = $.data( this, fullName ); |
||||
|
if ( instance ) { |
||||
|
instance.option( options || {} )._init(); |
||||
|
} else { |
||||
|
$.data( this, fullName, new object( options, this ) ); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
return returnValue; |
||||
|
}; |
||||
|
}; |
||||
|
|
||||
|
$.Widget = function( /* options, element */ ) {}; |
||||
|
$.Widget._childConstructors = []; |
||||
|
|
||||
|
$.Widget.prototype = { |
||||
|
widgetName: "widget", |
||||
|
widgetEventPrefix: "", |
||||
|
defaultElement: "<div>", |
||||
|
options: { |
||||
|
disabled: false, |
||||
|
|
||||
|
// callbacks
|
||||
|
create: null |
||||
|
}, |
||||
|
_createWidget: function( options, element ) { |
||||
|
element = $( element || this.defaultElement || this )[ 0 ]; |
||||
|
this.element = $( element ); |
||||
|
this.uuid = uuid++; |
||||
|
this.eventNamespace = "." + this.widgetName + this.uuid; |
||||
|
this.options = $.widget.extend( {}, |
||||
|
this.options, |
||||
|
this._getCreateOptions(), |
||||
|
options ); |
||||
|
|
||||
|
this.bindings = $(); |
||||
|
this.hoverable = $(); |
||||
|
this.focusable = $(); |
||||
|
|
||||
|
if ( element !== this ) { |
||||
|
$.data( element, this.widgetFullName, this ); |
||||
|
this._on( true, this.element, { |
||||
|
remove: function( event ) { |
||||
|
if ( event.target === element ) { |
||||
|
this.destroy(); |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
this.document = $( element.style ? |
||||
|
// element within the document
|
||||
|
element.ownerDocument : |
||||
|
// element is window or document
|
||||
|
element.document || element ); |
||||
|
this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); |
||||
|
} |
||||
|
|
||||
|
this._create(); |
||||
|
this._trigger( "create", null, this._getCreateEventData() ); |
||||
|
this._init(); |
||||
|
}, |
||||
|
_getCreateOptions: $.noop, |
||||
|
_getCreateEventData: $.noop, |
||||
|
_create: $.noop, |
||||
|
_init: $.noop, |
||||
|
|
||||
|
destroy: function() { |
||||
|
this._destroy(); |
||||
|
// we can probably remove the unbind calls in 2.0
|
||||
|
// all event bindings should go through this._on()
|
||||
|
this.element |
||||
|
.unbind( this.eventNamespace ) |
||||
|
// 1.9 BC for #7810
|
||||
|
// TODO remove dual storage
|
||||
|
.removeData( this.widgetName ) |
||||
|
.removeData( this.widgetFullName ) |
||||
|
// support: jquery <1.6.3
|
||||
|
// http://bugs.jquery.com/ticket/9413
|
||||
|
.removeData( $.camelCase( this.widgetFullName ) ); |
||||
|
this.widget() |
||||
|
.unbind( this.eventNamespace ) |
||||
|
.removeAttr( "aria-disabled" ) |
||||
|
.removeClass( |
||||
|
this.widgetFullName + "-disabled " + |
||||
|
"ui-state-disabled" ); |
||||
|
|
||||
|
// clean up events and states
|
||||
|
this.bindings.unbind( this.eventNamespace ); |
||||
|
this.hoverable.removeClass( "ui-state-hover" ); |
||||
|
this.focusable.removeClass( "ui-state-focus" ); |
||||
|
}, |
||||
|
_destroy: $.noop, |
||||
|
|
||||
|
widget: function() { |
||||
|
return this.element; |
||||
|
}, |
||||
|
|
||||
|
option: function( key, value ) { |
||||
|
var options = key, |
||||
|
parts, |
||||
|
curOption, |
||||
|
i; |
||||
|
|
||||
|
if ( arguments.length === 0 ) { |
||||
|
// don't return a reference to the internal hash
|
||||
|
return $.widget.extend( {}, this.options ); |
||||
|
} |
||||
|
|
||||
|
if ( typeof key === "string" ) { |
||||
|
// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
|
||||
|
options = {}; |
||||
|
parts = key.split( "." ); |
||||
|
key = parts.shift(); |
||||
|
if ( parts.length ) { |
||||
|
curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); |
||||
|
for ( i = 0; i < parts.length - 1; i++ ) { |
||||
|
curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; |
||||
|
curOption = curOption[ parts[ i ] ]; |
||||
|
} |
||||
|
key = parts.pop(); |
||||
|
if ( arguments.length === 1 ) { |
||||
|
return curOption[ key ] === undefined ? null : curOption[ key ]; |
||||
|
} |
||||
|
curOption[ key ] = value; |
||||
|
} else { |
||||
|
if ( arguments.length === 1 ) { |
||||
|
return this.options[ key ] === undefined ? null : this.options[ key ]; |
||||
|
} |
||||
|
options[ key ] = value; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
this._setOptions( options ); |
||||
|
|
||||
|
return this; |
||||
|
}, |
||||
|
_setOptions: function( options ) { |
||||
|
var key; |
||||
|
|
||||
|
for ( key in options ) { |
||||
|
this._setOption( key, options[ key ] ); |
||||
|
} |
||||
|
|
||||
|
return this; |
||||
|
}, |
||||
|
_setOption: function( key, value ) { |
||||
|
this.options[ key ] = value; |
||||
|
|
||||
|
if ( key === "disabled" ) { |
||||
|
this.widget() |
||||
|
.toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value ) |
||||
|
.attr( "aria-disabled", value ); |
||||
|
this.hoverable.removeClass( "ui-state-hover" ); |
||||
|
this.focusable.removeClass( "ui-state-focus" ); |
||||
|
} |
||||
|
|
||||
|
return this; |
||||
|
}, |
||||
|
|
||||
|
enable: function() { |
||||
|
return this._setOption( "disabled", false ); |
||||
|
}, |
||||
|
disable: function() { |
||||
|
return this._setOption( "disabled", true ); |
||||
|
}, |
||||
|
|
||||
|
_on: function( suppressDisabledCheck, element, handlers ) { |
||||
|
var delegateElement, |
||||
|
instance = this; |
||||
|
|
||||
|
// no suppressDisabledCheck flag, shuffle arguments
|
||||
|
if ( typeof suppressDisabledCheck !== "boolean" ) { |
||||
|
handlers = element; |
||||
|
element = suppressDisabledCheck; |
||||
|
suppressDisabledCheck = false; |
||||
|
} |
||||
|
|
||||
|
// no element argument, shuffle and use this.element
|
||||
|
if ( !handlers ) { |
||||
|
handlers = element; |
||||
|
element = this.element; |
||||
|
delegateElement = this.widget(); |
||||
|
} else { |
||||
|
// accept selectors, DOM elements
|
||||
|
element = delegateElement = $( element ); |
||||
|
this.bindings = this.bindings.add( element ); |
||||
|
} |
||||
|
|
||||
|
$.each( handlers, function( event, handler ) { |
||||
|
function handlerProxy() { |
||||
|
// allow widgets to customize the disabled handling
|
||||
|
// - disabled as an array instead of boolean
|
||||
|
// - disabled class as method for disabling individual parts
|
||||
|
if ( !suppressDisabledCheck && |
||||
|
( instance.options.disabled === true || |
||||
|
$( this ).hasClass( "ui-state-disabled" ) ) ) { |
||||
|
return; |
||||
|
} |
||||
|
return ( typeof handler === "string" ? instance[ handler ] : handler ) |
||||
|
.apply( instance, arguments ); |
||||
|
} |
||||
|
|
||||
|
// copy the guid so direct unbinding works
|
||||
|
if ( typeof handler !== "string" ) { |
||||
|
handlerProxy.guid = handler.guid = |
||||
|
handler.guid || handlerProxy.guid || $.guid++; |
||||
|
} |
||||
|
|
||||
|
var match = event.match( /^(\w+)\s*(.*)$/ ), |
||||
|
eventName = match[1] + instance.eventNamespace, |
||||
|
selector = match[2]; |
||||
|
if ( selector ) { |
||||
|
delegateElement.delegate( selector, eventName, handlerProxy ); |
||||
|
} else { |
||||
|
element.bind( eventName, handlerProxy ); |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
_off: function( element, eventName ) { |
||||
|
eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; |
||||
|
element.unbind( eventName ).undelegate( eventName ); |
||||
|
}, |
||||
|
|
||||
|
_delay: function( handler, delay ) { |
||||
|
function handlerProxy() { |
||||
|
return ( typeof handler === "string" ? instance[ handler ] : handler ) |
||||
|
.apply( instance, arguments ); |
||||
|
} |
||||
|
var instance = this; |
||||
|
return setTimeout( handlerProxy, delay || 0 ); |
||||
|
}, |
||||
|
|
||||
|
_hoverable: function( element ) { |
||||
|
this.hoverable = this.hoverable.add( element ); |
||||
|
this._on( element, { |
||||
|
mouseenter: function( event ) { |
||||
|
$( event.currentTarget ).addClass( "ui-state-hover" ); |
||||
|
}, |
||||
|
mouseleave: function( event ) { |
||||
|
$( event.currentTarget ).removeClass( "ui-state-hover" ); |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
_focusable: function( element ) { |
||||
|
this.focusable = this.focusable.add( element ); |
||||
|
this._on( element, { |
||||
|
focusin: function( event ) { |
||||
|
$( event.currentTarget ).addClass( "ui-state-focus" ); |
||||
|
}, |
||||
|
focusout: function( event ) { |
||||
|
$( event.currentTarget ).removeClass( "ui-state-focus" ); |
||||
|
} |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
_trigger: function( type, event, data ) { |
||||
|
var prop, orig, |
||||
|
callback = this.options[ type ]; |
||||
|
|
||||
|
data = data || {}; |
||||
|
event = $.Event( event ); |
||||
|
event.type = ( type === this.widgetEventPrefix ? |
||||
|
type : |
||||
|
this.widgetEventPrefix + type ).toLowerCase(); |
||||
|
// the original event may come from any element
|
||||
|
// so we need to reset the target on the new event
|
||||
|
event.target = this.element[ 0 ]; |
||||
|
|
||||
|
// copy original event properties over to the new event
|
||||
|
orig = event.originalEvent; |
||||
|
if ( orig ) { |
||||
|
for ( prop in orig ) { |
||||
|
if ( !( prop in event ) ) { |
||||
|
event[ prop ] = orig[ prop ]; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
this.element.trigger( event, data ); |
||||
|
return !( $.isFunction( callback ) && |
||||
|
callback.apply( this.element[0], [ event ].concat( data ) ) === false || |
||||
|
event.isDefaultPrevented() ); |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { |
||||
|
$.Widget.prototype[ "_" + method ] = function( element, options, callback ) { |
||||
|
if ( typeof options === "string" ) { |
||||
|
options = { effect: options }; |
||||
|
} |
||||
|
var hasOptions, |
||||
|
effectName = !options ? |
||||
|
method : |
||||
|
options === true || typeof options === "number" ? |
||||
|
defaultEffect : |
||||
|
options.effect || defaultEffect; |
||||
|
options = options || {}; |
||||
|
if ( typeof options === "number" ) { |
||||
|
options = { duration: options }; |
||||
|
} |
||||
|
hasOptions = !$.isEmptyObject( options ); |
||||
|
options.complete = callback; |
||||
|
if ( options.delay ) { |
||||
|
element.delay( options.delay ); |
||||
|
} |
||||
|
if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { |
||||
|
element[ method ]( options ); |
||||
|
} else if ( effectName !== method && element[ effectName ] ) { |
||||
|
element[ effectName ]( options.duration, options.easing, callback ); |
||||
|
} else { |
||||
|
element.queue(function( next ) { |
||||
|
$( this )[ method ](); |
||||
|
if ( callback ) { |
||||
|
callback.call( element[ 0 ] ); |
||||
|
} |
||||
|
next(); |
||||
|
}); |
||||
|
} |
||||
|
}; |
||||
|
}); |
||||
|
|
||||
|
})); |
||||
@ -0,0 +1,14 @@ |
|||||
|
var $lang={ |
||||
|
errAlertMsg: "Invalid date or the date out of range,redo or not?", |
||||
|
aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], |
||||
|
aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"], |
||||
|
aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], |
||||
|
aLongMonStr: ["January","February","March","April","May","June","July","August","September","October","November","December"], |
||||
|
clearStr: "Clear", |
||||
|
todayStr: "Today", |
||||
|
okStr: "OK", |
||||
|
updateStr: "OK", |
||||
|
timeStr: "Time", |
||||
|
quickStr: "Quick Selection", |
||||
|
err_1: 'MinDate Cannot be bigger than MaxDate!' |
||||
|
} |
||||
@ -0,0 +1,14 @@ |
|||||
|
var $lang={ |
||||
|
errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u8303\u56F4,\u9700\u8981\u64A4\u9500\u5417?", |
||||
|
aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"], |
||||
|
aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"], |
||||
|
aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"], |
||||
|
aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"], |
||||
|
clearStr: "\u6E05\u7A7A", |
||||
|
todayStr: "\u4ECA\u5929", |
||||
|
okStr: "\u786E\u5B9A", |
||||
|
updateStr: "\u786E\u5B9A", |
||||
|
timeStr: "\u65F6\u95F4", |
||||
|
quickStr: "\u5FEB\u901F\u9009\u62E9", |
||||
|
err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u4E8E\u6700\u5927\u65E5\u671F!' |
||||
|
} |
||||
@ -0,0 +1,14 @@ |
|||||
|
var $lang={ |
||||
|
errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u7BC4\u570D,\u9700\u8981\u64A4\u92B7\u55CE?", |
||||
|
aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"], |
||||
|
aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"], |
||||
|
aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"], |
||||
|
aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"], |
||||
|
clearStr: "\u6E05\u7A7A", |
||||
|
todayStr: "\u4ECA\u5929", |
||||
|
okStr: "\u78BA\u5B9A", |
||||
|
updateStr: "\u78BA\u5B9A", |
||||
|
timeStr: "\u6642\u9593", |
||||
|
quickStr: "\u5FEB\u901F\u9078\u64C7", |
||||
|
err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u65BC\u6700\u5927\u65E5\u671F!' |
||||
|
} |
||||
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 701 B |
|
After Width: | Height: | Size: 1.7 KiB |
@ -0,0 +1,519 @@ |
|||||
|
/*! |
||||
|
* Lightbox v2.10.0 |
||||
|
* by Lokesh Dhakar |
||||
|
* |
||||
|
* More info: |
||||
|
* http://lokeshdhakar.com/projects/lightbox2/
|
||||
|
* |
||||
|
* Copyright 2007, 2018 Lokesh Dhakar |
||||
|
* Released under the MIT license |
||||
|
* https://github.com/lokesh/lightbox2/blob/master/LICENSE
|
||||
|
* |
||||
|
* @preserve |
||||
|
*/ |
||||
|
|
||||
|
// Uses Node, AMD or browser globals to create a module.
|
||||
|
(function (root, factory) { |
||||
|
if (typeof define === 'function' && define.amd) { |
||||
|
// AMD. Register as an anonymous module.
|
||||
|
define(['jquery'], factory); |
||||
|
} else if (typeof exports === 'object') { |
||||
|
// Node. Does not work with strict CommonJS, but
|
||||
|
// only CommonJS-like environments that support module.exports,
|
||||
|
// like Node.
|
||||
|
module.exports = factory(require('jquery')); |
||||
|
} else { |
||||
|
// Browser globals (root is window)
|
||||
|
root.lightbox = factory(root.jQuery); |
||||
|
} |
||||
|
}(this, function ($) { |
||||
|
|
||||
|
function Lightbox(options) { |
||||
|
this.album = []; |
||||
|
this.currentImageIndex = void 0; |
||||
|
this.init(); |
||||
|
|
||||
|
// options
|
||||
|
this.options = $.extend({}, this.constructor.defaults); |
||||
|
this.option(options); |
||||
|
} |
||||
|
|
||||
|
// Descriptions of all options available on the demo site:
|
||||
|
// http://lokeshdhakar.com/projects/lightbox2/index.html#options
|
||||
|
Lightbox.defaults = { |
||||
|
albumLabel: 'Image %1 of %2', |
||||
|
alwaysShowNavOnTouchDevices: false, |
||||
|
fadeDuration: 600, |
||||
|
fitImagesInViewport: true, |
||||
|
imageFadeDuration: 600, |
||||
|
// maxWidth: 800,
|
||||
|
// maxHeight: 600,
|
||||
|
positionFromTop: 50, |
||||
|
resizeDuration: 700, |
||||
|
showImageNumberLabel: true, |
||||
|
wrapAround: false, |
||||
|
disableScrolling: false, |
||||
|
/* |
||||
|
Sanitize Title |
||||
|
If the caption data is trusted, for example you are hardcoding it in, then leave this to false. |
||||
|
This will free you to add html tags, such as links, in the caption. |
||||
|
|
||||
|
If the caption data is user submitted or from some other untrusted source, then set this to true |
||||
|
to prevent xss and other injection attacks. |
||||
|
*/ |
||||
|
sanitizeTitle: false |
||||
|
}; |
||||
|
|
||||
|
Lightbox.prototype.option = function(options) { |
||||
|
$.extend(this.options, options); |
||||
|
}; |
||||
|
|
||||
|
Lightbox.prototype.imageCountLabel = function(currentImageNum, totalImages) { |
||||
|
return this.options.albumLabel.replace(/%1/g, currentImageNum).replace(/%2/g, totalImages); |
||||
|
}; |
||||
|
|
||||
|
Lightbox.prototype.init = function() { |
||||
|
var self = this; |
||||
|
// Both enable and build methods require the body tag to be in the DOM.
|
||||
|
$(document).ready(function() { |
||||
|
self.enable(); |
||||
|
self.build(); |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
// Loop through anchors and areamaps looking for either data-lightbox attributes or rel attributes
|
||||
|
// that contain 'lightbox'. When these are clicked, start lightbox.
|
||||
|
Lightbox.prototype.enable = function() { |
||||
|
var self = this; |
||||
|
$('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]', function(event) { |
||||
|
self.start($(event.currentTarget)); |
||||
|
return false; |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
// Build html for the lightbox and the overlay.
|
||||
|
// Attach event handlers to the new DOM elements. click click click
|
||||
|
Lightbox.prototype.build = function() { |
||||
|
if ($('#lightbox').length > 0) { |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
var self = this; |
||||
|
$('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo($('body')); |
||||
|
|
||||
|
// Cache jQuery objects
|
||||
|
this.$lightbox = $('#lightbox'); |
||||
|
this.$overlay = $('#lightboxOverlay'); |
||||
|
this.$outerContainer = this.$lightbox.find('.lb-outerContainer'); |
||||
|
this.$container = this.$lightbox.find('.lb-container'); |
||||
|
this.$image = this.$lightbox.find('.lb-image'); |
||||
|
this.$nav = this.$lightbox.find('.lb-nav'); |
||||
|
|
||||
|
// Store css values for future lookup
|
||||
|
this.containerPadding = { |
||||
|
top: parseInt(this.$container.css('padding-top'), 10), |
||||
|
right: parseInt(this.$container.css('padding-right'), 10), |
||||
|
bottom: parseInt(this.$container.css('padding-bottom'), 10), |
||||
|
left: parseInt(this.$container.css('padding-left'), 10) |
||||
|
}; |
||||
|
|
||||
|
this.imageBorderWidth = { |
||||
|
top: parseInt(this.$image.css('border-top-width'), 10), |
||||
|
right: parseInt(this.$image.css('border-right-width'), 10), |
||||
|
bottom: parseInt(this.$image.css('border-bottom-width'), 10), |
||||
|
left: parseInt(this.$image.css('border-left-width'), 10) |
||||
|
}; |
||||
|
|
||||
|
// Attach event handlers to the newly minted DOM elements
|
||||
|
this.$overlay.hide().on('click', function() { |
||||
|
self.end(); |
||||
|
return false; |
||||
|
}); |
||||
|
|
||||
|
this.$lightbox.hide().on('click', function(event) { |
||||
|
if ($(event.target).attr('id') === 'lightbox') { |
||||
|
self.end(); |
||||
|
} |
||||
|
return false; |
||||
|
}); |
||||
|
|
||||
|
this.$outerContainer.on('click', function(event) { |
||||
|
if ($(event.target).attr('id') === 'lightbox') { |
||||
|
self.end(); |
||||
|
} |
||||
|
return false; |
||||
|
}); |
||||
|
|
||||
|
this.$lightbox.find('.lb-prev').on('click', function() { |
||||
|
if (self.currentImageIndex === 0) { |
||||
|
self.changeImage(self.album.length - 1); |
||||
|
} else { |
||||
|
self.changeImage(self.currentImageIndex - 1); |
||||
|
} |
||||
|
return false; |
||||
|
}); |
||||
|
|
||||
|
this.$lightbox.find('.lb-next').on('click', function() { |
||||
|
if (self.currentImageIndex === self.album.length - 1) { |
||||
|
self.changeImage(0); |
||||
|
} else { |
||||
|
self.changeImage(self.currentImageIndex + 1); |
||||
|
} |
||||
|
return false; |
||||
|
}); |
||||
|
|
||||
|
/* |
||||
|
Show context menu for image on right-click |
||||
|
|
||||
|
There is a div containing the navigation that spans the entire image and lives above of it. If |
||||
|
you right-click, you are right clicking this div and not the image. This prevents users from |
||||
|
saving the image or using other context menu actions with the image. |
||||
|
|
||||
|
To fix this, when we detect the right mouse button is pressed down, but not yet clicked, we |
||||
|
set pointer-events to none on the nav div. This is so that the upcoming right-click event on |
||||
|
the next mouseup will bubble down to the image. Once the right-click/contextmenu event occurs |
||||
|
we set the pointer events back to auto for the nav div so it can capture hover and left-click |
||||
|
events as usual. |
||||
|
*/ |
||||
|
this.$nav.on('mousedown', function(event) { |
||||
|
if (event.which === 3) { |
||||
|
self.$nav.css('pointer-events', 'none'); |
||||
|
|
||||
|
self.$lightbox.one('contextmenu', function() { |
||||
|
setTimeout(function() { |
||||
|
this.$nav.css('pointer-events', 'auto'); |
||||
|
}.bind(self), 0); |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
|
||||
|
|
||||
|
this.$lightbox.find('.lb-loader, .lb-close').on('click', function() { |
||||
|
self.end(); |
||||
|
return false; |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
// Show overlay and lightbox. If the image is part of a set, add siblings to album array.
|
||||
|
Lightbox.prototype.start = function($link) { |
||||
|
var self = this; |
||||
|
var $window = $(window); |
||||
|
|
||||
|
$window.on('resize', $.proxy(this.sizeOverlay, this)); |
||||
|
|
||||
|
$('select, object, embed').css({ |
||||
|
visibility: 'hidden' |
||||
|
}); |
||||
|
|
||||
|
this.sizeOverlay(); |
||||
|
|
||||
|
this.album = []; |
||||
|
var imageNumber = 0; |
||||
|
|
||||
|
function addToAlbum($link) { |
||||
|
self.album.push({ |
||||
|
alt: $link.attr('data-alt'), |
||||
|
link: $link.attr('href'), |
||||
|
title: $link.attr('data-title') || $link.attr('title') |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
// Support both data-lightbox attribute and rel attribute implementations
|
||||
|
var dataLightboxValue = $link.attr('data-lightbox'); |
||||
|
var $links; |
||||
|
|
||||
|
if (dataLightboxValue) { |
||||
|
$links = $($link.prop('tagName') + '[data-lightbox="' + dataLightboxValue + '"]'); |
||||
|
for (var i = 0; i < $links.length; i = ++i) { |
||||
|
addToAlbum($($links[i])); |
||||
|
if ($links[i] === $link[0]) { |
||||
|
imageNumber = i; |
||||
|
} |
||||
|
} |
||||
|
} else { |
||||
|
if ($link.attr('rel') === 'lightbox') { |
||||
|
// If image is not part of a set
|
||||
|
addToAlbum($link); |
||||
|
} else { |
||||
|
// If image is part of a set
|
||||
|
$links = $($link.prop('tagName') + '[rel="' + $link.attr('rel') + '"]'); |
||||
|
for (var j = 0; j < $links.length; j = ++j) { |
||||
|
addToAlbum($($links[j])); |
||||
|
if ($links[j] === $link[0]) { |
||||
|
imageNumber = j; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// Position Lightbox
|
||||
|
var top = $window.scrollTop() + this.options.positionFromTop; |
||||
|
var left = $window.scrollLeft(); |
||||
|
this.$lightbox.css({ |
||||
|
top: top + 'px', |
||||
|
left: left + 'px' |
||||
|
}).fadeIn(this.options.fadeDuration); |
||||
|
|
||||
|
// Disable scrolling of the page while open
|
||||
|
if (this.options.disableScrolling) { |
||||
|
$('html').addClass('lb-disable-scrolling'); |
||||
|
} |
||||
|
|
||||
|
this.changeImage(imageNumber); |
||||
|
}; |
||||
|
|
||||
|
// Hide most UI elements in preparation for the animated resizing of the lightbox.
|
||||
|
Lightbox.prototype.changeImage = function(imageNumber) { |
||||
|
var self = this; |
||||
|
|
||||
|
this.disableKeyboardNav(); |
||||
|
var $image = this.$lightbox.find('.lb-image'); |
||||
|
|
||||
|
this.$overlay.fadeIn(this.options.fadeDuration); |
||||
|
|
||||
|
$('.lb-loader').fadeIn('slow'); |
||||
|
this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide(); |
||||
|
|
||||
|
this.$outerContainer.addClass('animating'); |
||||
|
|
||||
|
// When image to show is preloaded, we send the width and height to sizeContainer()
|
||||
|
var preloader = new Image(); |
||||
|
preloader.onload = function() { |
||||
|
var $preloader; |
||||
|
var imageHeight; |
||||
|
var imageWidth; |
||||
|
var maxImageHeight; |
||||
|
var maxImageWidth; |
||||
|
var windowHeight; |
||||
|
var windowWidth; |
||||
|
|
||||
|
$image.attr({ |
||||
|
'alt': self.album[imageNumber].alt, |
||||
|
'src': self.album[imageNumber].link |
||||
|
}); |
||||
|
|
||||
|
$preloader = $(preloader); |
||||
|
|
||||
|
$image.width(preloader.width); |
||||
|
$image.height(preloader.height); |
||||
|
|
||||
|
if (self.options.fitImagesInViewport) { |
||||
|
// Fit image inside the viewport.
|
||||
|
// Take into account the border around the image and an additional 10px gutter on each side.
|
||||
|
|
||||
|
windowWidth = $(window).width(); |
||||
|
windowHeight = $(window).height(); |
||||
|
maxImageWidth = windowWidth - self.containerPadding.left - self.containerPadding.right - self.imageBorderWidth.left - self.imageBorderWidth.right - 20; |
||||
|
maxImageHeight = windowHeight - self.containerPadding.top - self.containerPadding.bottom - self.imageBorderWidth.top - self.imageBorderWidth.bottom - 120; |
||||
|
|
||||
|
// Check if image size is larger then maxWidth|maxHeight in settings
|
||||
|
if (self.options.maxWidth && self.options.maxWidth < maxImageWidth) { |
||||
|
maxImageWidth = self.options.maxWidth; |
||||
|
} |
||||
|
if (self.options.maxHeight && self.options.maxHeight < maxImageWidth) { |
||||
|
maxImageHeight = self.options.maxHeight; |
||||
|
} |
||||
|
|
||||
|
// Is the current image's width or height is greater than the maxImageWidth or maxImageHeight
|
||||
|
// option than we need to size down while maintaining the aspect ratio.
|
||||
|
if ((preloader.width > maxImageWidth) || (preloader.height > maxImageHeight)) { |
||||
|
if ((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)) { |
||||
|
imageWidth = maxImageWidth; |
||||
|
imageHeight = parseInt(preloader.height / (preloader.width / imageWidth), 10); |
||||
|
$image.width(imageWidth); |
||||
|
$image.height(imageHeight); |
||||
|
} else { |
||||
|
imageHeight = maxImageHeight; |
||||
|
imageWidth = parseInt(preloader.width / (preloader.height / imageHeight), 10); |
||||
|
$image.width(imageWidth); |
||||
|
$image.height(imageHeight); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
self.sizeContainer($image.width(), $image.height()); |
||||
|
}; |
||||
|
|
||||
|
preloader.src = this.album[imageNumber].link; |
||||
|
this.currentImageIndex = imageNumber; |
||||
|
}; |
||||
|
|
||||
|
// Stretch overlay to fit the viewport
|
||||
|
Lightbox.prototype.sizeOverlay = function() { |
||||
|
this.$overlay |
||||
|
.width($(document).width()) |
||||
|
.height($(document).height()); |
||||
|
}; |
||||
|
|
||||
|
// Animate the size of the lightbox to fit the image we are showing
|
||||
|
Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) { |
||||
|
var self = this; |
||||
|
|
||||
|
var oldWidth = this.$outerContainer.outerWidth(); |
||||
|
var oldHeight = this.$outerContainer.outerHeight(); |
||||
|
var newWidth = imageWidth + this.containerPadding.left + this.containerPadding.right + this.imageBorderWidth.left + this.imageBorderWidth.right; |
||||
|
var newHeight = imageHeight + this.containerPadding.top + this.containerPadding.bottom + this.imageBorderWidth.top + this.imageBorderWidth.bottom; |
||||
|
|
||||
|
function postResize() { |
||||
|
self.$lightbox.find('.lb-dataContainer').width(newWidth); |
||||
|
self.$lightbox.find('.lb-prevLink').height(newHeight); |
||||
|
self.$lightbox.find('.lb-nextLink').height(newHeight); |
||||
|
self.showImage(); |
||||
|
} |
||||
|
|
||||
|
if (oldWidth !== newWidth || oldHeight !== newHeight) { |
||||
|
this.$outerContainer.animate({ |
||||
|
width: newWidth, |
||||
|
height: newHeight |
||||
|
}, this.options.resizeDuration, 'swing', function() { |
||||
|
postResize(); |
||||
|
}); |
||||
|
} else { |
||||
|
postResize(); |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
// Display the image and its details and begin preload neighboring images.
|
||||
|
Lightbox.prototype.showImage = function() { |
||||
|
this.$lightbox.find('.lb-loader').stop(true).hide(); |
||||
|
this.$lightbox.find('.lb-image').fadeIn(this.options.imageFadeDuration); |
||||
|
|
||||
|
this.updateNav(); |
||||
|
this.updateDetails(); |
||||
|
this.preloadNeighboringImages(); |
||||
|
this.enableKeyboardNav(); |
||||
|
}; |
||||
|
|
||||
|
// Display previous and next navigation if appropriate.
|
||||
|
Lightbox.prototype.updateNav = function() { |
||||
|
// Check to see if the browser supports touch events. If so, we take the conservative approach
|
||||
|
// and assume that mouse hover events are not supported and always show prev/next navigation
|
||||
|
// arrows in image sets.
|
||||
|
var alwaysShowNav = false; |
||||
|
try { |
||||
|
document.createEvent('TouchEvent'); |
||||
|
alwaysShowNav = (this.options.alwaysShowNavOnTouchDevices) ? true : false; |
||||
|
} catch (e) {} |
||||
|
|
||||
|
this.$lightbox.find('.lb-nav').show(); |
||||
|
|
||||
|
if (this.album.length > 1) { |
||||
|
if (this.options.wrapAround) { |
||||
|
if (alwaysShowNav) { |
||||
|
this.$lightbox.find('.lb-prev, .lb-next').css('opacity', '1'); |
||||
|
} |
||||
|
this.$lightbox.find('.lb-prev, .lb-next').show(); |
||||
|
} else { |
||||
|
if (this.currentImageIndex > 0) { |
||||
|
this.$lightbox.find('.lb-prev').show(); |
||||
|
if (alwaysShowNav) { |
||||
|
this.$lightbox.find('.lb-prev').css('opacity', '1'); |
||||
|
} |
||||
|
} |
||||
|
if (this.currentImageIndex < this.album.length - 1) { |
||||
|
this.$lightbox.find('.lb-next').show(); |
||||
|
if (alwaysShowNav) { |
||||
|
this.$lightbox.find('.lb-next').css('opacity', '1'); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
// Display caption, image number, and closing button.
|
||||
|
Lightbox.prototype.updateDetails = function() { |
||||
|
var self = this; |
||||
|
|
||||
|
// Enable anchor clicks in the injected caption html.
|
||||
|
// Thanks Nate Wright for the fix. @https://github.com/NateWr
|
||||
|
if (typeof this.album[this.currentImageIndex].title !== 'undefined' && |
||||
|
this.album[this.currentImageIndex].title !== '') { |
||||
|
var $caption = this.$lightbox.find('.lb-caption'); |
||||
|
if (this.options.sanitizeTitle) { |
||||
|
$caption.text(this.album[this.currentImageIndex].title); |
||||
|
} else { |
||||
|
$caption.html(this.album[this.currentImageIndex].title); |
||||
|
} |
||||
|
$caption.fadeIn('fast') |
||||
|
.find('a').on('click', function(event) { |
||||
|
if ($(this).attr('target') !== undefined) { |
||||
|
window.open($(this).attr('href'), $(this).attr('target')); |
||||
|
} else { |
||||
|
location.href = $(this).attr('href'); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
if (this.album.length > 1 && this.options.showImageNumberLabel) { |
||||
|
var labelText = this.imageCountLabel(this.currentImageIndex + 1, this.album.length); |
||||
|
this.$lightbox.find('.lb-number').text(labelText).fadeIn('fast'); |
||||
|
} else { |
||||
|
this.$lightbox.find('.lb-number').hide(); |
||||
|
} |
||||
|
|
||||
|
this.$outerContainer.removeClass('animating'); |
||||
|
|
||||
|
this.$lightbox.find('.lb-dataContainer').fadeIn(this.options.resizeDuration, function() { |
||||
|
return self.sizeOverlay(); |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
// Preload previous and next images in set.
|
||||
|
Lightbox.prototype.preloadNeighboringImages = function() { |
||||
|
if (this.album.length > this.currentImageIndex + 1) { |
||||
|
var preloadNext = new Image(); |
||||
|
preloadNext.src = this.album[this.currentImageIndex + 1].link; |
||||
|
} |
||||
|
if (this.currentImageIndex > 0) { |
||||
|
var preloadPrev = new Image(); |
||||
|
preloadPrev.src = this.album[this.currentImageIndex - 1].link; |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
Lightbox.prototype.enableKeyboardNav = function() { |
||||
|
$(document).on('keyup.keyboard', $.proxy(this.keyboardAction, this)); |
||||
|
}; |
||||
|
|
||||
|
Lightbox.prototype.disableKeyboardNav = function() { |
||||
|
$(document).off('.keyboard'); |
||||
|
}; |
||||
|
|
||||
|
Lightbox.prototype.keyboardAction = function(event) { |
||||
|
var KEYCODE_ESC = 27; |
||||
|
var KEYCODE_LEFTARROW = 37; |
||||
|
var KEYCODE_RIGHTARROW = 39; |
||||
|
|
||||
|
var keycode = event.keyCode; |
||||
|
var key = String.fromCharCode(keycode).toLowerCase(); |
||||
|
if (keycode === KEYCODE_ESC || key.match(/x|o|c/)) { |
||||
|
this.end(); |
||||
|
} else if (key === 'p' || keycode === KEYCODE_LEFTARROW) { |
||||
|
if (this.currentImageIndex !== 0) { |
||||
|
this.changeImage(this.currentImageIndex - 1); |
||||
|
} else if (this.options.wrapAround && this.album.length > 1) { |
||||
|
this.changeImage(this.album.length - 1); |
||||
|
} |
||||
|
} else if (key === 'n' || keycode === KEYCODE_RIGHTARROW) { |
||||
|
if (this.currentImageIndex !== this.album.length - 1) { |
||||
|
this.changeImage(this.currentImageIndex + 1); |
||||
|
} else if (this.options.wrapAround && this.album.length > 1) { |
||||
|
this.changeImage(0); |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
// Closing time. :-(
|
||||
|
Lightbox.prototype.end = function() { |
||||
|
this.disableKeyboardNav(); |
||||
|
$(window).off('resize', this.sizeOverlay); |
||||
|
this.$lightbox.fadeOut(this.options.fadeDuration); |
||||
|
this.$overlay.fadeOut(this.options.fadeDuration); |
||||
|
$('select, object, embed').css({ |
||||
|
visibility: 'visible' |
||||
|
}); |
||||
|
if (this.options.disableScrolling) { |
||||
|
$('html').removeClass('lb-disable-scrolling'); |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
return new Lightbox(); |
||||
|
})); |
||||
@ -0,0 +1,11 @@ |
|||||
|
.Wdate{ |
||||
|
border:#999 1px solid; |
||||
|
height:20px; |
||||
|
background:#fff url(datePicker.gif) no-repeat right; |
||||
|
} |
||||
|
.Wdate::-ms-clear{display:none;} |
||||
|
|
||||
|
.WdateFmtErr{ |
||||
|
font-weight:bold; |
||||
|
color:red; |
||||
|
} |
||||
|
After Width: | Height: | Size: 1.0 KiB |
@ -0,0 +1,246 @@ |
|||||
|
/* |
||||
|
* My97 DatePicker 4.8 |
||||
|
*/ |
||||
|
|
||||
|
.WdateDiv{ |
||||
|
width:180px; |
||||
|
background-color:#FFFFFF; |
||||
|
border:#bbb 1px solid; |
||||
|
padding:2px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv2{ |
||||
|
width:360px; |
||||
|
} |
||||
|
.WdateDiv *{font-size:9pt;} |
||||
|
|
||||
|
.WdateDiv .NavImg a{ |
||||
|
display:block; |
||||
|
cursor:pointer; |
||||
|
height:16px; |
||||
|
width:16px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .NavImgll a{ |
||||
|
float:left; |
||||
|
background:transparent url(img.gif) no-repeat scroll 0 0; |
||||
|
} |
||||
|
.WdateDiv .NavImgl a{ |
||||
|
float:left; |
||||
|
background:transparent url(img.gif) no-repeat scroll -16px 0; |
||||
|
} |
||||
|
.WdateDiv .NavImgr a{ |
||||
|
float:right; |
||||
|
background:transparent url(img.gif) no-repeat scroll -32px 0; |
||||
|
} |
||||
|
.WdateDiv .NavImgrr a{ |
||||
|
float:right; |
||||
|
background:transparent url(img.gif) no-repeat scroll -48px 0; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTitle{ |
||||
|
height:24px; |
||||
|
margin-bottom:2px; |
||||
|
padding:1px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .yminput{ |
||||
|
margin-top:2px; |
||||
|
text-align:center; |
||||
|
height:20px; |
||||
|
border:0px; |
||||
|
width:50px; |
||||
|
cursor:pointer; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .yminputfocus{ |
||||
|
margin-top:2px; |
||||
|
text-align:center; |
||||
|
font-weight:bold; |
||||
|
height:20px; |
||||
|
color:blue; |
||||
|
border:#ccc 1px solid; |
||||
|
width:50px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .menuSel{ |
||||
|
z-index:1; |
||||
|
position:absolute; |
||||
|
background-color:#FFFFFF; |
||||
|
border:#ccc 1px solid; |
||||
|
display:none; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .menu{ |
||||
|
cursor:pointer; |
||||
|
background-color:#fff; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .menuOn{ |
||||
|
cursor:pointer; |
||||
|
background-color:#BEEBEE; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .invalidMenu{ |
||||
|
color:#aaa; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .YMenu{ |
||||
|
margin-top:20px; |
||||
|
|
||||
|
} |
||||
|
|
||||
|
.WdateDiv .MMenu{ |
||||
|
margin-top:20px; |
||||
|
*width:62px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .hhMenu{ |
||||
|
margin-top:-90px; |
||||
|
margin-left:26px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .mmMenu{ |
||||
|
margin-top:-46px; |
||||
|
margin-left:26px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .ssMenu{ |
||||
|
margin-top:-24px; |
||||
|
margin-left:26px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .Wweek { |
||||
|
text-align:center; |
||||
|
background:#DAF3F5; |
||||
|
border-right:#BDEBEE 1px solid; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .MTitle{ |
||||
|
background-color:#BDEBEE; |
||||
|
} |
||||
|
.WdateDiv .WdayTable2{ |
||||
|
border-collapse:collapse; |
||||
|
border:#c5d9e8 1px solid; |
||||
|
} |
||||
|
.WdateDiv .WdayTable2 table{ |
||||
|
border:0; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .WdayTable{ |
||||
|
line-height:20px; |
||||
|
border:#c5d9e8 1px solid; |
||||
|
} |
||||
|
.WdateDiv .WdayTable td{ |
||||
|
text-align:center; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .Wday{ |
||||
|
cursor:pointer; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .WdayOn{ |
||||
|
cursor:pointer; |
||||
|
background-color:#C0EBEF; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .Wwday{ |
||||
|
cursor:pointer; |
||||
|
color:#FF2F2F; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .WwdayOn{ |
||||
|
cursor:pointer; |
||||
|
color:#000; |
||||
|
background-color:#C0EBEF; |
||||
|
} |
||||
|
.WdateDiv .Wtoday{ |
||||
|
cursor:pointer; |
||||
|
color:blue; |
||||
|
} |
||||
|
.WdateDiv .Wselday{ |
||||
|
background-color:#A9E4E9; |
||||
|
} |
||||
|
.WdateDiv .WspecialDay{ |
||||
|
background-color:#66F4DF; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .WotherDay{ |
||||
|
cursor:pointer; |
||||
|
color:#6A6AFF; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .WotherDayOn{ |
||||
|
cursor:pointer; |
||||
|
background-color:#C0EBEF; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .WinvalidDay{ |
||||
|
color:#aaa; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTime{ |
||||
|
float:left; |
||||
|
margin-top:3px; |
||||
|
margin-right:30px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTime #dpTimeStr{ |
||||
|
margin-left:1px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTime input{ |
||||
|
width:18px; |
||||
|
height:20px; |
||||
|
text-align:center; |
||||
|
border:#ccc 1px solid; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTime .tB{ |
||||
|
border-right:0px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTime .tE{ |
||||
|
border-left:0; |
||||
|
border-right:0; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTime .tm{ |
||||
|
width:7px; |
||||
|
border-left:0; |
||||
|
border-right:0; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTime #dpTimeUp{ |
||||
|
height:10px; |
||||
|
width:13px; |
||||
|
border:0px; |
||||
|
background:url(img.gif) no-repeat -32px -16px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTime #dpTimeDown{ |
||||
|
height:10px; |
||||
|
width:13px; |
||||
|
border:0px; |
||||
|
background:url(img.gif) no-repeat -48px -16px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpQS { |
||||
|
float:left; |
||||
|
margin-right:3px; |
||||
|
margin-top:3px; |
||||
|
background:url(img.gif) no-repeat 0px -16px; |
||||
|
width:20px; |
||||
|
height:20px; |
||||
|
cursor:pointer; |
||||
|
} |
||||
|
.WdateDiv #dpControl { |
||||
|
text-align:right; |
||||
|
} |
||||
|
.WdateDiv .dpButton{ |
||||
|
height:20px; |
||||
|
width:45px; |
||||
|
border:#ccc 1px solid; |
||||
|
margin-top:2px; |
||||
|
margin-right:1px; |
||||
|
} |
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 307 B |
@ -0,0 +1,256 @@ |
|||||
|
/* |
||||
|
* My97 DatePicker 4.8 Skin:whyGreen |
||||
|
*/ |
||||
|
.WdateDiv{ |
||||
|
width:180px; |
||||
|
background-color:#fff; |
||||
|
border:#C5E1E4 1px solid; |
||||
|
padding:2px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv2{ |
||||
|
width:360px; |
||||
|
} |
||||
|
.WdateDiv *{font-size:9pt;} |
||||
|
|
||||
|
.WdateDiv .NavImg a{ |
||||
|
cursor:pointer; |
||||
|
display:block; |
||||
|
width:16px; |
||||
|
height:16px; |
||||
|
margin-top:1px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .NavImgll a{ |
||||
|
float:left; |
||||
|
background:url(img.gif) no-repeat; |
||||
|
} |
||||
|
.WdateDiv .NavImgl a{ |
||||
|
float:left; |
||||
|
background:url(img.gif) no-repeat -16px 0px; |
||||
|
} |
||||
|
.WdateDiv .NavImgr a{ |
||||
|
float:right; |
||||
|
background:url(img.gif) no-repeat -32px 0px; |
||||
|
} |
||||
|
.WdateDiv .NavImgrr a{ |
||||
|
float:right; |
||||
|
background:url(img.gif) no-repeat -48px 0px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTitle{ |
||||
|
height:24px; |
||||
|
padding:1px; |
||||
|
border:#c5d9e8 1px solid; |
||||
|
background:url(bg.jpg); |
||||
|
margin-bottom:2px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .yminput{ |
||||
|
margin-top:2px; |
||||
|
text-align:center; |
||||
|
border:0px; |
||||
|
height:20px; |
||||
|
width:50px; |
||||
|
color:#034c50; |
||||
|
background-color:transparent; |
||||
|
cursor:pointer; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .yminputfocus{ |
||||
|
margin-top:2px; |
||||
|
text-align:center; |
||||
|
border:#939393 1px solid; |
||||
|
font-weight:bold; |
||||
|
color:#034c50; |
||||
|
height:20px; |
||||
|
width:50px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .menuSel{ |
||||
|
z-index:1; |
||||
|
position:absolute; |
||||
|
background-color:#FFFFFF; |
||||
|
border:#A3C6C8 1px solid; |
||||
|
display:none; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .menu{ |
||||
|
cursor:pointer; |
||||
|
background-color:#fff; |
||||
|
color:#11777C; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .menuOn{ |
||||
|
cursor:pointer; |
||||
|
background-color:#BEEBEE; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .invalidMenu{ |
||||
|
color:#aaa; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .YMenu{ |
||||
|
margin-top:20px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .MMenu{ |
||||
|
margin-top:20px; |
||||
|
*width:62px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .hhMenu{ |
||||
|
margin-top:-90px; |
||||
|
margin-left:26px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .mmMenu{ |
||||
|
margin-top:-46px; |
||||
|
margin-left:26px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .ssMenu{ |
||||
|
margin-top:-24px; |
||||
|
margin-left:26px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .Wweek { |
||||
|
text-align:center; |
||||
|
background:#DAF3F5; |
||||
|
border-right:#BDEBEE 1px solid; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .MTitle{ |
||||
|
color:#13777e; |
||||
|
background-color:#bdebee; |
||||
|
} |
||||
|
.WdateDiv .WdayTable2{ |
||||
|
border-collapse:collapse; |
||||
|
border:#BEE9F0 1px solid; |
||||
|
} |
||||
|
.WdateDiv .WdayTable2 table{ |
||||
|
border:0; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .WdayTable{ |
||||
|
line-height:20px; |
||||
|
color:#13777e; |
||||
|
background-color:#edfbfb; |
||||
|
border:#BEE9F0 1px solid; |
||||
|
} |
||||
|
.WdateDiv .WdayTable td{ |
||||
|
text-align:center; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .Wday{ |
||||
|
cursor:pointer; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .WdayOn{ |
||||
|
cursor:pointer; |
||||
|
background-color:#74d2d9 ; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .Wwday{ |
||||
|
cursor:pointer; |
||||
|
color:#ab1e1e; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .WwdayOn{ |
||||
|
cursor:pointer; |
||||
|
background-color:#74d2d9; |
||||
|
} |
||||
|
.WdateDiv .Wtoday{ |
||||
|
cursor:pointer; |
||||
|
color:blue; |
||||
|
} |
||||
|
.WdateDiv .Wselday{ |
||||
|
background-color:#A7E2E7; |
||||
|
} |
||||
|
.WdateDiv .WspecialDay{ |
||||
|
background-color:#66F4DF; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .WotherDay{ |
||||
|
cursor:pointer; |
||||
|
color:#0099CC; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .WotherDayOn{ |
||||
|
cursor:pointer; |
||||
|
background-color:#C0EBEF; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv .WinvalidDay{ |
||||
|
color:#aaa; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTime{ |
||||
|
float:left; |
||||
|
margin-top:3px; |
||||
|
margin-right:30px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTime #dpTimeStr{ |
||||
|
margin-left:1px; |
||||
|
color:#497F7F; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTime input{ |
||||
|
height:20px; |
||||
|
width:18px; |
||||
|
text-align:center; |
||||
|
color:#333; |
||||
|
border:#61CAD0 1px solid; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTime .tB{ |
||||
|
border-right:0px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTime .tE{ |
||||
|
border-left:0; |
||||
|
border-right:0; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTime .tm{ |
||||
|
width:7px; |
||||
|
border-left:0; |
||||
|
border-right:0; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTime #dpTimeUp{ |
||||
|
height:10px; |
||||
|
width:13px; |
||||
|
border:0px; |
||||
|
background:url(img.gif) no-repeat -32px -16px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpTime #dpTimeDown{ |
||||
|
height:10px; |
||||
|
width:13px; |
||||
|
border:0px; |
||||
|
background:url(img.gif) no-repeat -48px -16px; |
||||
|
} |
||||
|
|
||||
|
.WdateDiv #dpQS { |
||||
|
float:left; |
||||
|
margin-right:3px; |
||||
|
margin-top:3px; |
||||
|
background:url(img.gif) no-repeat 0px -16px; |
||||
|
width:20px; |
||||
|
height:20px; |
||||
|
cursor:pointer; |
||||
|
} |
||||
|
.WdateDiv #dpControl { |
||||
|
text-align:right; |
||||
|
margin-top:3px; |
||||
|
} |
||||
|
.WdateDiv .dpButton{ |
||||
|
height:20px; |
||||
|
width:45px; |
||||
|
margin-top:2px; |
||||
|
border:#38B1B9 1px solid; |
||||
|
background-color:#CFEBEE; |
||||
|
color:#08575B; |
||||
|
} |
||||
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
@ -0,0 +1,10 @@ |
|||||
|
css_dir = "." |
||||
|
sass_dir = "." |
||||
|
images_dir = "." |
||||
|
fonts_dir = "fonts" |
||||
|
relative_assets = true |
||||
|
|
||||
|
output_style = :compact |
||||
|
line_comments = false |
||||
|
|
||||
|
preferred_syntax = :scss |
||||
|
After Width: | Height: | Size: 2.1 KiB |
@ -0,0 +1,204 @@ |
|||||
|
@charset 'UTF-8'; |
||||
|
/* Slider */ |
||||
|
.slick-loading .slick-list |
||||
|
{ |
||||
|
background: #fff url('./ajax-loader.gif') center center no-repeat; |
||||
|
} |
||||
|
|
||||
|
/* Icons */ |
||||
|
@font-face |
||||
|
{ |
||||
|
font-family: 'slick'; |
||||
|
font-weight: normal; |
||||
|
font-style: normal; |
||||
|
|
||||
|
src: url('./fonts/slick.eot'); |
||||
|
src: url('./fonts/slick.eot?#iefix') format('embedded-opentype'), url('./fonts/slick.woff') format('woff'), url('./fonts/slick.ttf') format('truetype'), url('./fonts/slick.svg#slick') format('svg'); |
||||
|
} |
||||
|
/* Arrows */ |
||||
|
.slick-prev, |
||||
|
.slick-next |
||||
|
{ |
||||
|
font-size: 0; |
||||
|
line-height: 0; |
||||
|
|
||||
|
position: absolute; |
||||
|
top: 50%; |
||||
|
|
||||
|
display: block; |
||||
|
|
||||
|
width: 20px; |
||||
|
height: 20px; |
||||
|
padding: 0; |
||||
|
-webkit-transform: translate(0, -50%); |
||||
|
-ms-transform: translate(0, -50%); |
||||
|
transform: translate(0, -50%); |
||||
|
|
||||
|
cursor: pointer; |
||||
|
|
||||
|
color: transparent; |
||||
|
border: none; |
||||
|
outline: none; |
||||
|
background: transparent; |
||||
|
} |
||||
|
.slick-prev:hover, |
||||
|
.slick-prev:focus, |
||||
|
.slick-next:hover, |
||||
|
.slick-next:focus |
||||
|
{ |
||||
|
color: transparent; |
||||
|
outline: none; |
||||
|
background: transparent; |
||||
|
} |
||||
|
.slick-prev:hover:before, |
||||
|
.slick-prev:focus:before, |
||||
|
.slick-next:hover:before, |
||||
|
.slick-next:focus:before |
||||
|
{ |
||||
|
opacity: 1; |
||||
|
} |
||||
|
.slick-prev.slick-disabled:before, |
||||
|
.slick-next.slick-disabled:before |
||||
|
{ |
||||
|
opacity: .25; |
||||
|
} |
||||
|
|
||||
|
.slick-prev:before, |
||||
|
.slick-next:before |
||||
|
{ |
||||
|
font-family: 'slick'; |
||||
|
font-size: 20px; |
||||
|
line-height: 1; |
||||
|
|
||||
|
opacity: .75; |
||||
|
color: white; |
||||
|
|
||||
|
-webkit-font-smoothing: antialiased; |
||||
|
-moz-osx-font-smoothing: grayscale; |
||||
|
} |
||||
|
|
||||
|
.slick-prev |
||||
|
{ |
||||
|
left: -25px; |
||||
|
} |
||||
|
[dir='rtl'] .slick-prev |
||||
|
{ |
||||
|
right: -25px; |
||||
|
left: auto; |
||||
|
} |
||||
|
.slick-prev:before |
||||
|
{ |
||||
|
content: '←'; |
||||
|
} |
||||
|
[dir='rtl'] .slick-prev:before |
||||
|
{ |
||||
|
content: '→'; |
||||
|
} |
||||
|
|
||||
|
.slick-next |
||||
|
{ |
||||
|
right: -25px; |
||||
|
} |
||||
|
[dir='rtl'] .slick-next |
||||
|
{ |
||||
|
right: auto; |
||||
|
left: -25px; |
||||
|
} |
||||
|
.slick-next:before |
||||
|
{ |
||||
|
content: '→'; |
||||
|
} |
||||
|
[dir='rtl'] .slick-next:before |
||||
|
{ |
||||
|
content: '←'; |
||||
|
} |
||||
|
|
||||
|
/* Dots */ |
||||
|
.slick-dotted.slick-slider |
||||
|
{ |
||||
|
margin-bottom: 30px; |
||||
|
} |
||||
|
|
||||
|
.slick-dots |
||||
|
{ |
||||
|
position: absolute; |
||||
|
bottom: -25px; |
||||
|
|
||||
|
display: block; |
||||
|
|
||||
|
width: 100%; |
||||
|
padding: 0; |
||||
|
margin: 0; |
||||
|
|
||||
|
list-style: none; |
||||
|
|
||||
|
text-align: center; |
||||
|
} |
||||
|
.slick-dots li |
||||
|
{ |
||||
|
position: relative; |
||||
|
|
||||
|
display: inline-block; |
||||
|
|
||||
|
width: 20px; |
||||
|
height: 20px; |
||||
|
margin: 0 5px; |
||||
|
padding: 0; |
||||
|
|
||||
|
cursor: pointer; |
||||
|
} |
||||
|
.slick-dots li button |
||||
|
{ |
||||
|
font-size: 0; |
||||
|
line-height: 0; |
||||
|
|
||||
|
display: block; |
||||
|
|
||||
|
width: 20px; |
||||
|
height: 20px; |
||||
|
padding: 5px; |
||||
|
|
||||
|
cursor: pointer; |
||||
|
|
||||
|
color: transparent; |
||||
|
border: 0; |
||||
|
outline: none; |
||||
|
background: transparent; |
||||
|
} |
||||
|
.slick-dots li button:hover, |
||||
|
.slick-dots li button:focus |
||||
|
{ |
||||
|
outline: none; |
||||
|
} |
||||
|
.slick-dots li button:hover:before, |
||||
|
.slick-dots li button:focus:before |
||||
|
{ |
||||
|
opacity: 1; |
||||
|
} |
||||
|
.slick-dots li button:before |
||||
|
{ |
||||
|
font-family: 'slick'; |
||||
|
font-size: 6px; |
||||
|
line-height: 20px; |
||||
|
|
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
|
||||
|
width: 20px; |
||||
|
height: 20px; |
||||
|
|
||||
|
content: '•'; |
||||
|
text-align: center; |
||||
|
|
||||
|
opacity: .25; |
||||
|
color: black; |
||||
|
|
||||
|
-webkit-font-smoothing: antialiased; |
||||
|
-moz-osx-font-smoothing: grayscale; |
||||
|
} |
||||
|
.slick-dots li.slick-active button:before |
||||
|
{ |
||||
|
opacity: .75; |
||||
|
color: black; |
||||
|
} |
||||
@ -0,0 +1,168 @@ |
|||||
|
@charset "UTF-8"; |
||||
|
|
||||
|
// Default Variables |
||||
|
|
||||
|
@slick-font-path: "./fonts/"; |
||||
|
@slick-font-family: "slick"; |
||||
|
@slick-loader-path: "./"; |
||||
|
@slick-arrow-color: white; |
||||
|
@slick-dot-color: black; |
||||
|
@slick-dot-color-active: @slick-dot-color; |
||||
|
@slick-prev-character: "←"; |
||||
|
@slick-next-character: "→"; |
||||
|
@slick-dot-character: "•"; |
||||
|
@slick-dot-size: 6px; |
||||
|
@slick-opacity-default: 0.75; |
||||
|
@slick-opacity-on-hover: 1; |
||||
|
@slick-opacity-not-active: 0.25; |
||||
|
|
||||
|
/* Slider */ |
||||
|
.slick-loading .slick-list{ |
||||
|
background: #fff url('@{slick-loader-path}ajax-loader.gif') center center no-repeat; |
||||
|
} |
||||
|
|
||||
|
/* Arrows */ |
||||
|
.slick-prev, |
||||
|
.slick-next { |
||||
|
position: absolute; |
||||
|
display: block; |
||||
|
height: 20px; |
||||
|
width: 20px; |
||||
|
line-height: 0px; |
||||
|
font-size: 0px; |
||||
|
cursor: pointer; |
||||
|
background: transparent; |
||||
|
color: transparent; |
||||
|
top: 50%; |
||||
|
-webkit-transform: translate(0, -50%); |
||||
|
-ms-transform: translate(0, -50%); |
||||
|
transform: translate(0, -50%); |
||||
|
padding: 0; |
||||
|
border: none; |
||||
|
outline: none; |
||||
|
&:hover, &:focus { |
||||
|
outline: none; |
||||
|
background: transparent; |
||||
|
color: transparent; |
||||
|
&:before { |
||||
|
opacity: @slick-opacity-on-hover; |
||||
|
} |
||||
|
} |
||||
|
&.slick-disabled:before { |
||||
|
opacity: @slick-opacity-not-active; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.slick-prev:before, .slick-next:before { |
||||
|
font-family: @slick-font-family; |
||||
|
font-size: 20px; |
||||
|
line-height: 1; |
||||
|
color: @slick-arrow-color; |
||||
|
opacity: @slick-opacity-default; |
||||
|
-webkit-font-smoothing: antialiased; |
||||
|
-moz-osx-font-smoothing: grayscale; |
||||
|
|
||||
|
& when ( @slick-font-family = 'slick' ) { |
||||
|
/* Icons */ |
||||
|
@font-face { |
||||
|
font-family: 'slick'; |
||||
|
font-weight: normal; |
||||
|
font-style: normal; |
||||
|
src: url('@{slick-font-path}slick.eot'); |
||||
|
src: url('@{slick-font-path}slick.eot?#iefix') format('embedded-opentype'), url('@{slick-font-path}slick.woff') format('woff'), url('@{slick-font-path}slick.ttf') format('truetype'), url('@{slick-font-path}slick.svg#slick') format('svg'); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.slick-prev { |
||||
|
left: -25px; |
||||
|
[dir="rtl"] & { |
||||
|
left: auto; |
||||
|
right: -25px; |
||||
|
} |
||||
|
&:before { |
||||
|
content: @slick-prev-character; |
||||
|
[dir="rtl"] & { |
||||
|
content: @slick-next-character; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.slick-next { |
||||
|
right: -25px; |
||||
|
[dir="rtl"] & { |
||||
|
left: -25px; |
||||
|
right: auto; |
||||
|
} |
||||
|
&:before { |
||||
|
content: @slick-next-character; |
||||
|
[dir="rtl"] & { |
||||
|
content: @slick-prev-character; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/* Dots */ |
||||
|
|
||||
|
.slick-dotted .slick-slider { |
||||
|
margin-bottom: 30px; |
||||
|
} |
||||
|
|
||||
|
.slick-dots { |
||||
|
position: absolute; |
||||
|
bottom: -25px; |
||||
|
list-style: none; |
||||
|
display: block; |
||||
|
text-align: center; |
||||
|
padding: 0; |
||||
|
margin: 0; |
||||
|
width: 100%; |
||||
|
li { |
||||
|
position: relative; |
||||
|
display: inline-block; |
||||
|
height: 20px; |
||||
|
width: 20px; |
||||
|
margin: 0 5px; |
||||
|
padding: 0; |
||||
|
cursor: pointer; |
||||
|
button { |
||||
|
border: 0; |
||||
|
background: transparent; |
||||
|
display: block; |
||||
|
height: 20px; |
||||
|
width: 20px; |
||||
|
outline: none; |
||||
|
line-height: 0px; |
||||
|
font-size: 0px; |
||||
|
color: transparent; |
||||
|
padding: 5px; |
||||
|
cursor: pointer; |
||||
|
&:hover, &:focus { |
||||
|
outline: none; |
||||
|
&:before { |
||||
|
opacity: @slick-opacity-on-hover; |
||||
|
} |
||||
|
} |
||||
|
&:before { |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
content: @slick-dot-character; |
||||
|
width: 20px; |
||||
|
height: 20px; |
||||
|
font-family: @slick-font-family; |
||||
|
font-size: @slick-dot-size; |
||||
|
line-height: 20px; |
||||
|
text-align: center; |
||||
|
color: @slick-dot-color; |
||||
|
opacity: @slick-opacity-not-active; |
||||
|
-webkit-font-smoothing: antialiased; |
||||
|
-moz-osx-font-smoothing: grayscale; |
||||
|
} |
||||
|
} |
||||
|
&.slick-active button:before { |
||||
|
color: @slick-dot-color-active; |
||||
|
opacity: @slick-opacity-default; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,194 @@ |
|||||
|
@charset "UTF-8"; |
||||
|
|
||||
|
// Default Variables |
||||
|
|
||||
|
// Slick icon entity codes outputs the following |
||||
|
// "\2190" outputs ascii character "←" |
||||
|
// "\2192" outputs ascii character "→" |
||||
|
// "\2022" outputs ascii character "•" |
||||
|
|
||||
|
$slick-font-path: "./fonts/" !default; |
||||
|
$slick-font-family: "slick" !default; |
||||
|
$slick-loader-path: "./" !default; |
||||
|
$slick-arrow-color: white !default; |
||||
|
$slick-dot-color: black !default; |
||||
|
$slick-dot-color-active: $slick-dot-color !default; |
||||
|
$slick-prev-character: "\2190" !default; |
||||
|
$slick-next-character: "\2192" !default; |
||||
|
$slick-dot-character: "\2022" !default; |
||||
|
$slick-dot-size: 6px !default; |
||||
|
$slick-opacity-default: 0.75 !default; |
||||
|
$slick-opacity-on-hover: 1 !default; |
||||
|
$slick-opacity-not-active: 0.25 !default; |
||||
|
|
||||
|
@function slick-image-url($url) { |
||||
|
@if function-exists(image-url) { |
||||
|
@return image-url($url); |
||||
|
} |
||||
|
@else { |
||||
|
@return url($slick-loader-path + $url); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@function slick-font-url($url) { |
||||
|
@if function-exists(font-url) { |
||||
|
@return font-url($url); |
||||
|
} |
||||
|
@else { |
||||
|
@return url($slick-font-path + $url); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/* Slider */ |
||||
|
|
||||
|
.slick-list { |
||||
|
.slick-loading & { |
||||
|
background: #fff slick-image-url("ajax-loader.gif") center center no-repeat; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/* Icons */ |
||||
|
@if $slick-font-family == "slick" { |
||||
|
@font-face { |
||||
|
font-family: "slick"; |
||||
|
src: slick-font-url("slick.eot"); |
||||
|
src: slick-font-url("slick.eot?#iefix") format("embedded-opentype"), slick-font-url("slick.woff") format("woff"), slick-font-url("slick.ttf") format("truetype"), slick-font-url("slick.svg#slick") format("svg"); |
||||
|
font-weight: normal; |
||||
|
font-style: normal; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/* Arrows */ |
||||
|
|
||||
|
.slick-prev, |
||||
|
.slick-next { |
||||
|
position: absolute; |
||||
|
display: block; |
||||
|
height: 20px; |
||||
|
width: 20px; |
||||
|
line-height: 0px; |
||||
|
font-size: 0px; |
||||
|
cursor: pointer; |
||||
|
background: transparent; |
||||
|
color: transparent; |
||||
|
top: 50%; |
||||
|
-webkit-transform: translate(0, -50%); |
||||
|
-ms-transform: translate(0, -50%); |
||||
|
transform: translate(0, -50%); |
||||
|
padding: 0; |
||||
|
border: none; |
||||
|
outline: none; |
||||
|
&:hover, &:focus { |
||||
|
outline: none; |
||||
|
background: transparent; |
||||
|
color: transparent; |
||||
|
&:before { |
||||
|
opacity: $slick-opacity-on-hover; |
||||
|
} |
||||
|
} |
||||
|
&.slick-disabled:before { |
||||
|
opacity: $slick-opacity-not-active; |
||||
|
} |
||||
|
&:before { |
||||
|
font-family: $slick-font-family; |
||||
|
font-size: 20px; |
||||
|
line-height: 1; |
||||
|
color: $slick-arrow-color; |
||||
|
opacity: $slick-opacity-default; |
||||
|
-webkit-font-smoothing: antialiased; |
||||
|
-moz-osx-font-smoothing: grayscale; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.slick-prev { |
||||
|
left: -25px; |
||||
|
[dir="rtl"] & { |
||||
|
left: auto; |
||||
|
right: -25px; |
||||
|
} |
||||
|
&:before { |
||||
|
content: $slick-prev-character; |
||||
|
[dir="rtl"] & { |
||||
|
content: $slick-next-character; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.slick-next { |
||||
|
right: -25px; |
||||
|
[dir="rtl"] & { |
||||
|
left: -25px; |
||||
|
right: auto; |
||||
|
} |
||||
|
&:before { |
||||
|
content: $slick-next-character; |
||||
|
[dir="rtl"] & { |
||||
|
content: $slick-prev-character; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/* Dots */ |
||||
|
|
||||
|
.slick-dotted.slick-slider { |
||||
|
margin-bottom: 30px; |
||||
|
} |
||||
|
|
||||
|
.slick-dots { |
||||
|
position: absolute; |
||||
|
bottom: -25px; |
||||
|
list-style: none; |
||||
|
display: block; |
||||
|
text-align: center; |
||||
|
padding: 0; |
||||
|
margin: 0; |
||||
|
width: 100%; |
||||
|
li { |
||||
|
position: relative; |
||||
|
display: inline-block; |
||||
|
height: 20px; |
||||
|
width: 20px; |
||||
|
margin: 0 5px; |
||||
|
padding: 0; |
||||
|
cursor: pointer; |
||||
|
button { |
||||
|
border: 0; |
||||
|
background: transparent; |
||||
|
display: block; |
||||
|
height: 20px; |
||||
|
width: 20px; |
||||
|
outline: none; |
||||
|
line-height: 0px; |
||||
|
font-size: 0px; |
||||
|
color: transparent; |
||||
|
padding: 5px; |
||||
|
cursor: pointer; |
||||
|
&:hover, &:focus { |
||||
|
outline: none; |
||||
|
&:before { |
||||
|
opacity: $slick-opacity-on-hover; |
||||
|
} |
||||
|
} |
||||
|
&:before { |
||||
|
position: absolute; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
content: $slick-dot-character; |
||||
|
width: 20px; |
||||
|
height: 20px; |
||||
|
font-family: $slick-font-family; |
||||
|
font-size: $slick-dot-size; |
||||
|
line-height: 20px; |
||||
|
text-align: center; |
||||
|
color: $slick-dot-color; |
||||
|
opacity: $slick-opacity-not-active; |
||||
|
-webkit-font-smoothing: antialiased; |
||||
|
-moz-osx-font-smoothing: grayscale; |
||||
|
} |
||||
|
} |
||||
|
&.slick-active button:before { |
||||
|
color: $slick-dot-color-active; |
||||
|
opacity: $slick-opacity-default; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,119 @@ |
|||||
|
/* Slider */ |
||||
|
.slick-slider |
||||
|
{ |
||||
|
position: relative; |
||||
|
|
||||
|
display: block; |
||||
|
box-sizing: border-box; |
||||
|
|
||||
|
-webkit-user-select: none; |
||||
|
-moz-user-select: none; |
||||
|
-ms-user-select: none; |
||||
|
user-select: none; |
||||
|
|
||||
|
-webkit-touch-callout: none; |
||||
|
-khtml-user-select: none; |
||||
|
-ms-touch-action: pan-y; |
||||
|
touch-action: pan-y; |
||||
|
-webkit-tap-highlight-color: transparent; |
||||
|
} |
||||
|
|
||||
|
.slick-list |
||||
|
{ |
||||
|
position: relative; |
||||
|
|
||||
|
display: block; |
||||
|
overflow: hidden; |
||||
|
|
||||
|
margin: 0; |
||||
|
padding: 0; |
||||
|
} |
||||
|
.slick-list:focus |
||||
|
{ |
||||
|
outline: none; |
||||
|
} |
||||
|
.slick-list.dragging |
||||
|
{ |
||||
|
cursor: pointer; |
||||
|
cursor: hand; |
||||
|
} |
||||
|
|
||||
|
.slick-slider .slick-track, |
||||
|
.slick-slider .slick-list |
||||
|
{ |
||||
|
-webkit-transform: translate3d(0, 0, 0); |
||||
|
-moz-transform: translate3d(0, 0, 0); |
||||
|
-ms-transform: translate3d(0, 0, 0); |
||||
|
-o-transform: translate3d(0, 0, 0); |
||||
|
transform: translate3d(0, 0, 0); |
||||
|
} |
||||
|
|
||||
|
.slick-track |
||||
|
{ |
||||
|
position: relative; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
|
||||
|
display: block; |
||||
|
margin-left: auto; |
||||
|
margin-right: auto; |
||||
|
} |
||||
|
.slick-track:before, |
||||
|
.slick-track:after |
||||
|
{ |
||||
|
display: table; |
||||
|
|
||||
|
content: ''; |
||||
|
} |
||||
|
.slick-track:after |
||||
|
{ |
||||
|
clear: both; |
||||
|
} |
||||
|
.slick-loading .slick-track |
||||
|
{ |
||||
|
visibility: hidden; |
||||
|
} |
||||
|
|
||||
|
.slick-slide |
||||
|
{ |
||||
|
display: none; |
||||
|
float: left; |
||||
|
|
||||
|
height: 100%; |
||||
|
min-height: 1px; |
||||
|
} |
||||
|
[dir='rtl'] .slick-slide |
||||
|
{ |
||||
|
float: right; |
||||
|
} |
||||
|
.slick-slide img |
||||
|
{ |
||||
|
display: block; |
||||
|
} |
||||
|
.slick-slide.slick-loading img |
||||
|
{ |
||||
|
display: none; |
||||
|
} |
||||
|
.slick-slide.dragging img |
||||
|
{ |
||||
|
pointer-events: none; |
||||
|
} |
||||
|
.slick-initialized .slick-slide |
||||
|
{ |
||||
|
display: block; |
||||
|
} |
||||
|
.slick-loading .slick-slide |
||||
|
{ |
||||
|
visibility: hidden; |
||||
|
} |
||||
|
.slick-vertical .slick-slide |
||||
|
{ |
||||
|
display: block; |
||||
|
|
||||
|
height: auto; |
||||
|
|
||||
|
border: 1px solid transparent; |
||||
|
} |
||||
|
.slick-arrow.slick-hidden { |
||||
|
display: none; |
||||
|
} |
||||
@ -0,0 +1,100 @@ |
|||||
|
/* Slider */ |
||||
|
|
||||
|
.slick-slider { |
||||
|
position: relative; |
||||
|
display: block; |
||||
|
box-sizing: border-box; |
||||
|
-webkit-touch-callout: none; |
||||
|
-webkit-user-select: none; |
||||
|
-khtml-user-select: none; |
||||
|
-moz-user-select: none; |
||||
|
-ms-user-select: none; |
||||
|
user-select: none; |
||||
|
-ms-touch-action: pan-y; |
||||
|
touch-action: pan-y; |
||||
|
-webkit-tap-highlight-color: transparent; |
||||
|
} |
||||
|
.slick-list { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
display: block; |
||||
|
margin: 0; |
||||
|
padding: 0; |
||||
|
|
||||
|
&:focus { |
||||
|
outline: none; |
||||
|
} |
||||
|
|
||||
|
&.dragging { |
||||
|
cursor: pointer; |
||||
|
cursor: hand; |
||||
|
} |
||||
|
} |
||||
|
.slick-slider .slick-track, |
||||
|
.slick-slider .slick-list { |
||||
|
-webkit-transform: translate3d(0, 0, 0); |
||||
|
-moz-transform: translate3d(0, 0, 0); |
||||
|
-ms-transform: translate3d(0, 0, 0); |
||||
|
-o-transform: translate3d(0, 0, 0); |
||||
|
transform: translate3d(0, 0, 0); |
||||
|
} |
||||
|
|
||||
|
.slick-track { |
||||
|
position: relative; |
||||
|
left: 0; |
||||
|
top: 0; |
||||
|
display: block; |
||||
|
margin-left: auto; |
||||
|
margin-right: auto; |
||||
|
|
||||
|
&:before, |
||||
|
&:after { |
||||
|
content: ""; |
||||
|
display: table; |
||||
|
} |
||||
|
|
||||
|
&:after { |
||||
|
clear: both; |
||||
|
} |
||||
|
|
||||
|
.slick-loading & { |
||||
|
visibility: hidden; |
||||
|
} |
||||
|
} |
||||
|
.slick-slide { |
||||
|
float: left; |
||||
|
height: 100%; |
||||
|
min-height: 1px; |
||||
|
[dir="rtl"] & { |
||||
|
float: right; |
||||
|
} |
||||
|
img { |
||||
|
display: block; |
||||
|
} |
||||
|
&.slick-loading img { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
display: none; |
||||
|
|
||||
|
&.dragging img { |
||||
|
pointer-events: none; |
||||
|
} |
||||
|
|
||||
|
.slick-initialized & { |
||||
|
display: block; |
||||
|
} |
||||
|
|
||||
|
.slick-loading & { |
||||
|
visibility: hidden; |
||||
|
} |
||||
|
|
||||
|
.slick-vertical & { |
||||
|
display: block; |
||||
|
height: auto; |
||||
|
border: 1px solid transparent; |
||||
|
} |
||||
|
} |
||||
|
.slick-arrow.slick-hidden { |
||||
|
display: none; |
||||
|
} |
||||
@ -0,0 +1,100 @@ |
|||||
|
/* Slider */ |
||||
|
|
||||
|
.slick-slider { |
||||
|
position: relative; |
||||
|
display: block; |
||||
|
box-sizing: border-box; |
||||
|
-webkit-touch-callout: none; |
||||
|
-webkit-user-select: none; |
||||
|
-khtml-user-select: none; |
||||
|
-moz-user-select: none; |
||||
|
-ms-user-select: none; |
||||
|
user-select: none; |
||||
|
-ms-touch-action: pan-y; |
||||
|
touch-action: pan-y; |
||||
|
-webkit-tap-highlight-color: transparent; |
||||
|
} |
||||
|
.slick-list { |
||||
|
position: relative; |
||||
|
overflow: hidden; |
||||
|
display: block; |
||||
|
margin: 0; |
||||
|
padding: 0; |
||||
|
|
||||
|
&:focus { |
||||
|
outline: none; |
||||
|
} |
||||
|
|
||||
|
&.dragging { |
||||
|
cursor: pointer; |
||||
|
cursor: hand; |
||||
|
} |
||||
|
} |
||||
|
.slick-slider .slick-track, |
||||
|
.slick-slider .slick-list { |
||||
|
-webkit-transform: translate3d(0, 0, 0); |
||||
|
-moz-transform: translate3d(0, 0, 0); |
||||
|
-ms-transform: translate3d(0, 0, 0); |
||||
|
-o-transform: translate3d(0, 0, 0); |
||||
|
transform: translate3d(0, 0, 0); |
||||
|
} |
||||
|
|
||||
|
.slick-track { |
||||
|
position: relative; |
||||
|
left: 0; |
||||
|
top: 0; |
||||
|
display: block; |
||||
|
margin-left: auto; |
||||
|
margin-right: auto; |
||||
|
|
||||
|
&:before, |
||||
|
&:after { |
||||
|
content: ""; |
||||
|
display: table; |
||||
|
} |
||||
|
|
||||
|
&:after { |
||||
|
clear: both; |
||||
|
} |
||||
|
|
||||
|
.slick-loading & { |
||||
|
visibility: hidden; |
||||
|
} |
||||
|
} |
||||
|
.slick-slide { |
||||
|
float: left; |
||||
|
height: 100%; |
||||
|
min-height: 1px; |
||||
|
[dir="rtl"] & { |
||||
|
float: right; |
||||
|
} |
||||
|
img { |
||||
|
display: block; |
||||
|
} |
||||
|
&.slick-loading img { |
||||
|
display: none; |
||||
|
} |
||||
|
|
||||
|
display: none; |
||||
|
|
||||
|
&.dragging img { |
||||
|
pointer-events: none; |
||||
|
} |
||||
|
|
||||
|
.slick-initialized & { |
||||
|
display: block; |
||||
|
} |
||||
|
|
||||
|
.slick-loading & { |
||||
|
visibility: hidden; |
||||
|
} |
||||
|
|
||||
|
.slick-vertical & { |
||||
|
display: block; |
||||
|
height: auto; |
||||
|
border: 1px solid transparent; |
||||
|
} |
||||
|
} |
||||
|
.slick-arrow.slick-hidden { |
||||
|
display: none; |
||||
|
} |
||||
@ -0,0 +1,102 @@ |
|||||
|
{include file="public:header"/} |
||||
|
{if condition="CONTROLLER_NAME eq 'Index' and (ACTION_NAME eq 'index' or ACTION_NAME eq 'search')"} |
||||
|
<div class="search"> |
||||
|
<div class="searchbox"> |
||||
|
<div class="icon" ><img src="{$yf_theme_path}/public/img/search.png" width="100%"/></div> |
||||
|
<div class="input"><input type="text" name="keyword" id="keyword" placeholder="搜索" autocomplete="off" value="{:isset($keyword)?$keyword:''}"/></div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<script> |
||||
|
$(function(){ |
||||
|
$("#keyword").keydown(function(event){ |
||||
|
if(event.keyCode==13){ |
||||
|
var keyword=$("#keyword").val(); |
||||
|
if(typeof keyword=='undefined'||keyword==''){ |
||||
|
layer.msg("请输入关键词"); |
||||
|
$("#keyword").focus(); |
||||
|
return false; |
||||
|
} |
||||
|
var url="{:url('search')}?keyword="+keyword; |
||||
|
window.location.href=url; |
||||
|
} |
||||
|
}); |
||||
|
$(".searchbox .icon").click(function(){ |
||||
|
var keyword=$("#keyword").val(); |
||||
|
if(typeof keyword=='undefined'||keyword==''){ |
||||
|
layer.msg("请输入关键词"); |
||||
|
$("#keyword").focus(); |
||||
|
return false; |
||||
|
} |
||||
|
var url="{:url('search')}?keyword="+keyword; |
||||
|
window.location.href=url; |
||||
|
}); |
||||
|
}); |
||||
|
</script> |
||||
|
{if condition="isset($banners) and count($banners)"} |
||||
|
<div id="banners"> |
||||
|
<div class="banner-wraper"> |
||||
|
{foreach name="banners" item="vo"} |
||||
|
<div class="banner"><a href="{$vo.lk_url?$vo.lk_url.'\" target=\"__blank':'javascript:void(0);'}"> |
||||
|
{if condition="empty($vo['lk_pic'])"} |
||||
|
<img src="{$yf_theme_path}/public/img/default.png" class="media-object" width="100%" /> |
||||
|
{else} |
||||
|
<img src="{$vo.lk_pic}" class="media-object" width="100%" οnerrοr="javascript:this.src='{$yf_theme_path}/public/img/default.png';"/> |
||||
|
{/if} |
||||
|
</a></div> |
||||
|
{/foreach} |
||||
|
</div> |
||||
|
</div> |
||||
|
<script> |
||||
|
$(".banner img").each(function(){ |
||||
|
var index=$(this).index(); |
||||
|
var wid=$(window).width(); |
||||
|
$(".banner img").css({"width":wid}); |
||||
|
}); |
||||
|
$(function(){ |
||||
|
$(".banner-wraper").slick({ |
||||
|
dots:true, |
||||
|
arrows:false, |
||||
|
autoplay: true, |
||||
|
centerMode: true, |
||||
|
variableWidth: true, |
||||
|
autoplaySpeed: 2000, |
||||
|
}); |
||||
|
}); |
||||
|
</script> |
||||
|
{/if} |
||||
|
{if condition="isset($notices) and count($notices)"} |
||||
|
<div class="noticeshow"> |
||||
|
<div class="voice"><img src="{$yf_theme_path}/public/img/voice.jpg" width="100%"/></div> |
||||
|
<div class="tag"><img src="{$yf_theme_path}/public/img/nicon.jpg" width="100%"/></div> |
||||
|
<div class="list"> |
||||
|
<div class="wraper"> |
||||
|
{foreach name="notices" item="vo"} |
||||
|
<div class="item"><a href="{:url('notice',['id'=>$vo['n_id']])}">{$vo.n_title}</a></div> |
||||
|
{/foreach} |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<script> |
||||
|
$(function(){ |
||||
|
$(".noticeshow .wraper").slick({ |
||||
|
dots:false, |
||||
|
arrows:false, |
||||
|
autoplay: true, |
||||
|
autoplaySpeed: 2000, |
||||
|
vertical:true |
||||
|
}); |
||||
|
}); |
||||
|
</script> |
||||
|
{/if} |
||||
|
<div class="poster" style="padding:5px 10px 0px 10px;"> |
||||
|
<a href="{:url('bbs/index')}"><img src="{$yf_theme_path}/public/img/banner3.png" width="100%"/></a> |
||||
|
</div> |
||||
|
<div class="poster" style="padding:10px;"> |
||||
|
<a href="{:url('common/join')}"><img src="{$yf_theme_path}/public/img/banner2.png" width="100%"/></a> |
||||
|
</div> |
||||
|
{/if} |
||||
|
|
||||
|
<div class="main page"> |
||||
|
{__CONTENT__} |
||||
|
</div> |
||||
|
{include file="public:footer"/} |
||||
@ -0,0 +1,89 @@ |
|||||
|
{layout name="public/layout" /} |
||||
|
<div id="login"> |
||||
|
<img src="{$yf_theme_path}/public/img/logbg.jpg" width="100%"/> |
||||
|
<div class="wraper"> |
||||
|
<form id="logForm" class="" action="{:url('Login/runlogin')}" method="post"> |
||||
|
<div class="form-group"> |
||||
|
<label >手机号</label> |
||||
|
<input type="text" class="form-control" name="member_list_username" placeholder="请输入手机号" autocomplete="off"> |
||||
|
</div> |
||||
|
<div class="form-group" style="background:none;"> |
||||
|
<div id="logCaptcha" type="button" class="btn btn-danger" style="width:100%;cursor:pointer;text-align:center;">短信验证</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<div class="form-control"> |
||||
|
<input type="text" class="form-control" name="verify" placeholder="验证码(600s有效)" autocomplete="off"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<button type="submit" class="btn btn-danger" style="width:100%;margin-top:5%;">登录</button> |
||||
|
<input type="hidden" name="openid" value="{$openid}"> |
||||
|
<input type="hidden" name="jump" value="{$jump}"> |
||||
|
<div class="checkbox text-right"> |
||||
|
<label><a href="{:url('index2')}">密码登录</a></label> |
||||
|
<label><a href="{:url('common/join')}">加入我们</a></label> |
||||
|
<label> |
||||
|
<a href="{:url('forget')}">找回密码</a> |
||||
|
</label> |
||||
|
</div> |
||||
|
<p>会员可直接通过预留手机登录,如需帮助可拨打0755-88266839咨询。</p> |
||||
|
</form> |
||||
|
</div> |
||||
|
</div> |
||||
|
<script src="{$yf_theme_path}public/js/jquery.form.js"></script> |
||||
|
<script src="{$yf_theme_path}public/js/jquery.validate.min.js"></script> |
||||
|
<script src="{$yf_theme_path}public/js/layer/layer.js"></script> |
||||
|
<script src="{$yf_theme_path}public/js/base.js"></script> |
||||
|
<script src="https://ssl.captcha.qq.com/TCaptcha.js"></script> |
||||
|
<script> |
||||
|
new TencentCaptcha(document.getElementById('logCaptcha'),'2076547321', |
||||
|
function(res){ /* callback */ |
||||
|
if(res.ret === 0){ |
||||
|
var url="{:url('login/sendSms')}"; |
||||
|
var account = $("#logForm input[name='member_list_username']"); |
||||
|
if(!account.val()){ |
||||
|
account.focus(); |
||||
|
return false; |
||||
|
}else if(!(/^1[3456789]\d{9}$/.test(account.val()))){ |
||||
|
layer.alert('手机号格式不正确', {icon: 5}, function (index) { |
||||
|
layer.close(index); |
||||
|
account.focus(); |
||||
|
}); |
||||
|
return false; |
||||
|
} |
||||
|
var obj=$("#logCaptcha"); |
||||
|
$.post(url,{ticket:res.ticket,randstr:res.randstr,mobile:account.val()},function(res){ |
||||
|
if(res.code==1){ |
||||
|
obj.addClass('disabled'); |
||||
|
var numts=60; |
||||
|
obj.html("再获取:"+numts+"秒"); |
||||
|
var codets=setInterval(function(){ |
||||
|
numts--; |
||||
|
obj.html("再获取:"+numts+"秒"); |
||||
|
if(numts==0){ |
||||
|
obj.html("发送验证"); |
||||
|
clearInterval(codets); |
||||
|
obj.removeClass('disabled'); |
||||
|
} |
||||
|
},1000); |
||||
|
} |
||||
|
layer.msg(res.msg); |
||||
|
}); |
||||
|
}else{ |
||||
|
layer.msg("验证失败"); |
||||
|
} |
||||
|
},{}); |
||||
|
$(function(){ |
||||
|
var rules={ |
||||
|
"member_list_username":"required", |
||||
|
"verify":"required", |
||||
|
}; |
||||
|
var messages={ |
||||
|
"verify":"验证码必填", |
||||
|
"member_list_username":{ |
||||
|
"required":"手机号码必填", |
||||
|
"isMobile":"请正确填写手机号码" |
||||
|
} |
||||
|
}; |
||||
|
tool.commonForm("#logForm",rules,messages,tool.tipError); |
||||
|
}); |
||||
|
</script> |
||||
@ -0,0 +1,65 @@ |
|||||
|
{layout name="public/layout" /} |
||||
|
<style> |
||||
|
#logForm label.error{color:red;} |
||||
|
</style> |
||||
|
<div id="login"> |
||||
|
<img src="{$yf_theme_path}/public/img/logbg.jpg" width="100%"/> |
||||
|
<div class="wraper"> |
||||
|
<form id="logForm" class="" action="{:url('Login/runlogin2')}" method="post"> |
||||
|
<div class="form-group"> |
||||
|
<label >帐号</label> |
||||
|
<input type="text" class="form-control" name="member_list_username" placeholder="请输入帐号" autocomplete="off"> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label >密 码</label> |
||||
|
<input type="password" class="form-control" name="member_list_pwd" placeholder="请输入密码" autocomplete="off"> |
||||
|
</div> |
||||
|
<div class="form-group" style="padding:6px 2px;"> |
||||
|
<div class="form-control" style="padding:3px 0px;"> |
||||
|
<img class="verify_img" id="login_verify" src="{:url('check_verify',['key'=>'mlog'])}" style="cursor: pointer;margin-top:-3px;width:66%;vertical-align:top;display:inline-block;height:34px;border-radius: 3px;"> |
||||
|
<input type="text" class="form-control" name="verify" placeholder="输入验证码" style="display:inline-block;vertical-align:top;width:32%;padding:3px;"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<button type="submit" class="btn btn-danger" style="width:100%;margin-top:5%;">登录</button> |
||||
|
<input type="hidden" name="openid" value="{$openid}"> |
||||
|
<input type="hidden" name="jump" value="{$jump}"> |
||||
|
<div class="checkbox text-right"> |
||||
|
<label><a href="{:url('login/index')}">短信登录</a></label> |
||||
|
<label><a href="{:url('common/join')}">加入我们</a></label> |
||||
|
<label> |
||||
|
<a href="{:url('forget')}">找回密码</a> |
||||
|
</label> |
||||
|
</div> |
||||
|
<p>会员可直接通过预留手机登录,如需帮助可拨打0755-88266839咨询。</p> |
||||
|
</form> |
||||
|
</div> |
||||
|
</div> |
||||
|
<script src="{$yf_theme_path}public/js/jquery.form.js"></script> |
||||
|
<script src="{$yf_theme_path}public/js/jquery.validate.min.js"></script> |
||||
|
<script src="{$yf_theme_path}public/js/layer/layer.js"></script> |
||||
|
<script src="{$yf_theme_path}public/js/base.js"></script> |
||||
|
<script> |
||||
|
|
||||
|
$(function(){ |
||||
|
var rules={ |
||||
|
"member_list_username":"required", |
||||
|
"member_list_pwd":"required", |
||||
|
"verify":"required", |
||||
|
}; |
||||
|
var messages={ |
||||
|
"member_list_pwd":"密码必填", |
||||
|
"verify":"验证码必填", |
||||
|
"member_list_username":"帐号必填" |
||||
|
}; |
||||
|
$("#login_verify").click(function(){ |
||||
|
var src="{:url('Login/check_verify',['key'=>'mlog'])}?"+Math.random(); |
||||
|
$("#login_verify").attr('src',src); |
||||
|
}); |
||||
|
tool.commonForm("#logForm",rules,messages,tool.tipError,function(){ |
||||
|
setTimeout(function(){ |
||||
|
var src="{:url('Login/check_verify',['key'=>'mlog'])}?"+Math.random(); |
||||
|
$("#login_verify").attr('src',src); |
||||
|
},3000); |
||||
|
}); |
||||
|
}); |
||||
|
</script> |
||||
@ -0,0 +1,83 @@ |
|||||
|
{layout name="public/layout" /} |
||||
|
<div id="login"> |
||||
|
<img src="{$yf_theme_path}/public/img/logbg.jpg" width="100%"/> |
||||
|
<div class="wraper"> |
||||
|
<form id="regForm" class="form-horizontal" action="{:url('runpwd_reset')}" method="post"> |
||||
|
|
||||
|
<div class="form-group"> |
||||
|
<label class="col-xs-3 control-label">密 码:</label> |
||||
|
<div class="col-xs-8"> |
||||
|
<input type="password" class="form-control" name="password" id="password" placeholder="请输入密码"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-xs-3 control-label">确认密码:</label> |
||||
|
<div class="col-xs-8"> |
||||
|
<input type="password" class="form-control" name="repassword" placeholder="请输入确认密码"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-xs-3 control-label"> </label> |
||||
|
<div class=" col-xs-8" style="padding-left:0px;"> |
||||
|
<img class="verify_img" src="{:url('check_verify',['key'=>'pwd_reset'])}" onClick="this.src='{:url('check_verify',['key'=>'pwd_reset'])}'+'?'+Math.random()" style="cursor: pointer;width:100%;border: 1px solid #d5d5d5;height:34px;border-radius: 3px;"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-xs-3 control-label">验证码:</label> |
||||
|
<div class=" col-xs-8" style="padding-left:0px;"> |
||||
|
<input type="text" class="form-control" name="verify" placeholder="请输入验证码"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<div class="col-xs-offset-3 col-xs-8"> |
||||
|
<input type="hidden" name="member_list_id" value="{$member_list_id}"> |
||||
|
<input type="hidden" name="code" value="{$code}"> |
||||
|
<input type="hidden" name="type" value="{$type}"> |
||||
|
<button type="submit" class="btn btn-danger" style="width:100%;">确定</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<div class="col-xs-offset-3 col-xs-8"> |
||||
|
<div class="checkbox"> |
||||
|
<label> |
||||
|
已有帐号?<a href="{:url('index')}">立即登录</a> |
||||
|
</label> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
<!--手机注册page结束--> |
||||
|
</div> |
||||
|
</div> |
||||
|
<script type="text/javascript" charset="utf-8" src="//g.alicdn.com/sd/ncpc/nc.js?t={:time()}"></script> |
||||
|
<script src="{$yf_theme_path}public/js/jquery.form.js"></script> |
||||
|
<script src="{$yf_theme_path}public/js/jquery.validate.min.js"></script> |
||||
|
<script src="{$yf_theme_path}public/js/layer/layer.js"></script> |
||||
|
<script src="{$yf_theme_path}public/js/base.js"></script> |
||||
|
<style> |
||||
|
.nc-container .nc_scale span{line-height:34px;height:34px;} |
||||
|
</style> |
||||
|
<script> |
||||
|
<!--注册开始--> |
||||
|
var rules={ |
||||
|
"password":"required", |
||||
|
"repassword":{ |
||||
|
equalTo:"#password" |
||||
|
}, |
||||
|
"verify":"required", |
||||
|
}; |
||||
|
var messages={ |
||||
|
"password":"密码必填", |
||||
|
"repassword":{ |
||||
|
equalTo:"密码与确认密码不一致" |
||||
|
}, |
||||
|
"verify":"验证码必填" |
||||
|
}; |
||||
|
tool.commonForm("#regForm",rules,messages,'',function(){ |
||||
|
setTimeout(function(){ |
||||
|
var src="{:url('Login/check_verify',['key'=>'pwd_reset'])}?"+Math.random(); |
||||
|
$(".verify_img").attr('src',src); |
||||
|
},3000); |
||||
|
}); |
||||
|
<!--注册结束--> |
||||
|
</script> |
||||
@ -0,0 +1,126 @@ |
|||||
|
{layout name="public/layout" /} |
||||
|
<style> |
||||
|
.disable { |
||||
|
pointer-events: none; |
||||
|
} |
||||
|
</style> |
||||
|
<div id="login"> |
||||
|
<img src="{$yf_theme_path}/public/img/logbg.jpg" width="100%"/> |
||||
|
<div class="wraper"> |
||||
|
<form id="regForm" class="form-horizontal" action="{:url('Register/runregister')}" method="post"> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-xs-3 control-label">手机号:</label> |
||||
|
<div class="col-xs-8"> |
||||
|
<input type="text" class="form-control" name="member_list_tel" placeholder="手机号"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-xs-3 control-label"> </label> |
||||
|
<div class="col-xs-8"> |
||||
|
|
||||
|
<div id="regCaptcha" type="button" class="btn btn-danger" style="width:100%;cursor:pointer;text-align:center;">验证</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-xs-3 control-label"> </label> |
||||
|
<div class="col-xs-8"> |
||||
|
<input type="text" class="form-control" name="verify" placeholder="验证码(600s有效)"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-xs-3 control-label">密 码:</label> |
||||
|
<div class="col-xs-8"> |
||||
|
<input type="password" class="form-control" name="password" id="password" placeholder="请输入密码"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-xs-3 control-label">确认密码:</label> |
||||
|
<div class="col-xs-8"> |
||||
|
<input type="password" class="form-control" name="repassword" placeholder="请输入确认密码"> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label class="col-xs-3 control-label"> </label> |
||||
|
<div class="col-xs-8"> |
||||
|
<button type="submit" class="btn btn-danger" style="width:100%;">注册</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<div class="col-xs-offset-3 col-xs-8"> |
||||
|
<div class="checkbox"> |
||||
|
<label> |
||||
|
已有帐号?<a href="{:url('index')}">立即登录</a> |
||||
|
</label> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</form> |
||||
|
</div> |
||||
|
<!--手机注册page结束--> |
||||
|
</div> |
||||
|
<script src="{$yf_theme_path}public/js/jquery.form.js"></script> |
||||
|
<script src="{$yf_theme_path}public/js/jquery.validate.min.js"></script> |
||||
|
<script src="{$yf_theme_path}public/js/layer/layer.js"></script> |
||||
|
<script src="{$yf_theme_path}public/js/base.js"></script> |
||||
|
<script src="https://ssl.captcha.qq.com/TCaptcha.js"></script> |
||||
|
<script> |
||||
|
new TencentCaptcha(document.getElementById('regCaptcha'),'2002258607', |
||||
|
function(res){ /* callback */ |
||||
|
if(res.ret === 0){ |
||||
|
var url="{:url('register/sendRegisterSms')}"; |
||||
|
var account = $("#regForm input[name='member_list_tel']"); |
||||
|
if(!account.val()){ |
||||
|
account.focus(); |
||||
|
return false; |
||||
|
}else if(!(/^1[3456789]\d{9}$/.test(account.val()))){ |
||||
|
layer.alert('手机号格式不正确', {icon: 5}, function (index) { |
||||
|
layer.close(index); |
||||
|
account.focus(); |
||||
|
}); |
||||
|
return false; |
||||
|
} |
||||
|
var obj=$("#regCaptcha"); |
||||
|
$.post(url,{ticket:res.ticket,randstr:res.randstr,mobile:account.val()},function(res){ |
||||
|
if(res.code==1){ |
||||
|
obj.addClass('disabled'); |
||||
|
var numts=600; |
||||
|
obj.html("再获取:"+numts); |
||||
|
var codets=setInterval(function(){ |
||||
|
numts--; |
||||
|
obj.html("再获取:"+numts); |
||||
|
if(numts==0){ |
||||
|
obj.html("发送验证"); |
||||
|
clearInterval(codets); |
||||
|
obj.removeClass('disabled'); |
||||
|
} |
||||
|
},1000); |
||||
|
} |
||||
|
layer.msg(res.msg); |
||||
|
}); |
||||
|
}else{ |
||||
|
layer.msg("验证失败"); |
||||
|
} |
||||
|
},{}); |
||||
|
<!--注册开始--> |
||||
|
var rules={ |
||||
|
"member_list_tel":"required", |
||||
|
"password":"required", |
||||
|
"repassword":{ |
||||
|
equalTo:"#password" |
||||
|
}, |
||||
|
"verify":"required", |
||||
|
}; |
||||
|
var messages={ |
||||
|
"password":"密码必填", |
||||
|
"repassword":{ |
||||
|
equalTo:"密码与确认密码不一致" |
||||
|
}, |
||||
|
"verify":"验证码必填", |
||||
|
"member_list_tel":{ |
||||
|
"required":"手机号码必填", |
||||
|
"isMobile":"请正确填写手机号码" |
||||
|
} |
||||
|
}; |
||||
|
tool.commonForm("#regForm",rules,messages); |
||||
|
<!--注册结束--> |
||||
|
</script> |
||||
@ -0,0 +1,44 @@ |
|||||
|
<div class="weui-tabbar"> |
||||
|
<div class="weui-tabbar__item {if condition="CONTROLLER_NAME eq 'Index'"}weui-bar__item_on{/if}" onclick="window.location.href='{:url('index/index')}'"> |
||||
|
<div class="weui-tabbar__icon"> |
||||
|
<img class="icon icon1" src="{$yf_theme_path}/public/img/hicon.png"> |
||||
|
<img class="icon icon2" src="{$yf_theme_path}/public/img/hicon2.png"> |
||||
|
</div> |
||||
|
<p class="weui-tabbar__label">首页</p> |
||||
|
</div> |
||||
|
<div class="weui-tabbar__item {if condition="CONTROLLER_NAME eq 'Question'"}weui-bar__item_on{/if}" onclick="window.location.href='{:url('question/index')}'"> |
||||
|
<div class="weui-tabbar__icon"> |
||||
|
<img class="icon icon1" src="{$yf_theme_path}/public/img/qicon.png"> |
||||
|
<img class="icon icon2" src="{$yf_theme_path}/public/img/qicon2.png"> |
||||
|
</div> |
||||
|
<p class="weui-tabbar__label">常见问答</p> |
||||
|
</div> |
||||
|
<div class="weui-tabbar__item {if condition="ACTION_NAME eq 'contactus'"}weui-bar__item_on{/if}" onclick="window.location.href='{:url('common/contactus')}'"> |
||||
|
<div class="weui-tabbar__icon"> |
||||
|
<img class="icon icon1" src="{$yf_theme_path}/public/img/cicon.png"> |
||||
|
<img class="icon icon2" src="{$yf_theme_path}/public/img/cicon2.png"> |
||||
|
</div> |
||||
|
<p class="weui-tabbar__label">联系我们</p> |
||||
|
</div> |
||||
|
<div class="weui-tabbar__item {if condition="ACTION_NAME eq 'feedback'"}weui-bar__item_on{/if}" onclick="window.location.href='{:url('common/feedback')}'"> |
||||
|
<div class="weui-tabbar__icon"> |
||||
|
<img class="icon icon1" src="{$yf_theme_path}/public/img/ficon.png"> |
||||
|
<img class="icon icon2" src="{$yf_theme_path}/public/img/ficon2.png"> |
||||
|
</div> |
||||
|
<p class="weui-tabbar__label">咨询留言</p> |
||||
|
</div> |
||||
|
<div class="weui-tabbar__item {if condition="CONTROLLER_NAME eq 'Center'"}weui-bar__item_on{/if}" onclick="window.location.href='{:url('center/index')}'"> |
||||
|
<div class="weui-tabbar__icon"> |
||||
|
<img class="icon icon1" src="{$yf_theme_path}/public/img/uicon.png"> |
||||
|
<img class="icon icon2" src="{$yf_theme_path}/public/img/uicon2.png"> |
||||
|
</div> |
||||
|
<p class="weui-tabbar__label">个人中心</p> |
||||
|
</div> |
||||
|
</div> |
||||
|
<script type="text/javascript"> |
||||
|
$(function(){ |
||||
|
$('.weui-tabbar__item').on('click', function () { |
||||
|
$(this).addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on'); |
||||
|
}); |
||||
|
}); |
||||
|
</script> |
||||