update
@@ -0,0 +1,42 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/xml; charset=utf-8" />
|
||||
<title>My97DatePicker</title>
|
||||
<script type="text/javascript" src="config.js"></script>
|
||||
<script>
|
||||
if(parent==window)
|
||||
location.href = 'http://www.my97.net/';
|
||||
|
||||
var $d, $dp, $pdp = parent.$dp, $dt, $tdt, $sdt, $lastInput, $IE=$pdp.ie, $FF = $pdp.ff,$OPERA=$pdp.opera, $ny, $cMark = false;
|
||||
|
||||
if ($pdp.eCont) {
|
||||
$dp = {};
|
||||
for (var p in $pdp) {
|
||||
$dp[p] = $pdp[p];
|
||||
}
|
||||
}
|
||||
else
|
||||
$dp = $pdp;
|
||||
$dp.realLang = getCurr(langList, $dp.lang);
|
||||
document.write("<script src='lang/" + $dp.realLang.name + ".js' charset='" + $dp.realLang.charset + "'><\/script>");
|
||||
for (var i = 0; i < skinList.length; i++) {
|
||||
document.write('<link rel="stylesheet" type="text/css" href="skin/' + skinList[i].name + '/datepicker.css" title="' + skinList[i].name + '" charset="' + skinList[i].charset + '" disabled="true"/>');
|
||||
}
|
||||
function getCurr(arr, name){
|
||||
var isFound = false;
|
||||
var item = arr[0];
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (arr[i].name == name) {
|
||||
item = arr[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
return item;
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript" src="calendar.js"></script>
|
||||
</head>
|
||||
<body leftmargin="0" topmargin="0" onload="$c.autoSize()">
|
||||
</body>
|
||||
</html>
|
||||
<script>new My97DP();</script>
|
||||
@@ -0,0 +1,12 @@
|
||||
var langList =
|
||||
[
|
||||
{name:'en', charset:'UTF-8'},
|
||||
{name:'zh-cn', charset:'UTF-8'},
|
||||
{name:'zh-tw', charset:'UTF-8'}
|
||||
];
|
||||
|
||||
var skinList =
|
||||
[
|
||||
{name:'default', charset:'UTF-8'},
|
||||
{name:'whyGreen', charset:'UTF-8'}
|
||||
];
|
||||
@@ -0,0 +1,12 @@
|
||||
var $lang={
|
||||
errAlertMsg: "Invalid date or the date out of range,redo or not?",
|
||||
aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
||||
aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
||||
clearStr: "Clear",
|
||||
todayStr: "Today",
|
||||
okStr: "OK",
|
||||
updateStr: "Update",
|
||||
timeStr: "Time",
|
||||
quickStr: "Quick Selection",
|
||||
err_1: 'MinDate Cannot be bigger than MaxDate!'
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
var $lang={
|
||||
errAlertMsg: "不合法的日期格式或者日期超出限定范围,需要撤销吗?",
|
||||
aWeekStr: ["周","日","一","二","三","四","五","六"],
|
||||
aMonStr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一","十二"],
|
||||
clearStr: "清空",
|
||||
todayStr: "今天",
|
||||
okStr: "确定",
|
||||
updateStr: "更新",
|
||||
timeStr: "时间",
|
||||
quickStr: "快速选择",
|
||||
err_1: '最小日期不能大于最大日期!'
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
var $lang={
|
||||
errAlertMsg: "不合法的日期格式或者日期超出限定范围,需要撤销吗?",
|
||||
aWeekStr: ["周","日","一","二","三","四","五","六"],
|
||||
aMonStr: ["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一","十二"],
|
||||
clearStr: "清空",
|
||||
todayStr: "今天",
|
||||
okStr: "确定",
|
||||
updateStr: "更新",
|
||||
timeStr: "时间",
|
||||
quickStr: "快速选择",
|
||||
err_1: '最小日期不能大于最大日期!'
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
.Wdate{
|
||||
border:#999 1px solid;
|
||||
height:20px;
|
||||
background:#fff url(datePicker.gif) no-repeat right;
|
||||
}
|
||||
|
||||
.WdateFmtErr{
|
||||
font-weight:bold;
|
||||
color:red;
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,237 @@
|
||||
/*
|
||||
* My97 DatePicker 4.1
|
||||
* ??????:default
|
||||
* ???????:My97
|
||||
*/
|
||||
|
||||
/* ??????????? DIV */
|
||||
.WdateDiv{
|
||||
width:180px;
|
||||
background-color:#FFFFFF;
|
||||
border:#bbb 1px solid;
|
||||
padding:2px;
|
||||
}
|
||||
.WdateDiv *{font-size:9pt;}
|
||||
|
||||
/****************************
|
||||
* ???????
|
||||
***************************/
|
||||
.WdateDiv .NavImg {
|
||||
cursor:pointer;
|
||||
width:16px;
|
||||
height:16px;
|
||||
margin-top:1px;
|
||||
}
|
||||
.WdateDiv .NavImgll { background:url(img.gif) no-repeat; }
|
||||
.WdateDiv .NavImgl { background:url(img.gif) no-repeat -16px 0px; }
|
||||
.WdateDiv .NavImgr { background:url(img.gif) no-repeat -32px 0px; }
|
||||
.WdateDiv .NavImgrr { background:url(img.gif) no-repeat -48px 0px; }
|
||||
|
||||
/****************************
|
||||
* ????·????
|
||||
***************************/
|
||||
/* ????·?8 DIV */
|
||||
.WdateDiv #dpTitle{
|
||||
height:24px;
|
||||
margin-bottom:2px;
|
||||
padding:1px;
|
||||
}
|
||||
/* ????·?????? INPUT */
|
||||
.WdateDiv .yminput{
|
||||
margin-top:2px;
|
||||
text-align:center;
|
||||
border:0px;
|
||||
height:16px;
|
||||
width:50px;
|
||||
cursor:pointer;
|
||||
}
|
||||
/* ????·???????y????????? INPUT */
|
||||
.WdateDiv .yminputfocus{
|
||||
margin-top:2px;
|
||||
text-align:center;
|
||||
font-weight:bold;
|
||||
color:blue;
|
||||
border:#ccc 1px solid;
|
||||
height:16px;
|
||||
width:50px;
|
||||
}
|
||||
/* ??????? DIV */
|
||||
.WdateDiv .menuSel{
|
||||
position:absolute;
|
||||
background-color:#FFFFFF;
|
||||
border:#ccc 1px solid;
|
||||
display:none;
|
||||
}
|
||||
/* ???????? TD */
|
||||
.WdateDiv .menu{
|
||||
cursor:pointer;
|
||||
background-color:#fff;
|
||||
}
|
||||
/* ?????mouseover??? TD */
|
||||
.WdateDiv .menuOn{
|
||||
cursor:pointer;
|
||||
background-color:#BEEBEE;
|
||||
}
|
||||
/* ?????Ч?????? TD */
|
||||
.WdateDiv .invalidMenu{
|
||||
color:#aaa;
|
||||
}
|
||||
/* ?????????? DIV */
|
||||
.WdateDiv .YMenu{
|
||||
margin-top:16px;
|
||||
|
||||
}
|
||||
/* ?????????? DIV */
|
||||
.WdateDiv .MMenu{
|
||||
margin-top:16px;
|
||||
*width:62px;
|
||||
}
|
||||
/* ??????λ?? DIV */
|
||||
.WdateDiv .hhMenu{
|
||||
margin-top:-90px;
|
||||
margin-left:26px;
|
||||
}
|
||||
/* ???????λ?? DIV */
|
||||
.WdateDiv .mmMenu{
|
||||
margin-top:-46px;
|
||||
margin-left:26px;
|
||||
}
|
||||
/* ???????λ?? DIV */
|
||||
.WdateDiv .ssMenu{
|
||||
margin-top:-24px;
|
||||
margin-left:26px;
|
||||
}
|
||||
|
||||
/****************************
|
||||
* ?????
|
||||
***************************/
|
||||
.WdateDiv .Wweek {
|
||||
text-align:center;
|
||||
background:#DAF3F5;
|
||||
border-right:#BDEBEE 1px solid;
|
||||
}
|
||||
/****************************
|
||||
* ????,???????
|
||||
***************************/
|
||||
/* ????8 TR */
|
||||
.WdateDiv .MTitle{
|
||||
background-color:#BDEBEE;
|
||||
}
|
||||
/* ????8??? TABLE */
|
||||
.WdateDiv .WdayTable{
|
||||
line-height:20px;
|
||||
border:#c5d9e8 1px solid;
|
||||
}
|
||||
/* ????????? TD */
|
||||
.WdateDiv .Wday{
|
||||
cursor:pointer;
|
||||
}
|
||||
/* ??????mouseover??? TD */
|
||||
.WdateDiv .WdayOn{
|
||||
cursor:pointer;
|
||||
background-color:#C0EBEF;
|
||||
}
|
||||
/* ???????????? TD */
|
||||
.WdateDiv .Wwday{
|
||||
cursor:pointer;
|
||||
color:#FF2F2F;
|
||||
}
|
||||
/* ?????????mouseover??? TD */
|
||||
.WdateDiv .WwdayOn{
|
||||
cursor:pointer;
|
||||
color:#000;
|
||||
background-color:#C0EBEF;
|
||||
}
|
||||
.WdateDiv .Wtoday{
|
||||
cursor:pointer;
|
||||
background-color:#FFCCCC;
|
||||
}
|
||||
.WdateDiv .Wselday{
|
||||
background-color:#00FF00;
|
||||
}
|
||||
/* ?????·?????? */
|
||||
.WdateDiv .WotherDay{
|
||||
cursor:pointer;
|
||||
color:#6A6AFF;
|
||||
}
|
||||
/* ?????·??????mouseover??? */
|
||||
.WdateDiv .WotherDayOn{
|
||||
cursor:pointer;
|
||||
background-color:#C0EBEF;
|
||||
}
|
||||
/* ??Ч????????,?????????Χ?????????????,???????????? */
|
||||
.WdateDiv .WinvalidDay{
|
||||
color:#aaa;
|
||||
}
|
||||
|
||||
/****************************
|
||||
* ??????
|
||||
***************************/
|
||||
/* ???8 DIV */
|
||||
.WdateDiv #dpTime{
|
||||
float:left;
|
||||
margin-top:3px;
|
||||
margin-right:30px;
|
||||
}
|
||||
/* ??????? SPAN */
|
||||
.WdateDiv #dpTime #dpTimeStr{
|
||||
margin-left:1px;
|
||||
}
|
||||
/* ???????? INPUT */
|
||||
.WdateDiv #dpTime input{
|
||||
height:16px;
|
||||
width:18px;
|
||||
text-align:center;
|
||||
border:#ccc 1px solid;
|
||||
}
|
||||
/* ??? ? INPUT */
|
||||
.WdateDiv #dpTime .tB{
|
||||
border-right:0px;
|
||||
}
|
||||
/* ??? ?????? ':' INPUT */
|
||||
.WdateDiv #dpTime .tE{
|
||||
border-left:0;
|
||||
border-right:0;
|
||||
}
|
||||
/* ??? ?? INPUT */
|
||||
.WdateDiv #dpTime .tm{
|
||||
width:7px;
|
||||
border-left:0;
|
||||
border-right:0;
|
||||
}
|
||||
/* ????????????? BUTTON */
|
||||
.WdateDiv #dpTime #dpTimeUp{
|
||||
height:10px;
|
||||
width:13px;
|
||||
border:0px;
|
||||
background:url(img.gif) no-repeat -32px -16px;
|
||||
}
|
||||
/* ??????????°?? BUTTON */
|
||||
.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;
|
||||
border:#ccc 1px solid;
|
||||
padding:2px;
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 307 B |
@@ -0,0 +1,243 @@
|
||||
/*
|
||||
* My97 DatePicker 4.1
|
||||
* ?紃?:whyGreen
|
||||
* ?纱畟:why
|
||||
*/
|
||||
|
||||
/* ?????? DIV */
|
||||
.WdateDiv{
|
||||
width:180px;
|
||||
background-color:#fff;
|
||||
border:#C5E1E4 1px solid;
|
||||
padding:2px;
|
||||
}
|
||||
.WdateDiv *{font-size:9pt;}
|
||||
|
||||
/****************************
|
||||
* 强??
|
||||
***************************/
|
||||
.WdateDiv .NavImg {
|
||||
cursor:pointer;
|
||||
width:16px;
|
||||
height:16px;
|
||||
margin-top:1px;
|
||||
}
|
||||
.WdateDiv .NavImgll { background:url(img.gif) no-repeat; }
|
||||
.WdateDiv .NavImgl { background:url(img.gif) no-repeat -16px 0px; }
|
||||
.WdateDiv .NavImgr { background:url(img.gif) no-repeat -32px 0px; }
|
||||
.WdateDiv .NavImgrr { background:url(img.gif) no-repeat -48px 0px; }
|
||||
/****************************
|
||||
* ī睔·??
|
||||
***************************/
|
||||
/* ī睔·?蠄IV */
|
||||
.WdateDiv #dpTitle{
|
||||
height:24px;
|
||||
padding:1px;
|
||||
border:#c5d9e8 1px solid;
|
||||
background:url(bg.jpg);
|
||||
margin-bottom:2px;
|
||||
}
|
||||
/* ī睔·???INPUT */
|
||||
.WdateDiv .yminput{
|
||||
margin-top:2px;
|
||||
text-align:center;
|
||||
border:0px;
|
||||
height:16px;
|
||||
width:50px;
|
||||
color:#034c50;
|
||||
background-color:transparent;
|
||||
cursor:pointer;
|
||||
}
|
||||
/* ī睔·??????儑铦 INPUT */
|
||||
.WdateDiv .yminputfocus{
|
||||
margin-top:2px;
|
||||
text-align:center;
|
||||
border:#939393 1px solid;
|
||||
font-weight:bold;
|
||||
color:#034c50;
|
||||
height:16px;
|
||||
width:50px;
|
||||
}
|
||||
/* ?呡??DIV */
|
||||
.WdateDiv .menuSel{
|
||||
position:absolute;
|
||||
background-color:#FFFFFF;
|
||||
border:#A3C6C8 1px solid;
|
||||
display:none;
|
||||
}
|
||||
/* ?嵄?? TD */
|
||||
.WdateDiv .menu{
|
||||
cursor:pointer;
|
||||
background-color:#fff;
|
||||
color:#11777C;
|
||||
}
|
||||
/* ?嵄mouseover?? TD */
|
||||
.WdateDiv .menuOn{
|
||||
cursor:pointer;
|
||||
background-color:#BEEBEE;
|
||||
}
|
||||
/* ?厞Ч?儑铦 TD */
|
||||
.WdateDiv .invalidMenu{
|
||||
color:#aaa;
|
||||
}
|
||||
/* ī????? DIV */
|
||||
.WdateDiv .YMenu{
|
||||
margin-top:16px;
|
||||
}
|
||||
/* ?????? DIV */
|
||||
.WdateDiv .MMenu{
|
||||
margin-top:16px;
|
||||
*width:62px;
|
||||
}
|
||||
/* ?????? DIV */
|
||||
.WdateDiv .hhMenu{
|
||||
margin-top:-90px;
|
||||
margin-left:26px;
|
||||
}
|
||||
/* 疑???? DIV */
|
||||
.WdateDiv .mmMenu{
|
||||
margin-top:-46px;
|
||||
margin-left:26px;
|
||||
}
|
||||
/* e????? DIV */
|
||||
.WdateDiv .ssMenu{
|
||||
margin-top:-24px;
|
||||
margin-left:26px;
|
||||
}
|
||||
|
||||
/****************************
|
||||
* ??阍
|
||||
***************************/
|
||||
.WdateDiv .Wweek {
|
||||
text-align:center;
|
||||
background:#DAF3F5;
|
||||
border-right:#BDEBEE 1px solid;
|
||||
}
|
||||
/****************************
|
||||
* ??,???阍
|
||||
***************************/
|
||||
/* ??8 TR */
|
||||
.WdateDiv .MTitle{
|
||||
color:#13777e;
|
||||
background-color:#bdebee;
|
||||
}
|
||||
/* ??8??ABLE */
|
||||
.WdateDiv .WdayTable{
|
||||
line-height:20px;
|
||||
color:#13777e;
|
||||
background-color:#edfbfb;
|
||||
border:#BEE9F0 1px solid;
|
||||
}
|
||||
/* ??豵?铦 TD */
|
||||
.WdateDiv .Wday{
|
||||
cursor:pointer;
|
||||
}
|
||||
/* ??豵?ouseover?? TD */
|
||||
.WdateDiv .WdayOn{
|
||||
cursor:pointer;
|
||||
background-color:#74d2d9 ;
|
||||
}
|
||||
/* ????豵?铦 TD */
|
||||
.WdateDiv .Wwday{
|
||||
cursor:pointer;
|
||||
color:#ab1e1e;
|
||||
}
|
||||
/* ????豵?ouseover?? TD */
|
||||
.WdateDiv .WwdayOn{
|
||||
cursor:pointer;
|
||||
background-color:#74d2d9;
|
||||
}
|
||||
.WdateDiv .Wtoday{
|
||||
cursor:pointer;
|
||||
color:blue;
|
||||
}
|
||||
.WdateDiv .Wselday{
|
||||
background-color:#A7E2E7;
|
||||
}
|
||||
/* ???睵???*/
|
||||
.WdateDiv .WotherDay{
|
||||
cursor:pointer;
|
||||
color:#0099CC;
|
||||
}
|
||||
/* ???睵???ouseover?? */
|
||||
.WdateDiv .WotherDayOn{
|
||||
cursor:pointer;
|
||||
background-color:#C0EBEF;
|
||||
}
|
||||
/* ΞЧ??儑铦,????控????豵?铦,???侩??*/
|
||||
.WdateDiv .WinvalidDay{
|
||||
color:#aaa;
|
||||
}
|
||||
/****************************
|
||||
* ???
|
||||
***************************/
|
||||
/* ??蠄IV */
|
||||
.WdateDiv #dpTime{
|
||||
|
||||
}
|
||||
/* ????SPAN */
|
||||
.WdateDiv #dpTime #dpTimeStr{
|
||||
margin-left:1px;
|
||||
color:#497F7F;
|
||||
}
|
||||
/* ????INPUT */
|
||||
.WdateDiv #dpTime input{
|
||||
height:16px;
|
||||
width:18px;
|
||||
text-align:center;
|
||||
color:#333;
|
||||
border:#61CAD0 1px solid;
|
||||
}
|
||||
/* ??? INPUT */
|
||||
.WdateDiv #dpTime .tB{
|
||||
border-right:0px;
|
||||
}
|
||||
/* ??疺?临绠':' INPUT */
|
||||
.WdateDiv #dpTime .tE{
|
||||
border-left:0;
|
||||
border-right:0;
|
||||
}
|
||||
/* ??e INPUT */
|
||||
.WdateDiv #dpTime .tm{
|
||||
width:7px;
|
||||
border-left:0;
|
||||
border-right:0;
|
||||
}
|
||||
/* ???????堂UTTON */
|
||||
.WdateDiv #dpTime #dpTimeUp{
|
||||
height:10px;
|
||||
width:13px;
|
||||
border:0px;
|
||||
background:url(img.gif) no-repeat -32px -16px;
|
||||
}
|
||||
/* ???????堂UTTON */
|
||||
.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;
|
||||
padding:2px;
|
||||
border:#38B1B9 1px solid;
|
||||
background-color:#CFEBEE;
|
||||
color:#08575B;
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,148 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Demo - Validform - 一行代码搞定整站的表单验证! ©瑞金佬的前端路</title>
|
||||
<link rel="stylesheet" href="demo/css/style.css" type="text/css"
|
||||
media="all" />
|
||||
<link href="demo/css/demo.css" type="text/css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="header">
|
||||
<div class="wraper">
|
||||
<h1>
|
||||
<a href="http://validform.rjboy.cn">Validform</a>
|
||||
</h1>
|
||||
<ul class="nav">
|
||||
<li><a href="http://validform.rjboy.cn/">关于Validform</a></li>
|
||||
<li><a href="demo.html" class="current">Demo</a></li>
|
||||
<li><a href="document.html">文档</a></li>
|
||||
<li><a href="help.html">帮助</a></li>
|
||||
<li><a href="http://validform.rjboy.cn/?p=1">网友讨论</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main">
|
||||
<div class="wraper">
|
||||
<h2 class="green">Validform常用功能示例</h2>
|
||||
|
||||
<h3>基本功能</h3>
|
||||
<ul class="lireset2 mb22">
|
||||
<li><a href="demo_normal_autotip.html">智能的提示信息</a> <sup
|
||||
class="green">5.3+</sup></li>
|
||||
<li><a href="demo_normal_regexp.html">给表单元素绑定验证类型和提示文字</a></li>
|
||||
<li><a href="demo_normal_btnSubmit.html">给表单下的任一对象绑定提交表单或重置方法</a>
|
||||
<sup class="green">5.0+</sup></li>
|
||||
<li><a href="demo_normal_tipmsg.html">修改默认的提示文字,如默认弹出框的标题,验证成功后的提示文字等</a>
|
||||
<sup class="green">5.0+</sup></li>
|
||||
<li><a href="demo_normal_recheck.html">检测重复密码是否与第一次输入的密码一致</a></li>
|
||||
<li><a href="demo_normal_showAllError.html">逐条验证与一次验证显示所有错误信息</a></li>
|
||||
<li><a href="demo_normal_ajaxPost.html">使用ajax的方式提交表单</a> <sup
|
||||
class="green">5.0+</sup></li>
|
||||
<li><a href="demo_normal_postonce.html">让表单只能提交一次,提交成功后再提交表单将不会有操作</a>
|
||||
<sup class="green">5.0+</sup></li>
|
||||
<li><a href="demo_normal_ignore.html">在表单元素有输入时才验证,没有输入时不验证</a></li>
|
||||
<li><a href="demo_normal_username.html">Validform实现用户名的实时验证</a></li>
|
||||
<li><a href="demo_normal_andeither.html">dataype实现规则累加或单选</a> <sup
|
||||
class="green">5.2+</sup></li>
|
||||
</ul>
|
||||
|
||||
<h3>进阶功能</h3>
|
||||
<ul class="lireset2 mb22">
|
||||
<li><a href="demo_normal_notable.html">Validform没有限定只能使用table布局,任何结构都是可以的</a>
|
||||
<sup class="green">5.0+</sup></li>
|
||||
<li><a href="demo_normal_datatype.html">传入自定义的datatype,可以满足你几乎所有的验证需求</a></li>
|
||||
<li><a href="demo_normal_datatype_errormsg.html">在自定义datatype中返回具体的错误信息</a>
|
||||
<sup class="green">5.0+</sup></li>
|
||||
<li><a href="demo_normal_callback.html">仅用Validform做验证,验证成功后调用自己的方法提交表单</a>
|
||||
<sup class="green">5.0+</sup></li>
|
||||
<li><a href="demo_normal_validformObject.html">使用Validform对象</a>
|
||||
<sup class="green">5.0+</sup></li>
|
||||
</ul>
|
||||
|
||||
<h3>常见的一些验证效果</h3>
|
||||
<ul class="lireset2 mb22">
|
||||
<li><a href="demo_normal_eitheror.html">二选一的验证,如电话号码与手机号码只需其中之一有输入</a>
|
||||
<sup class="green">5.0+</sup></li>
|
||||
<li><a href="demo_normal_datatype_idcard.html">通过自定义datatype对身份证号码进行严格验证</a>
|
||||
<sup class="green">5.0+</sup></li>
|
||||
<li><a href="demo_normal_datatype_maxmin.html">通过自定义datatype验证最多或至少选择n项</a>
|
||||
<sup class="green">5.0+</sup></li>
|
||||
<li><a href="demo_normal_ignoreHidden.html">分类选择,选择了其中一类就忽略其他类的验证</a>
|
||||
<sup class="green">5.0+</sup></li>
|
||||
</ul>
|
||||
|
||||
<h2 class="green">
|
||||
提示效果 <span class="gray">- 可以实现几乎任何你想要的提示效果</span>
|
||||
</h2>
|
||||
<ul class="lireset2 mb22">
|
||||
<li><span class="gray">提示效果一:</span><a
|
||||
href="demo_tiptype_pop.html">弹出框提示</a></li>
|
||||
<li><span class="gray">提示效果二:</span><a
|
||||
href="demo_tiptype_sidetip.html">右侧提示</a></li>
|
||||
<li><span class="gray">提示效果三:</span><a
|
||||
href="demo_tiptype_onfocus.html">Focus时右侧出现提示文字</a> <sup
|
||||
class="green">5.0+</sup></li>
|
||||
<li><span class="gray">提示效果四:</span><a
|
||||
href="demo_tiptype_sideNonePop.html">【自定义提示效果】右侧提示,ajax提交时不弹出提示层</a></li>
|
||||
<li><span class="gray">提示效果五:</span><a
|
||||
href="demo_tiptype_fixPosition.html">【自定义提示效果】固定位置显示提示信息</a></li>
|
||||
<li><span class="gray">提示效果六:</span><a
|
||||
href="demo_tiptype_tipCustom.html">【自定义提示效果】使用自定义弹出框</a></li>
|
||||
<li><span class="gray">提示效果七:</span><a
|
||||
href="demo_tiptype_onfocusFadeIn.html">【自定义提示效果】让提示信息滑入显示</a> <sup
|
||||
class="green">5.0+</sup></li>
|
||||
</ul>
|
||||
|
||||
<h2 class="green">外调插件</h2>
|
||||
|
||||
<h3>
|
||||
文件上传 - swfupload <span class="red">[需要服务器环境]</span> <a
|
||||
href="http://demo.swfupload.org/Documentation" target="_blank"
|
||||
class="blue ml10 fz12">去官网查看详细使用方法»</a>
|
||||
</h3>
|
||||
<ul class="lireset2 mb22">
|
||||
<li><a href="demo_usePlugin_uploadAtOnce.html">选择文件后立即上传</a></li>
|
||||
<li><a href="demo_usePlugin_uploadWhenValid.html">表单验证通过后上传文件</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>密码强度检测 - passwordStrength</h3>
|
||||
<ul class="lireset2 mb22">
|
||||
<li><a href="demo_usePlugin_strengthAlways.html">密码强度提示与验证提示同时显示</a></li>
|
||||
<li><a href="demo_usePlugin_strengthNeeded.html">在符合验证要求时才有密码强度提示</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>日期控件 - datePicker</h3>
|
||||
<ul class="lireset2 mb22">
|
||||
<li><a href="demo_usePlugin_datePickerDefault.html">默认效果</a></li>
|
||||
<li><a href="demo_usePlugin_datePickerCallback.html">选择日期后执行回调函数</a></li>
|
||||
</ul>
|
||||
|
||||
<h3>表单美化 - jqtransform</h3>
|
||||
<ul class="lireset2 mb22">
|
||||
<li><a href="demo_usePlugin_jqtransformDefault.html">默认对所有元素美化</a>
|
||||
<sup class="green">5.0+</sup></li>
|
||||
<li><a href="demo_usePlugin_jqtransformAssign.html">美化指定的表单元素</a>
|
||||
<sup class="green">5.0+</sup></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<div class="wraper">
|
||||
<p class="fl">
|
||||
Copyright © <a href="http://www.eloocor.com" target="_blank">易罗客</a>
|
||||
</p>
|
||||
<p class="fr">
|
||||
<a href="http://www.rjboy.cn" target="_blank">瑞金佬的前端路</a><b> | </b><a
|
||||
href="http://validform.rjboy.cn">Validform</a><b> | </b><a
|
||||
href="http://www.rjboy.cn/?p=789" target="_blank">hScrollpane</a><b>
|
||||
| </b><a href="http://www.rjboy.cn/?p=708" target="_blank">Xslider</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
header("Content-Type:text/html; charset=utf-8");
|
||||
sleep(3);//效果演示,该句可移除;
|
||||
|
||||
//表单数据是以POST方式提交过来;
|
||||
|
||||
//$name=$_POST["name"];
|
||||
|
||||
//注意json数据必须严格按如下格式输出:{"info":"demo info","status":"y"};
|
||||
//info: 输出提示信息;
|
||||
//status: 返回提交数据的状态,是否提交成功。“y”表示提交成功,“n”表示提交失败,在callback函数里可以根据该值执行相应的回调操作;
|
||||
|
||||
echo '{
|
||||
"info":"数据提交成功!",
|
||||
"status":"y"
|
||||
}';
|
||||
|
||||
//echo '{"info":"'.$name.'","status":"y"}';
|
||||
?>
|
||||
@@ -0,0 +1,230 @@
|
||||
.fz12 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
input {
|
||||
padding: 8px 20px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.main {
|
||||
padding-bottom: 60px;
|
||||
padding-top: 36px;
|
||||
}
|
||||
|
||||
.main h1,.main h2,.main h3 {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.main h1 {
|
||||
text-align: center;
|
||||
color: #212222;
|
||||
font-family: "microsoft yahei";
|
||||
font-size: 36px;
|
||||
font-weight: normal;
|
||||
line-height: 2em;
|
||||
margin-bottom: 36px;
|
||||
}
|
||||
|
||||
.main h2 {
|
||||
background-color: #eee;
|
||||
line-height: 2 !important;
|
||||
}
|
||||
|
||||
.main h3 {
|
||||
font-size: 20px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.lireset2 {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.registerform {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.registerform .need {
|
||||
width: 10px;
|
||||
color: #b20202;
|
||||
}
|
||||
|
||||
.registerform td {
|
||||
padding: 5px 0;
|
||||
vertical-align: top;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.registerform .inputxt,.registerform textarea {
|
||||
border: 1px solid #a5aeb6;
|
||||
width: 196px;
|
||||
padding: 4px 2px;
|
||||
}
|
||||
|
||||
.registerform textarea {
|
||||
height: 75px;
|
||||
}
|
||||
|
||||
.registerform label {
|
||||
margin: 0 15px 0 4px;
|
||||
}
|
||||
|
||||
.registerform .tip {
|
||||
line-height: 20px;
|
||||
color: #5f6a72;
|
||||
}
|
||||
|
||||
.registerform select {
|
||||
width: 202px;
|
||||
}
|
||||
|
||||
.registerformalter select {
|
||||
width: 124px;
|
||||
}
|
||||
|
||||
.swfupload {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.passwordStrength {
|
||||
|
||||
}
|
||||
|
||||
.passwordStrength b {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.passwordStrength b,.passwordStrength span {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
line-height: 16px;
|
||||
line-height: 18px\9;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.passwordStrength span {
|
||||
width: 45px;
|
||||
text-align: center;
|
||||
background-color: #d0d0d0;
|
||||
border-right: 1px solid #fff;
|
||||
}
|
||||
|
||||
.passwordStrength .last {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.passwordStrength .bgStrength {
|
||||
color: #fff;
|
||||
background-color: #71b83d;
|
||||
}
|
||||
|
||||
#demo1 .passwordStrength {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.tipmsg {
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
textarea {
|
||||
overflow: auto;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.document {
|
||||
min-height: 800px;
|
||||
}
|
||||
|
||||
.document .sidenav {
|
||||
width: 170px;
|
||||
background-color: #eee;
|
||||
padding: 10px 10px 20px;
|
||||
}
|
||||
|
||||
.document .sidenav h3 {
|
||||
font-size: 14px;
|
||||
padding: 5px 10px;
|
||||
background-color: #e1e1e1;
|
||||
}
|
||||
|
||||
.document .sidenav a {
|
||||
color: #1870a9;
|
||||
}
|
||||
|
||||
.document .content {
|
||||
width: 750px;
|
||||
}
|
||||
|
||||
.document .content dt {
|
||||
background-color: #eee;
|
||||
line-height: 2;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.document .content dt a {
|
||||
color: #79a605;
|
||||
padding: 5px 0;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.document .content dt a:hover,.document .content h3 a:hover {
|
||||
text-decoration: none;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.document .content dd {
|
||||
padding: 15px 0;
|
||||
}
|
||||
|
||||
.document .content h3 {
|
||||
color: #333;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.document .content p {
|
||||
padding: 0 0 16px 10px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.document .content .intro {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.document .content .intro p {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.document .content .intro pre {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.document .content .wp_syntax {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.document .sidenav .lireset2 {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.document .sidenav li ul {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.toTop {
|
||||
display: block;
|
||||
width: 48px;
|
||||
height: 49px;
|
||||
overflow: hidden;
|
||||
text-indent: -20000px;
|
||||
position: fixed;
|
||||
right: 15px;
|
||||
bottom: 20px;
|
||||
display: none;
|
||||
background: url(../images/totop.png) no-repeat;
|
||||
_position: absolute;
|
||||
_top: expression(documentElement.scrollTop +
|
||||
documentElement.clientHeight-this.offsetHeight-20);
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
|
||||
.Validform_checktip {
|
||||
margin-left: 8px;
|
||||
line-height: 20px;
|
||||
height: 20px;
|
||||
overflow: hidden;
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.Validform_right {
|
||||
color: #71b83d;
|
||||
padding-left: 20px;
|
||||
background: url(../images/right.png) no-repeat left center;
|
||||
}
|
||||
|
||||
.Validform_wrong {
|
||||
color: red;
|
||||
padding-left: 20px;
|
||||
white-space: nowrap;
|
||||
background: url(../images/error.png) no-repeat left center;
|
||||
}
|
||||
|
||||
.Validform_loading {
|
||||
padding-left: 20px;
|
||||
background: url(../images/onLoad.gif) no-repeat left center;
|
||||
}
|
||||
|
||||
.Validform_error {
|
||||
background-color: #ffe7e7;
|
||||
}
|
||||
|
||||
#Validform_msg {
|
||||
color: #7d8289;
|
||||
font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif;
|
||||
width: 280px;
|
||||
-webkit-box-shadow: 2px 2px 3px #aaa;
|
||||
-moz-box-shadow: 2px 2px 3px #aaa;
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
right: 50px;
|
||||
z-index: 99999;
|
||||
display: none;
|
||||
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135,
|
||||
Color='#999999');
|
||||
}
|
||||
|
||||
#Validform_msg .iframe {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: -1px;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
#Validform_msg .Validform_title {
|
||||
line-height: 25px;
|
||||
height: 25px;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
padding: 0 8px;
|
||||
color: #fff;
|
||||
position: relative;
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
#Validform_msg a.Validform_close:link,#Validform_msg a.Validform_close:visited
|
||||
{
|
||||
line-height: 22px;
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
top: 0px;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#Validform_msg a.Validform_close:hover {
|
||||
color: #cc0;
|
||||
}
|
||||
|
||||
#Validform_msg .Validform_info {
|
||||
padding: 8px;
|
||||
border: 1px solid #000;
|
||||
border-top: none;
|
||||
text-align: left;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
.wp_syntax {
|
||||
color: #100;
|
||||
background-color: #f9f9f9;
|
||||
border: 1px solid #e1e1e1;
|
||||
margin: 0 0 8px 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* IE FIX */
|
||||
.wp_syntax {
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
padding-bottom: expression(this.scrollWidth > this.offsetWidth ? 15 : 0);
|
||||
}
|
||||
|
||||
.wp_syntax table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.wp_syntax div,.wp_syntax td {
|
||||
vertical-align: top;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
.wp_syntax .line_numbers {
|
||||
text-align: right;
|
||||
background-color: #def;
|
||||
color: gray;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/* potential overrides for other styles */
|
||||
.wp_syntax pre {
|
||||
margin: 0;
|
||||
width: auto;
|
||||
float: none;
|
||||
clear: none;
|
||||
overflow: visible;
|
||||
font-size: 12px;
|
||||
line-height: 1.333;
|
||||
white-space: pre;
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 47 B |
|
After Width: | Height: | Size: 734 B |
|
After Width: | Height: | Size: 847 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 781 B |
|
After Width: | Height: | Size: 725 B |
|
After Width: | Height: | Size: 3.4 KiB |
@@ -0,0 +1,159 @@
|
||||
@charset "utf-8";
|
||||
|
||||
.clear {
|
||||
clear: both
|
||||
}
|
||||
|
||||
.it,.so,.is {
|
||||
border: 1px solid #ccc;
|
||||
vertical-align: middle
|
||||
}
|
||||
|
||||
table.jCalendar {
|
||||
border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
font-family: Tahoma
|
||||
}
|
||||
|
||||
table.jCalendar th {
|
||||
background: #333;
|
||||
color: #fff;
|
||||
font-weight: normal;
|
||||
padding: 3px 5px;
|
||||
vertical-align: middle
|
||||
}
|
||||
|
||||
table.jCalendar td {
|
||||
background: #aadbf9;
|
||||
color: #000;
|
||||
font-size: 11px;
|
||||
border: 1px solid #fff;
|
||||
padding: 3px 5px;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
table.jCalendar td.other-month {
|
||||
background: #d0e6f7;
|
||||
color: #555
|
||||
}
|
||||
|
||||
table.jCalendar td.today {
|
||||
background: #f60;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
table.jCalendar td.selected {
|
||||
background: #f66;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
table.jCalendar td.selected.dp-hover {
|
||||
background: #fff;
|
||||
color: #f66
|
||||
}
|
||||
|
||||
table.jCalendar td.dp-hover,table.jCalendar tr.activeWeekHover td {
|
||||
background: #fff;
|
||||
color: #000
|
||||
}
|
||||
|
||||
table.jCalendar tr.selectedWeek td {
|
||||
background: #f66;
|
||||
color: #fff
|
||||
}
|
||||
|
||||
table.jCalendar td.disabled,table.jCalendar td.disabled.dp-hover {
|
||||
background: #ecf1f4;
|
||||
color: #888
|
||||
}
|
||||
|
||||
table.jCalendar td.unselectable,table.jCalendar td.unselectable:hover,table.jCalendar td.unselectable.dp-hover
|
||||
{
|
||||
background: #fff;
|
||||
color: #555
|
||||
}
|
||||
|
||||
div.dp-popup {
|
||||
position: relative;
|
||||
background: #d6e9f8;
|
||||
font-size: 12px;
|
||||
font-family: arial, sans-serif;
|
||||
padding: 2px;
|
||||
width: 160px;
|
||||
width: 162px\9;
|
||||
line-height: 1.2em;
|
||||
font-family: Tahoma
|
||||
}
|
||||
|
||||
div#dp-popup {
|
||||
position: absolute;
|
||||
z-index: 199
|
||||
}
|
||||
|
||||
div.dp-popup h2 {
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
margin: 2px 0;
|
||||
padding: 0
|
||||
}
|
||||
|
||||
a#dp-close {
|
||||
font-size: 11px;
|
||||
padding: 4px 0;
|
||||
text-align: center;
|
||||
display: block
|
||||
}
|
||||
|
||||
a#dp-close:hover {
|
||||
text-decoration: underline
|
||||
}
|
||||
|
||||
div.dp-popup a {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
padding: 3px 4px 0
|
||||
}
|
||||
|
||||
div.dp-popup div.dp-nav-prev {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
left: 4px;
|
||||
width: 100px
|
||||
}
|
||||
|
||||
div.dp-popup div.dp-nav-prev a {
|
||||
float: left
|
||||
}
|
||||
|
||||
div.dp-popup div.dp-nav-prev a,div.dp-popup div.dp-nav-next a {
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
div.dp-popup div.dp-nav-prev a.disabled,div.dp-popup div.dp-nav-next a.disabled
|
||||
{
|
||||
cursor: default
|
||||
}
|
||||
|
||||
div.dp-popup div.dp-nav-next {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 4px;
|
||||
width: 100px
|
||||
}
|
||||
|
||||
div.dp-popup div.dp-nav-next a {
|
||||
float: right
|
||||
}
|
||||
|
||||
div.dp-popup a.disabled {
|
||||
cursor: default;
|
||||
color: #aaa
|
||||
}
|
||||
|
||||
div.dp-popup td {
|
||||
cursor: pointer
|
||||
}
|
||||
|
||||
div.dp-popup td.disabled {
|
||||
cursor: default
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
@charset "utf-8";
|
||||
/*基本样式,和日历无关*/
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.it,.so,.is {
|
||||
border: 1px solid #ccc;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Date Picker 日期拾取器 */
|
||||
table.jCalendar {
|
||||
border: 1px solid #fff;
|
||||
border-collapse: collapse;
|
||||
font-family: Tahoma;
|
||||
}
|
||||
|
||||
table.jCalendar th {
|
||||
background: #333;
|
||||
color: #fff;
|
||||
font-weight: normal;
|
||||
padding: 3px 5px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
table.jCalendar td {
|
||||
background: #AADBF9;
|
||||
color: #000;
|
||||
font-size: 11px;
|
||||
border: 1px solid #fff;
|
||||
padding: 3px 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
table.jCalendar td.other-month {
|
||||
background: #D0E6F7;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
table.jCalendar td.today {
|
||||
background: #FF6600;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
table.jCalendar td.selected {
|
||||
background: #f66;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
table.jCalendar td.selected.dp-hover {
|
||||
background: #fff;
|
||||
color: #f66;
|
||||
}
|
||||
|
||||
table.jCalendar td.dp-hover,table.jCalendar tr.activeWeekHover td {
|
||||
background: #fff;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
table.jCalendar tr.selectedWeek td {
|
||||
background: #f66;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
table.jCalendar td.disabled,table.jCalendar td.disabled.dp-hover {
|
||||
background: #ECF1F4;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
table.jCalendar td.unselectable,table.jCalendar td.unselectable:hover,table.jCalendar td.unselectable.dp-hover
|
||||
{
|
||||
background: #fff;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* For the popup */
|
||||
|
||||
/* NOTE - you will probably want to style a.dp-choose-date - see how I did it in demo.css */
|
||||
div.dp-popup {
|
||||
position: relative;
|
||||
background: #D6E9F8;
|
||||
font-size: 12px;
|
||||
font-family: arial, sans-serif;
|
||||
padding: 2px;
|
||||
width: 160px;
|
||||
width: 162px\9;
|
||||
line-height: 1.2em;
|
||||
font-family: Tahoma;
|
||||
}
|
||||
|
||||
div#dp-popup {
|
||||
position: absolute;
|
||||
z-index: 199;
|
||||
}
|
||||
|
||||
div.dp-popup h2 {
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
margin: 2px 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
a#dp-close {
|
||||
font-size: 11px;
|
||||
padding: 4px 0;
|
||||
text-align: center;
|
||||
display: block;
|
||||
}
|
||||
|
||||
a#dp-close:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
div.dp-popup a {
|
||||
color: #000;
|
||||
text-decoration: none;
|
||||
padding: 3px 4px 0;
|
||||
}
|
||||
|
||||
div.dp-popup div.dp-nav-prev {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
left: 4px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
div.dp-popup div.dp-nav-prev a {
|
||||
float: left;
|
||||
}
|
||||
/* Opera needs the rules to be this specific otherwise it doesn't change the cursor back to pointer after you have disabled and re-enabled a link */
|
||||
div.dp-popup div.dp-nav-prev a,div.dp-popup div.dp-nav-next a {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.dp-popup div.dp-nav-prev a.disabled,div.dp-popup div.dp-nav-next a.disabled
|
||||
{
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
div.dp-popup div.dp-nav-next {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 4px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
div.dp-popup div.dp-nav-next a {
|
||||
float: right;
|
||||
}
|
||||
|
||||
div.dp-popup a.disabled {
|
||||
cursor: default;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
div.dp-popup td {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.dp-popup td.disabled {
|
||||
cursor: default;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
|
||||
* Licensed under the MIT License (LICENSE.txt).
|
||||
*
|
||||
* Version 2.1.3-pre
|
||||
*/
|
||||
(function(a){a.fn.bgiframe=(a.browser.msie&&/msie 6\.0/i.test(navigator.userAgent)?function(d){d=a.extend({top:"auto",left:"auto",width:"auto",height:"auto",opacity:true,src:"javascript:false;"},d);var c='<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+d.src+'"style="display:block;position:absolute;z-index:-1;'+(d.opacity!==false?"filter:Alpha(Opacity='0');":"")+"top:"+(d.top=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+'px')":b(d.top))+";left:"+(d.left=="auto"?"expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+'px')":b(d.left))+";width:"+(d.width=="auto"?"expression(this.parentNode.offsetWidth+'px')":b(d.width))+";height:"+(d.height=="auto"?"expression(this.parentNode.offsetHeight+'px')":b(d.height))+';"/>';return this.each(function(){if(a(this).children("iframe.bgiframe").length===0){this.insertBefore(document.createElement(c),this.firstChild)}})}:function(){return this});a.fn.bgIframe=a.fn.bgiframe;function b(c){return c&&c.constructor===Number?c+"px":c}})(jQuery);
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 429 B |
|
After Width: | Height: | Size: 169 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 236 B |
|
After Width: | Height: | Size: 236 B |
|
After Width: | Height: | Size: 173 B |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 460 B |
|
After Width: | Height: | Size: 528 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 316 B |
|
After Width: | Height: | Size: 98 B |
|
After Width: | Height: | Size: 98 B |
|
After Width: | Height: | Size: 98 B |
|
After Width: | Height: | Size: 54 B |
|
After Width: | Height: | Size: 54 B |
|
After Width: | Height: | Size: 47 B |
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 55 B |
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 68 B |
|
After Width: | Height: | Size: 54 B |
|
After Width: | Height: | Size: 53 B |
|
After Width: | Height: | Size: 57 B |
|
After Width: | Height: | Size: 55 B |
|
After Width: | Height: | Size: 55 B |
|
After Width: | Height: | Size: 54 B |
|
After Width: | Height: | Size: 152 B |
|
After Width: | Height: | Size: 152 B |
|
After Width: | Height: | Size: 100 B |
|
After Width: | Height: | Size: 101 B |
|
After Width: | Height: | Size: 70 B |
|
After Width: | Height: | Size: 72 B |
|
After Width: | Height: | Size: 101 B |
|
After Width: | Height: | Size: 101 B |
|
After Width: | Height: | Size: 99 B |
|
After Width: | Height: | Size: 54 B |
|
After Width: | Height: | Size: 53 B |
|
After Width: | Height: | Size: 57 B |
|
After Width: | Height: | Size: 181 B |
|
After Width: | Height: | Size: 82 B |
|
After Width: | Height: | Size: 117 B |
|
After Width: | Height: | Size: 171 B |
|
After Width: | Height: | Size: 112 B |
|
After Width: | Height: | Size: 190 B |
|
After Width: | Height: | Size: 177 B |
|
After Width: | Height: | Size: 188 B |
@@ -0,0 +1,432 @@
|
||||
form.jqtransformdone label {
|
||||
margin: -6px 15px -6px 4px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
form.jqtransformdone div.rowElem {
|
||||
clear: both;
|
||||
padding: 4px 0px;
|
||||
}
|
||||
/* -------------
|
||||
* Buttons
|
||||
* ------------- */
|
||||
button.jqTransformButton {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
cursor: pointer;
|
||||
overflow: visible;
|
||||
font-family: Arial;
|
||||
}
|
||||
|
||||
*:first-child+html button.jqTransformButton[type] {
|
||||
width: 1;
|
||||
} /* IE7 */
|
||||
button.jqTransformButton span {
|
||||
background: transparent url(img/btn_right.gif) no-repeat right top;
|
||||
display: block;
|
||||
float: left;
|
||||
padding: 0 12px 0 0; /* sliding doors padding */
|
||||
margin: 0px;
|
||||
height: 33px;
|
||||
}
|
||||
|
||||
button.jqTransformButton span span {
|
||||
background: transparent url(img/btn_left.gif) no-repeat top left;
|
||||
color: #333;
|
||||
padding: 0 0 0 12px;
|
||||
font-weight: normal;
|
||||
font-size: 12px;
|
||||
line-height: 32px;
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
height: 33px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/*hover*/
|
||||
button.jqTransformButton_hover span span {
|
||||
background-position: left -33px;
|
||||
}
|
||||
|
||||
button.jqTransformButton_hover span {
|
||||
background-position: right -33px;
|
||||
}
|
||||
|
||||
/*clicked*/
|
||||
button.jqTransformButton_click span span {
|
||||
background-position: left -66px;
|
||||
}
|
||||
|
||||
button.jqTransformButton_click span {
|
||||
background-position: right -66px;
|
||||
}
|
||||
|
||||
/* IE 6 */
|
||||
* html button.jqTransformButton {
|
||||
height: 33px;
|
||||
}
|
||||
/* IE 7 */
|
||||
*+html button.jqTransformButton {
|
||||
height: 33px;
|
||||
}
|
||||
|
||||
/* -------------
|
||||
* Inputs
|
||||
* ------------- */
|
||||
.jqTransformInputWrapper {
|
||||
background: transparent url(img/input/input_text_left.gif) no-repeat
|
||||
left top;
|
||||
height: 31px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.jqTransformInputInner {
|
||||
background: transparent url(img/input/input_text_right.gif) no-repeat
|
||||
top right;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.jqTransformInputInner div {
|
||||
height: 31px;
|
||||
margin: 0px 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.jqTransformInputInner div input {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
vertical-align: middle;
|
||||
height: 18px;
|
||||
color: #404040;
|
||||
border: none !important;
|
||||
padding: 6px 0 7px !important;
|
||||
margin: 0px !important;
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
/* IE6 */
|
||||
* html .jqTransformInputInner div input {
|
||||
padding: 6px 0 0 0;
|
||||
margin: 0 0 0 -8px;
|
||||
height: 24px;
|
||||
}
|
||||
/* Ie7 */
|
||||
*+html .jqTransformInputInner div input {
|
||||
padding: 6px 0 0 0;
|
||||
margin-left: -10px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
/*hover*/
|
||||
.jqTransformInputWrapper_hover {
|
||||
background-position: left -31px;
|
||||
}
|
||||
|
||||
.jqTransformInputWrapper_hover div.jqTransformInputInner {
|
||||
background-position: right -31px;
|
||||
}
|
||||
|
||||
/*focus*/
|
||||
.jqTransformInputWrapper_focus {
|
||||
background-position: left -62px;
|
||||
}
|
||||
|
||||
.jqTransformInputWrapper_focus div.jqTransformInputInner {
|
||||
background-position: right -62px;
|
||||
}
|
||||
|
||||
.jqTransformSafari .jqTransformInputInner div {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
margin: 0px 8px;
|
||||
}
|
||||
|
||||
.jqTransformSafari .jqTransformInputInner div input {
|
||||
background-color: none;
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
left: -2px;
|
||||
height: 42px;
|
||||
padding-left: 4px;
|
||||
}
|
||||
|
||||
/* -------------
|
||||
* Textarea
|
||||
* ------------- */
|
||||
table.jqTransformTextarea td#jqTransformTextarea-mm textarea {
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea td {
|
||||
font-size: 1px;
|
||||
line-height: 1px;
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea {
|
||||
|
||||
}
|
||||
|
||||
table.jqTransformTextarea tr {
|
||||
/*border: 1px solid red;*/
|
||||
|
||||
}
|
||||
|
||||
table.jqTransformTextarea textarea {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
background: none;
|
||||
overflow: auto;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea td#jqTransformTextarea-tl {
|
||||
background: url(img/textarea/textarea_tl.gif) no-repeat top left;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea td#jqTransformTextarea-tm {
|
||||
background: url(img/textarea/textarea_tm.gif) repeat-x top left;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea td#jqTransformTextarea-tr {
|
||||
background: url(img/textarea/textarea_tr.gif) no-repeat top left;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea td#jqTransformTextarea-ml {
|
||||
background: url(img/textarea/textarea_ml.gif) repeat-y top left;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea td#jqTransformTextarea-mm {
|
||||
background: url(img/textarea/textarea-mm.gif) repeat;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea td#jqTransformTextarea-mr {
|
||||
background: url(img/textarea/textarea_mr.gif) repeat-y top left;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea td#jqTransformTextarea-bl {
|
||||
background: url(img/textarea/textarea_bl.gif) no-repeat top left;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea td#jqTransformTextarea-bm {
|
||||
background: url(img/textarea/textarea_bm.gif) repeat-x top left;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea td#jqTransformTextarea-br {
|
||||
background: url(img/textarea/textarea_br.gif) no-repeat top left;
|
||||
}
|
||||
|
||||
/*hover*/
|
||||
table.jqTransformTextarea-hover td#jqTransformTextarea-tl {
|
||||
background-position: 0px -5px;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea-hover td#jqTransformTextarea-tm {
|
||||
background-position: 0px -5px;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea-hover td#jqTransformTextarea-tr {
|
||||
background-position: 0px -5px;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea-hover td#jqTransformTextarea-ml {
|
||||
background-position: -5px 0px;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea-hover td#jqTransformTextarea-mm {
|
||||
background-image: url(img/textarea/textarea-mm-hover.gif);
|
||||
}
|
||||
|
||||
table.jqTransformTextarea-hover td#jqTransformTextarea-mr {
|
||||
background-position: -5px 0px;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea-hover td#jqTransformTextarea-bl {
|
||||
background-position: 0px -5px;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea-hover td#jqTransformTextarea-bm {
|
||||
background-position: 0px -5px;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea-hover td#jqTransformTextarea-br {
|
||||
background-position: 0px -5px;
|
||||
}
|
||||
|
||||
/*focus*/
|
||||
table.jqTransformTextarea-focus td#jqTransformTextarea-tl {
|
||||
background-position: 0px -10px;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea-focus td#jqTransformTextarea-tm {
|
||||
background-position: 0px -10px;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea-focus td#jqTransformTextarea-tr {
|
||||
background-position: 0px -10px;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea-focus td#jqTransformTextarea-ml {
|
||||
background-position: -10px 0px;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea-focus td#jqTransformTextarea-mm {
|
||||
background-image: url(img/textarea/textarea-mm-focus.gif);
|
||||
}
|
||||
|
||||
table.jqTransformTextarea-focus td#jqTransformTextarea-mr {
|
||||
background-position: -10px 0px;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea-focus td#jqTransformTextarea-bl {
|
||||
background-position: 0px -10px;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea-focus td#jqTransformTextarea-bm {
|
||||
background-position: 0px -10px;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea-focus td#jqTransformTextarea-br {
|
||||
background-position: 0px -10px;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea .jqTransformSafariTextarea div {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
border: 0px solid red;
|
||||
}
|
||||
|
||||
table.jqTransformTextarea .jqTransformSafariTextarea textarea {
|
||||
background: none;
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
left: -10px;
|
||||
padding: 10px 10px 10px 10px;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
/* -------------
|
||||
* Radios
|
||||
* ------------- */
|
||||
.jqTransformRadioWrapper {
|
||||
display: inline-block;
|
||||
margin: -6px 0;
|
||||
}
|
||||
|
||||
.jqTransformRadio {
|
||||
background: transparent url(img/radio.gif) no-repeat center top;
|
||||
vertical-align: middle;
|
||||
height: 19px;
|
||||
width: 18px;
|
||||
display: block; /*display: -moz-inline-block;*/
|
||||
}
|
||||
|
||||
/* -------------
|
||||
* Checkboxes
|
||||
* ------------- */
|
||||
span.jqTransformCheckboxWrapper {
|
||||
display: inline-block;
|
||||
margin: -6px 0;
|
||||
}
|
||||
|
||||
a.jqTransformCheckbox {
|
||||
background: transparent url(img/checkbox.gif) no-repeat center top;
|
||||
vertical-align: middle;
|
||||
height: 19px;
|
||||
width: 18px;
|
||||
display: block; /*display: -moz-inline-block;*/
|
||||
}
|
||||
|
||||
/* -------------
|
||||
* Checked - Used for both Radio and Checkbox
|
||||
* ------------- */
|
||||
a.jqTransformChecked {
|
||||
background-position: center bottom;
|
||||
}
|
||||
|
||||
/* -------------
|
||||
* Selects
|
||||
* ------------- */
|
||||
.jqTransformSelectWrapper {
|
||||
width: 45px;
|
||||
position: relative;
|
||||
height: 31px;
|
||||
background: url(img/select_left.gif) no-repeat top left;
|
||||
}
|
||||
|
||||
.jqTransformSelectWrapper div span {
|
||||
font-size: 12px;
|
||||
float: none;
|
||||
position: absolute;
|
||||
white-space: nowrap;
|
||||
height: 31px;
|
||||
line-height: 15px;
|
||||
padding: 8px 0 0 7px;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
/*border: 1px solid #CCCCCC;*/
|
||||
/* border-right: none;*/
|
||||
}
|
||||
|
||||
.jqTransformSelectWrapper a.jqTransformSelectOpen {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 0px;
|
||||
width: 31px;
|
||||
height: 31px;
|
||||
background: url(img/select_right.gif) no-repeat center center;
|
||||
}
|
||||
|
||||
.jqTransformSelectWrapper ul {
|
||||
position: absolute;
|
||||
width: 43px;
|
||||
top: 30px;
|
||||
left: 0px;
|
||||
list-style: none;
|
||||
background-color: #FFF;
|
||||
border: solid 1px #CCC;
|
||||
display: none;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
height: 150px;
|
||||
overflow: auto;
|
||||
overflow-y: auto;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.jqTransformSelectWrapper ul a {
|
||||
display: block;
|
||||
padding: 5px;
|
||||
text-decoration: none;
|
||||
color: #333;
|
||||
background-color: #FFF;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.jqTransformSelectWrapper ul a.selected {
|
||||
background: #EDEDED;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.jqTransformSelectWrapper ul a:hover,.jqTransformSelectWrapper ul a.selected:hover
|
||||
{
|
||||
background: #3582c4;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* -------------
|
||||
* Hidden - used to hide the original form elements
|
||||
* ------------- */
|
||||
.jqTransformHidden {
|
||||
display: none;
|
||||
}
|
||||
@@ -0,0 +1,345 @@
|
||||
/*
|
||||
*
|
||||
* jqTransform
|
||||
* by mathieu vilaplana mvilaplana@dfc-e.com
|
||||
* Designer ghyslain armand garmand@dfc-e.com
|
||||
*
|
||||
*
|
||||
* Version 1.0 25.09.08
|
||||
* Version 1.1 06.08.09
|
||||
* Add event click on Checkbox and Radio
|
||||
* Auto calculate the size of a select element
|
||||
* Can now, disabled the elements
|
||||
* Correct bug in ff if click on select (overflow=hidden)
|
||||
* No need any more preloading !!
|
||||
*
|
||||
******************************************** */
|
||||
|
||||
(function($){
|
||||
var defaultOptions = {preloadImg:true};
|
||||
var jqTransformImgPreloaded = false;
|
||||
|
||||
var jqTransformPreloadHoverFocusImg = function(strImgUrl) {
|
||||
//guillemets to remove for ie
|
||||
strImgUrl = strImgUrl.replace(/^url\((.*)\)/,'$1').replace(/^\"(.*)\"$/,'$1');
|
||||
var imgHover = new Image();
|
||||
imgHover.src = strImgUrl.replace(/\.([a-zA-Z]*)$/,'-hover.$1');
|
||||
var imgFocus = new Image();
|
||||
imgFocus.src = strImgUrl.replace(/\.([a-zA-Z]*)$/,'-focus.$1');
|
||||
};
|
||||
|
||||
|
||||
/***************************
|
||||
Labels
|
||||
***************************/
|
||||
var jqTransformGetLabel = function(objfield){
|
||||
var selfForm = $(objfield.get(0).form);
|
||||
var oLabel = objfield.next();
|
||||
if(!oLabel.is('label')) {
|
||||
oLabel = objfield.prev();
|
||||
if(oLabel.is('label')){
|
||||
var inputname = objfield.attr('id');
|
||||
if(inputname){
|
||||
oLabel = selfForm.find('label[for="'+inputname+'"]');
|
||||
}
|
||||
}
|
||||
}
|
||||
if(oLabel.is('label')){return oLabel.css('cursor','pointer');}
|
||||
return false;
|
||||
};
|
||||
|
||||
/* Hide all open selects */
|
||||
var jqTransformHideSelect = function(oTarget){
|
||||
var ulVisible = $('.jqTransformSelectWrapper ul:visible');
|
||||
ulVisible.each(function(){
|
||||
var oSelect = $(this).parents(".jqTransformSelectWrapper:first").find("select").get(0);
|
||||
//do not hide if click on the label object associated to the select
|
||||
if( !(oTarget && oSelect.oLabel && oSelect.oLabel.get(0) == oTarget.get(0)) ){$(this).hide();}
|
||||
});
|
||||
};
|
||||
/* Check for an external click */
|
||||
var jqTransformCheckExternalClick = function(event) {
|
||||
if ($(event.target).parents('.jqTransformSelectWrapper').length === 0) { jqTransformHideSelect($(event.target)); }
|
||||
};
|
||||
|
||||
/* Apply document listener */
|
||||
var jqTransformAddDocumentListener = function (){
|
||||
$(document).mousedown(jqTransformCheckExternalClick);
|
||||
};
|
||||
|
||||
/* Add a new handler for the reset action */
|
||||
var jqTransformReset = function(f){
|
||||
var sel;
|
||||
$('.jqTransformSelectWrapper select', f).each(function(){sel = (this.selectedIndex<0) ? 0 : this.selectedIndex; $('ul', $(this).parent()).each(function(){$('a:eq('+ sel +')', this).click();});});
|
||||
$('a.jqTransformCheckbox, a.jqTransformRadio', f).removeClass('jqTransformChecked');
|
||||
$('input:checkbox, input:radio', f).each(function(){if(this.checked){$('a', $(this).parent()).addClass('jqTransformChecked');}});
|
||||
};
|
||||
|
||||
/***************************
|
||||
Buttons
|
||||
***************************/
|
||||
$.fn.jqTransInputButton = function(){
|
||||
return this.each(function(){
|
||||
var newBtn = $('<button id="'+ this.id +'" name="'+ this.name +'" type="'+ this.type +'" class="'+ this.className +' jqTransformButton"><span><span>'+ $(this).attr('value') +'</span></span>')
|
||||
.hover(function(){newBtn.addClass('jqTransformButton_hover');},function(){newBtn.removeClass('jqTransformButton_hover')})
|
||||
.mousedown(function(){newBtn.addClass('jqTransformButton_click')})
|
||||
.mouseup(function(){newBtn.removeClass('jqTransformButton_click')})
|
||||
;
|
||||
$(this).replaceWith(newBtn);
|
||||
});
|
||||
};
|
||||
|
||||
/***************************
|
||||
Text Fields
|
||||
***************************/
|
||||
$.fn.jqTransInputText = function(){
|
||||
return this.each(function(){
|
||||
var $input = $(this);
|
||||
|
||||
if($input.hasClass('jqtranformdone') || !$input.is('input')) {return;}
|
||||
$input.addClass('jqtranformdone');
|
||||
|
||||
var oLabel = jqTransformGetLabel($(this));
|
||||
oLabel && oLabel.bind('click',function(){$input.focus();});
|
||||
|
||||
var inputSize=$input.width();
|
||||
if($input.attr('size')){
|
||||
inputSize = $input.attr('size')*10;
|
||||
$input.css('width',inputSize);
|
||||
}
|
||||
|
||||
$input.addClass("jqTransformInput").wrap('<div class="jqTransformInputWrapper"><div class="jqTransformInputInner"><div></div></div></div>');
|
||||
var $wrapper = $input.parent().parent().parent();
|
||||
$wrapper.css("width", inputSize+10);
|
||||
$input
|
||||
.focus(function(){$wrapper.addClass("jqTransformInputWrapper_focus");})
|
||||
.blur(function(){$wrapper.removeClass("jqTransformInputWrapper_focus");})
|
||||
.hover(function(){$wrapper.addClass("jqTransformInputWrapper_hover");},function(){$wrapper.removeClass("jqTransformInputWrapper_hover");})
|
||||
;
|
||||
|
||||
/* If this is safari we need to add an extra class */
|
||||
$.browser.safari && $wrapper.addClass('jqTransformSafari');
|
||||
$.browser.safari && $input.css('width',$wrapper.width()+16);
|
||||
this.wrapper = $wrapper;
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
/***************************
|
||||
Check Boxes
|
||||
***************************/
|
||||
$.fn.jqTransCheckBox = function(){
|
||||
return this.each(function(){
|
||||
if($(this).hasClass('jqTransformHidden')) {return;}
|
||||
|
||||
var $input = $(this);
|
||||
var inputSelf = this;
|
||||
|
||||
//set the click on the label
|
||||
var oLabel=jqTransformGetLabel($input);
|
||||
oLabel && oLabel.click(function(){aLink.trigger('click');});
|
||||
|
||||
var aLink = $('<a href="#" class="jqTransformCheckbox"></a>');
|
||||
//wrap and add the link
|
||||
$input.addClass('jqTransformHidden').wrap('<span class="jqTransformCheckboxWrapper"></span>').parent().prepend(aLink);
|
||||
//on change, change the class of the link
|
||||
$input.change(function(){
|
||||
this.checked && aLink.addClass('jqTransformChecked') || aLink.removeClass('jqTransformChecked');
|
||||
return true;
|
||||
});
|
||||
// Click Handler, trigger the click and change event on the input
|
||||
aLink.click(function(){
|
||||
//do nothing if the original input is disabled
|
||||
if($input.attr('disabled')){return false;}
|
||||
//trigger the envents on the input object
|
||||
$input.trigger('click').trigger("change");
|
||||
return false;
|
||||
});
|
||||
|
||||
// set the default state
|
||||
this.checked && aLink.addClass('jqTransformChecked');
|
||||
});
|
||||
};
|
||||
/***************************
|
||||
Radio Buttons
|
||||
***************************/
|
||||
$.fn.jqTransRadio = function(){
|
||||
return this.each(function(){
|
||||
if($(this).hasClass('jqTransformHidden')) {return;}
|
||||
|
||||
var $input = $(this);
|
||||
var inputSelf = this;
|
||||
|
||||
oLabel = jqTransformGetLabel($input);
|
||||
oLabel && oLabel.click(function(){aLink.trigger('click');});
|
||||
|
||||
var aLink = $('<a href="#" class="jqTransformRadio" rel="'+ this.name +'"></a>');
|
||||
$input.addClass('jqTransformHidden').wrap('<span class="jqTransformRadioWrapper"></span>').parent().prepend(aLink);
|
||||
|
||||
$input.change(function(){
|
||||
inputSelf.checked && aLink.addClass('jqTransformChecked') || aLink.removeClass('jqTransformChecked');
|
||||
return true;
|
||||
});
|
||||
// Click Handler
|
||||
aLink.click(function(){
|
||||
if($input.attr('disabled')){return false;}
|
||||
$input.trigger('click').trigger('change');
|
||||
|
||||
// uncheck all others of same name input radio elements
|
||||
$('input[name="'+$input.attr('name')+'"]',inputSelf.form).not($input).each(function(){
|
||||
$(this).attr('type')=='radio' && $(this).trigger('change');
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
// set the default state
|
||||
inputSelf.checked && aLink.addClass('jqTransformChecked');
|
||||
});
|
||||
};
|
||||
|
||||
/***************************
|
||||
TextArea
|
||||
***************************/
|
||||
$.fn.jqTransTextarea = function(){
|
||||
return this.each(function(){
|
||||
var textarea = $(this);
|
||||
|
||||
if(textarea.hasClass('jqtransformdone')) {return;}
|
||||
textarea.addClass('jqtransformdone');
|
||||
|
||||
oLabel = jqTransformGetLabel(textarea);
|
||||
oLabel && oLabel.click(function(){textarea.focus();});
|
||||
|
||||
var strTable = '<table cellspacing="0" cellpadding="0" border="0" class="jqTransformTextarea">';
|
||||
strTable +='<tr><td id="jqTransformTextarea-tl"></td><td id="jqTransformTextarea-tm"></td><td id="jqTransformTextarea-tr"></td></tr>';
|
||||
strTable +='<tr><td id="jqTransformTextarea-ml"> </td><td id="jqTransformTextarea-mm"><div></div></td><td id="jqTransformTextarea-mr"> </td></tr>';
|
||||
strTable +='<tr><td id="jqTransformTextarea-bl"></td><td id="jqTransformTextarea-bm"></td><td id="jqTransformTextarea-br"></td></tr>';
|
||||
strTable +='</table>';
|
||||
var oTable = $(strTable)
|
||||
.insertAfter(textarea)
|
||||
.hover(function(){
|
||||
!oTable.hasClass('jqTransformTextarea-focus') && oTable.addClass('jqTransformTextarea-hover');
|
||||
},function(){
|
||||
oTable.removeClass('jqTransformTextarea-hover');
|
||||
})
|
||||
;
|
||||
|
||||
textarea
|
||||
.focus(function(){oTable.removeClass('jqTransformTextarea-hover').addClass('jqTransformTextarea-focus');})
|
||||
.blur(function(){oTable.removeClass('jqTransformTextarea-focus');})
|
||||
.appendTo($('#jqTransformTextarea-mm div',oTable))
|
||||
;
|
||||
this.oTable = oTable;
|
||||
if($.browser.safari){
|
||||
$('#jqTransformTextarea-mm',oTable)
|
||||
.addClass('jqTransformSafariTextarea')
|
||||
.find('div')
|
||||
.css('height',textarea.height())
|
||||
.css('width',textarea.width())
|
||||
;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/***************************
|
||||
Select
|
||||
***************************/
|
||||
$.fn.jqTransSelect = function(){
|
||||
return this.each(function(index){
|
||||
var $select = $(this);
|
||||
|
||||
if($select.hasClass('jqTransformHidden')) {return;}
|
||||
if($select.attr('multiple')) {return;}
|
||||
|
||||
var oLabel = jqTransformGetLabel($select);
|
||||
/* First thing we do is Wrap it */
|
||||
var $wrapper = $select
|
||||
.addClass('jqTransformHidden')
|
||||
.wrap('<div class="jqTransformSelectWrapper"></div>')
|
||||
.parent()
|
||||
.css({zIndex: 10-index})
|
||||
;
|
||||
|
||||
/* Now add the html for the select */
|
||||
$wrapper.prepend('<div><span></span><a href="#" class="jqTransformSelectOpen"></a></div><ul></ul>');
|
||||
var $ul = $('ul', $wrapper).css('width',$select.width()).hide();
|
||||
/* Now we add the options */
|
||||
$('option', this).each(function(i){
|
||||
var oLi = $('<li><a href="#" index="'+ i +'">'+ $(this).html() +'</a></li>');
|
||||
$ul.append(oLi);
|
||||
});
|
||||
|
||||
/* Add click handler to the a */
|
||||
$ul.find('a').click(function(){
|
||||
$('a.selected', $wrapper).removeClass('selected');
|
||||
$(this).addClass('selected');
|
||||
/* Fire the onchange event */
|
||||
if ($select[0].selectedIndex != $(this).attr('index') && $select[0].onchange) { $select[0].selectedIndex = $(this).attr('index'); $select[0].onchange(); }
|
||||
$select[0].selectedIndex = $(this).attr('index');
|
||||
$('span:eq(0)', $wrapper).html($(this).html());
|
||||
$ul.hide();
|
||||
return false;
|
||||
});
|
||||
/* Set the default */
|
||||
$('a:eq('+ this.selectedIndex +')', $ul).click();
|
||||
$('span:first', $wrapper).click(function(){$("a.jqTransformSelectOpen",$wrapper).trigger('click');});
|
||||
oLabel && oLabel.click(function(){$("a.jqTransformSelectOpen",$wrapper).trigger('click');});
|
||||
this.oLabel = oLabel;
|
||||
|
||||
/* Apply the click handler to the Open */
|
||||
var oLinkOpen = $('a.jqTransformSelectOpen', $wrapper)
|
||||
.click(function(){
|
||||
//Check if box is already open to still allow toggle, but close all other selects
|
||||
if( $ul.css('display') == 'none' ) {jqTransformHideSelect();}
|
||||
if($select.attr('disabled')){return false;}
|
||||
|
||||
$ul.slideToggle('fast', function(){
|
||||
var offSet = ($('a.selected', $ul).offset().top - $ul.offset().top);
|
||||
$ul.animate({scrollTop: offSet});
|
||||
});
|
||||
return false;
|
||||
})
|
||||
;
|
||||
|
||||
// Set the new width
|
||||
var iSelectWidth = $select.outerWidth();
|
||||
var oSpan = $('span:first',$wrapper);
|
||||
var newWidth = (iSelectWidth > oSpan.innerWidth())?iSelectWidth+oLinkOpen.outerWidth():$wrapper.width();
|
||||
$wrapper.css('width',newWidth);
|
||||
$ul.css('width',newWidth-2);
|
||||
oSpan.css({width:iSelectWidth});
|
||||
|
||||
// Calculate the height if necessary, less elements that the default height
|
||||
//show the ul to calculate the block, if ul is not displayed li height value is 0
|
||||
$ul.css({display:'block',visibility:'hidden'});
|
||||
var iSelectHeight = ($('li',$ul).length)*($('li:first',$ul).height());//+1 else bug ff
|
||||
(iSelectHeight < $ul.height()) && $ul.css({height:iSelectHeight,'overflow':'hidden'});//hidden else bug with ff
|
||||
$ul.css({display:'none',visibility:'visible'});
|
||||
|
||||
});
|
||||
};
|
||||
$.fn.jqTransform = function(options){
|
||||
var opt = $.extend({},defaultOptions,options);
|
||||
|
||||
/* each form */
|
||||
return this.each(function(){
|
||||
var selfForm = $(this);
|
||||
if(selfForm.hasClass('jqtransformdone')) {return;}
|
||||
selfForm.addClass('jqtransformdone');
|
||||
|
||||
$('input:submit, input:reset, input[type="button"]', this).jqTransInputButton();
|
||||
$('input:text, input:password', this).jqTransInputText();
|
||||
$('input:checkbox', this).jqTransCheckBox();
|
||||
$('input:radio', this).jqTransRadio();
|
||||
$('textarea', this).jqTransTextarea();
|
||||
|
||||
if( $('select', this).jqTransSelect().length > 0 ){jqTransformAddDocumentListener();}
|
||||
selfForm.bind('reset',function(){var action = function(){jqTransformReset(this);}; window.setTimeout(action, 10);});
|
||||
|
||||
|
||||
}); /* End Form each */
|
||||
|
||||
};/* End the Plugin */
|
||||
|
||||
})(jQuery);
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
(function(a){a.fn.passwordStrength=function(b){b=a.extend({},a.fn.passwordStrength.defaults,b);this.each(function(){var d=a(this),e=0,c=false,f=a(this).parents("form").find(".passwordStrength");d.bind("keyup blur",function(){e=a.fn.passwordStrength.ratepasswd(d.val(),b);e>=0&&c==false&&(c=true);f.find("span").removeClass("bgStrength");if(e<35&&e>=0){f.find("span:first").addClass("bgStrength")}else{if(e<60&&e>=35){f.find("span:lt(2)").addClass("bgStrength")}else{if(e>=60){f.find("span:lt(3)").addClass("bgStrength")}}}if(c&&(d.val().length<b.minLen||d.val().length>b.maxLen)){b.showmsg(d,d.attr("errormsg"),3)}else{if(c){b.showmsg(d,"",2)}}b.trigger(d,!(e>=0))})})};a.fn.passwordStrength.ratepasswd=function(c,d){var b=c.length,e;if(b>=d.minLen&&b<=d.maxLen){e=a.fn.passwordStrength.checkStrong(c)}else{e=-1}return e/4*100};a.fn.passwordStrength.checkStrong=function(d){var e=0,b=d.length;for(var c=0;c<b;c++){e|=a.fn.passwordStrength.charMode(d.charCodeAt(c))}return a.fn.passwordStrength.bitTotal(e)};a.fn.passwordStrength.charMode=function(b){if(b>=48&&b<=57){return 1}else{if(b>=65&&b<=90){return 2}else{if(b>=97&&b<=122){return 4}else{return 8}}}};a.fn.passwordStrength.bitTotal=function(b){var d=0;for(var c=0;c<4;c++){if(b&1){d++}b>>>=1}return d};a.fn.passwordStrength.defaults={minLen:0,maxLen:30,trigger:a.noop}})(jQuery);
|
||||
@@ -0,0 +1,85 @@
|
||||
(function($){
|
||||
$.fn.passwordStrength=function(settings){
|
||||
settings=$.extend({},$.fn.passwordStrength.defaults,settings);
|
||||
|
||||
this.each(function(){
|
||||
var $this=$(this),
|
||||
scores = 0,
|
||||
checkingerror=false,
|
||||
pstrength=$(this).parents("form").find(".passwordStrength");
|
||||
|
||||
$this.bind("keyup blur",function(){
|
||||
scores = $.fn.passwordStrength.ratepasswd($this.val(),settings);
|
||||
scores>=0 && checkingerror==false && (checkingerror=true);
|
||||
|
||||
pstrength.find("span").removeClass("bgStrength");
|
||||
if(scores < 35 && scores >=0){
|
||||
pstrength.find("span:first").addClass("bgStrength");
|
||||
}else if(scores < 60 && scores >=35){
|
||||
pstrength.find("span:lt(2)").addClass("bgStrength");
|
||||
}else if(scores >= 60){
|
||||
pstrength.find("span:lt(3)").addClass("bgStrength");
|
||||
}
|
||||
|
||||
if(checkingerror && ($this.val().length<settings.minLen || $this.val().length>settings.maxLen) ){
|
||||
settings.showmsg($this,$this.attr("errormsg"),3);
|
||||
}else if(checkingerror){
|
||||
settings.showmsg($this,"",2);
|
||||
}
|
||||
|
||||
settings.trigger($this,!(scores>=0));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$.fn.passwordStrength.ratepasswd=function(passwd,config){
|
||||
//判断密码强度
|
||||
var len = passwd.length, scores;
|
||||
if(len >= config.minLen && len <= config.maxLen){
|
||||
scores = $.fn.passwordStrength.checkStrong(passwd);
|
||||
}else{
|
||||
scores = -1;
|
||||
}
|
||||
|
||||
return scores/4*100;
|
||||
|
||||
}
|
||||
|
||||
//密码强度;
|
||||
$.fn.passwordStrength.checkStrong=function(content){
|
||||
var modes = 0, len = content.length;
|
||||
for(var i = 0;i < len; i++){
|
||||
modes |= $.fn.passwordStrength.charMode(content.charCodeAt(i));
|
||||
}
|
||||
return $.fn.passwordStrength.bitTotal(modes);
|
||||
}
|
||||
|
||||
//字符类型;
|
||||
$.fn.passwordStrength.charMode=function(content){
|
||||
if(content >= 48 && content <= 57){ // 0-9
|
||||
return 1;
|
||||
}else if(content >= 65 && content <= 90){ // A-Z
|
||||
return 2;
|
||||
}else if(content >= 97 && content <= 122){ // a-z
|
||||
return 4;
|
||||
}else{ // 其它
|
||||
return 8;
|
||||
}
|
||||
}
|
||||
|
||||
//计算出当前密码当中一共有多少种模式;
|
||||
$.fn.passwordStrength.bitTotal=function(num){
|
||||
var modes = 0;
|
||||
for(var i = 0;i < 4;i++){
|
||||
if(num & 1){modes++;}
|
||||
num >>>= 1;
|
||||
}
|
||||
return modes;
|
||||
}
|
||||
|
||||
$.fn.passwordStrength.defaults={
|
||||
minLen:0,
|
||||
maxLen:30,
|
||||
trigger:$.noop
|
||||
}
|
||||
})(jQuery);
|
||||
@@ -0,0 +1 @@
|
||||
var swfuploadhandler={init:function(b,a){b=$.extend(true,{},swfuploadefaults,b);swfuploadhandler["SWFUPLOAD_"+b.custom_settings.form.attr("id")+"_"+a]=new SWFUpload(b)},swfUploadLoaded:function(){},uploadStart:function(){},uploadDone:function(){this.customSettings.showmsg("已成功上传文件!",2)},fileDialogStart:function(){this.customSettings.form.find("input[plugin='swfupload']").val("");this.cancelUpload()},fileQueueError:function(a,d,b){try{switch(d){case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:this.customSettings.showmsg("You have attempted to queue too many files.\n"+(b===0?"You have reached the upload limit.":"You may select "+(b>1?"up to "+b+" files.":"one file.")),3);return;case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:this.customSettings.showmsg("The file you selected is too big.",3);this.debug("Error Code: File too big, File name: "+a.name+", File size: "+a.size+", Message: "+b);return;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:this.customSettings.showmsg("The file you selected is empty. Please select another file.",3);this.debug("Error Code: Zero byte file, File name: "+a.name+", File size: "+a.size+", Message: "+b);return;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:this.customSettings.showmsg("The file you choose is not an allowed file type.",3);this.debug("Error Code: Invalid File Type, File name: "+a.name+", File size: "+a.size+", Message: "+b);return;default:swfu.customSettings.showmsg("An error occurred in the upload. Try again later.",3);this.debug("Error Code: "+d+", File name: "+a.name+", File size: "+a.size+", Message: "+b);return}}catch(c){}},fileQueued:function(a){try{this.customSettings.form.find("input[plugin='swfupload']").val(a.name)}catch(b){}},fileDialogComplete:function(a,b){this.startUpload()},uploadProgress:function(a,d,c){try{var b=Math.ceil((d/c)*100);this.customSettings.showmsg("已上传:"+b+"%",1)}catch(f){}},uploadSuccess:function(b,a){try{if(a===" "){this.customSettings.upload_successful=false}else{this.customSettings.upload_successful=true;this.customSettings.form.find("input[pluginhidden='swfupload']").val(a)}}catch(c){}},uploadComplete:function(a){try{if(this.customSettings.upload_successful){swfuploadhandler.uploadDone.call(this)}else{this.customSettings.form.find("input[plugin='swfupload']").val("");this.customSettings.showmsg("There was a problem with the upload.\nThe server did not accept it.",3)}}catch(b){}},uploadError:function(b,d,c){try{if(d===SWFUpload.UPLOAD_ERROR.FILE_CANCELLED){return}this.customSettings.form.find("input[plugin='swfupload']").val("");switch(d){case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:this.customSettings.showmsg("There was a configuration error. You will not be able to upload a resume at this time.",3);this.debug("Error Code: No backend file, File name: "+b.name+", Message: "+c);return;case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:this.customSettings.showmsg("You may only upload 1 file.",3);this.debug("Error Code: Upload Limit Exceeded, File name: "+b.name+", File size: "+b.size+", Message: "+c);return;case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:break;default:this.customSettings.showmsg("An error occurred in the upload. Try again later.",3);this.debug("Error Code: "+d+", File name: "+b.name+", File size: "+b.size+", Message: "+c);return}}catch(a){}}};var swfuploadefaults={file_size_limit:"10 MB",file_types:"*.*",file_types_description:"All Files",file_upload_limit:"0",file_queue_limit:"10",button_placeholder_id:"spanButtonPlaceholder",file_post_name:"resume_file",upload_url:"demo/plugin/swfupload/upload.php",button_image_url:"demo/plugin/swfupload/XPButtonUploadText_61x22.png",button_width:61,button_height:22,flash_url:"demo/plugin/swfupload/swfupload.swf",swfupload_loaded_handler:swfuploadhandler.swfUploadLoaded,file_dialog_start_handler:swfuploadhandler.fileDialogStart,file_queued_handler:swfuploadhandler.fileQueued,file_queue_error_handler:swfuploadhandler.fileQueueError,file_dialog_complete_handler:swfuploadhandler.fileDialogComplete,upload_start_handler:swfuploadhandler.uploadStart,upload_progress_handler:swfuploadhandler.uploadProgress,upload_error_handler:swfuploadhandler.uploadError,upload_success_handler:swfuploadhandler.uploadSuccess,upload_complete_handler:swfuploadhandler.uploadComplete,custom_settings:{},debug:false};
|
||||
@@ -0,0 +1,168 @@
|
||||
/*set handlers here*/
|
||||
var swfuploadhandler={
|
||||
init:function(settings,index){
|
||||
settings=$.extend(true,{},swfuploadefaults,settings);
|
||||
swfuploadhandler["SWFUPLOAD_"+settings.custom_settings.form.attr("id")+"_"+index]=new SWFUpload(settings);
|
||||
},
|
||||
|
||||
swfUploadLoaded:function(){
|
||||
|
||||
},
|
||||
|
||||
uploadStart:function(){
|
||||
//this.customSettings.form.find(".fsUploadProgress").show();
|
||||
},
|
||||
|
||||
uploadDone:function(){
|
||||
//this.customSettings.form.find(".fsUploadProgress").hide();
|
||||
this.customSettings.showmsg("已成功上传文件!",2);
|
||||
//this.customSettings.form.submit();
|
||||
},
|
||||
|
||||
fileDialogStart:function(){
|
||||
this.customSettings.form.find("input[plugin='swfupload']").val("");
|
||||
this.cancelUpload();
|
||||
},
|
||||
|
||||
fileQueueError:function(file, errorCode, message){
|
||||
try {
|
||||
// Handle this error separately because we don't want to create a FileProgress element for it.
|
||||
switch (errorCode) {
|
||||
case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:
|
||||
this.customSettings.showmsg("You have attempted to queue too many files.\n" + (message === 0 ? "You have reached the upload limit." : "You may select " + (message > 1 ? "up to " + message + " files." : "one file.")),3);
|
||||
return;
|
||||
case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
|
||||
this.customSettings.showmsg("The file you selected is too big.",3);
|
||||
this.debug("Error Code: File too big, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
|
||||
return;
|
||||
case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:
|
||||
this.customSettings.showmsg("The file you selected is empty. Please select another file.",3);
|
||||
this.debug("Error Code: Zero byte file, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
|
||||
return;
|
||||
case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:
|
||||
this.customSettings.showmsg("The file you choose is not an allowed file type.",3);
|
||||
this.debug("Error Code: Invalid File Type, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
|
||||
return;
|
||||
default:
|
||||
swfu.customSettings.showmsg("An error occurred in the upload. Try again later.",3);
|
||||
this.debug("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
|
||||
return;
|
||||
}
|
||||
} catch (e) {}
|
||||
},
|
||||
|
||||
fileQueued:function(file){
|
||||
try {
|
||||
this.customSettings.form.find("input[plugin='swfupload']").val(file.name);
|
||||
} catch (e) {}
|
||||
},
|
||||
|
||||
fileDialogComplete:function(numFilesSelected, numFilesQueued){
|
||||
this.startUpload();
|
||||
},
|
||||
|
||||
uploadProgress:function(file, bytesLoaded, bytesTotal){
|
||||
try {
|
||||
var percent = Math.ceil((bytesLoaded / bytesTotal) * 100);
|
||||
this.customSettings.showmsg("已上传:"+percent+"%",1);
|
||||
//this.customSettings.form.find(".fsUploadProgress").text("已上传:"+percent+"%");
|
||||
} catch (e) {}
|
||||
},
|
||||
|
||||
uploadSuccess:function(file, serverData){
|
||||
try {
|
||||
if (serverData === " ") {
|
||||
this.customSettings.upload_successful = false;
|
||||
} else {
|
||||
this.customSettings.upload_successful = true;
|
||||
this.customSettings.form.find("input[pluginhidden='swfupload']").val(serverData);
|
||||
}
|
||||
} catch (e) {}
|
||||
},
|
||||
|
||||
uploadComplete:function(file){
|
||||
try {
|
||||
if (this.customSettings.upload_successful) {
|
||||
//this.setButtonDisabled(true);
|
||||
swfuploadhandler.uploadDone.call(this);
|
||||
} else {
|
||||
this.customSettings.form.find("input[plugin='swfupload']").val("");
|
||||
this.customSettings.showmsg("There was a problem with the upload.\nThe server did not accept it.",3);
|
||||
}
|
||||
} catch (e) {}
|
||||
},
|
||||
|
||||
uploadError:function(file, errorCode, message){
|
||||
try {
|
||||
if (errorCode === SWFUpload.UPLOAD_ERROR.FILE_CANCELLED) {
|
||||
// Don't show cancelled error boxes
|
||||
return;
|
||||
}
|
||||
this.customSettings.form.find("input[plugin='swfupload']").val("");
|
||||
|
||||
// Handle this error separately because we don't want to create a FileProgress element for it.
|
||||
switch (errorCode) {
|
||||
case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:
|
||||
this.customSettings.showmsg("There was a configuration error. You will not be able to upload a resume at this time.",3);
|
||||
this.debug("Error Code: No backend file, File name: " + file.name + ", Message: " + message);
|
||||
return;
|
||||
case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:
|
||||
this.customSettings.showmsg("You may only upload 1 file.",3);
|
||||
this.debug("Error Code: Upload Limit Exceeded, File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
|
||||
return;
|
||||
|
||||
case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:
|
||||
case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:
|
||||
break;
|
||||
default:
|
||||
this.customSettings.showmsg("An error occurred in the upload. Try again later.",3);
|
||||
this.debug("Error Code: " + errorCode + ", File name: " + file.name + ", File size: " + file.size + ", Message: " + message);
|
||||
return;
|
||||
}
|
||||
} catch (ex) {}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var swfuploadefaults={
|
||||
file_size_limit : "10 MB",
|
||||
file_types : "*.*",
|
||||
file_types_description : "All Files",
|
||||
file_upload_limit : "0",
|
||||
file_queue_limit : "10",
|
||||
button_placeholder_id : "spanButtonPlaceholder",
|
||||
|
||||
file_post_name: "resume_file",
|
||||
upload_url: "demo/plugin/swfupload/upload.php",
|
||||
button_image_url: "demo/plugin/swfupload/XPButtonUploadText_61x22.png",
|
||||
button_width: 61,
|
||||
button_height: 22,
|
||||
flash_url: "demo/plugin/swfupload/swfupload.swf",
|
||||
|
||||
swfupload_loaded_handler : swfuploadhandler.swfUploadLoaded,
|
||||
file_dialog_start_handler: swfuploadhandler.fileDialogStart,
|
||||
file_queued_handler : swfuploadhandler.fileQueued,
|
||||
file_queue_error_handler : swfuploadhandler.fileQueueError,
|
||||
file_dialog_complete_handler : swfuploadhandler.fileDialogComplete,
|
||||
upload_start_handler : swfuploadhandler.uploadStart,
|
||||
upload_progress_handler : swfuploadhandler.uploadProgress,
|
||||
upload_error_handler : swfuploadhandler.uploadError,
|
||||
upload_success_handler : swfuploadhandler.uploadSuccess,
|
||||
upload_complete_handler : swfuploadhandler.uploadComplete,
|
||||
|
||||
custom_settings:{},
|
||||
debug: false
|
||||
}
|
||||
|
||||
//$(function(){
|
||||
//独立触发事件;
|
||||
//var custom={
|
||||
// custom_settings:{
|
||||
// form:$this,
|
||||
// showmsg:function(msg){
|
||||
// alert(msg);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//swfuploadhandler.init(custom);
|
||||
//})
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1 @@
|
||||
var SWFUpload;if(typeof(SWFUpload)==="function"){SWFUpload.queue={};SWFUpload.prototype.initSettings=(function(a){return function(){if(typeof(a)==="function"){a.call(this)}this.queueSettings={};this.queueSettings.queue_cancelled_flag=false;this.queueSettings.queue_upload_count=0;this.queueSettings.user_upload_complete_handler=this.settings.upload_complete_handler;this.queueSettings.user_upload_start_handler=this.settings.upload_start_handler;this.settings.upload_complete_handler=SWFUpload.queue.uploadCompleteHandler;this.settings.upload_start_handler=SWFUpload.queue.uploadStartHandler;this.settings.queue_complete_handler=this.settings.queue_complete_handler||null}})(SWFUpload.prototype.initSettings);SWFUpload.prototype.startUpload=function(a){this.queueSettings.queue_cancelled_flag=false;this.callFlash("StartUpload",[a])};SWFUpload.prototype.cancelQueue=function(){this.queueSettings.queue_cancelled_flag=true;this.stopUpload();var a=this.getStats();while(a.files_queued>0){this.cancelUpload();a=this.getStats()}};SWFUpload.queue.uploadStartHandler=function(a){var b;if(typeof(this.queueSettings.user_upload_start_handler)==="function"){b=this.queueSettings.user_upload_start_handler.call(this,a)}b=(b===false)?false:true;this.queueSettings.queue_cancelled_flag=!b;return b};SWFUpload.queue.uploadCompleteHandler=function(b){var c=this.queueSettings.user_upload_complete_handler;var d;if(b.filestatus===SWFUpload.FILE_STATUS.COMPLETE){this.queueSettings.queue_upload_count++}if(typeof(c)==="function"){d=(c.call(this,b)===false)?false:true}else{if(b.filestatus===SWFUpload.FILE_STATUS.QUEUED){d=false}else{d=true}}if(d){var a=this.getStats();if(a.files_queued>0&&this.queueSettings.queue_cancelled_flag===false){this.startUpload()}else{if(this.queueSettings.queue_cancelled_flag===false){this.queueEvent("queue_complete_handler",[this.queueSettings.queue_upload_count]);this.queueSettings.queue_upload_count=0}else{this.queueSettings.queue_cancelled_flag=false;this.queueSettings.queue_upload_count=0}}}}};
|
||||
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
Queue Plug-in
|
||||
|
||||
Features:
|
||||
*Adds a cancelQueue() method for cancelling the entire queue.
|
||||
*All queued files are uploaded when startUpload() is called.
|
||||
*If false is returned from uploadComplete then the queue upload is stopped.
|
||||
If false is not returned (strict comparison) then the queue upload is continued.
|
||||
*Adds a QueueComplete event that is fired when all the queued files have finished uploading.
|
||||
Set the event handler with the queue_complete_handler setting.
|
||||
|
||||
*/
|
||||
|
||||
var SWFUpload;
|
||||
if (typeof(SWFUpload) === "function") {
|
||||
SWFUpload.queue = {};
|
||||
|
||||
SWFUpload.prototype.initSettings = (function (oldInitSettings) {
|
||||
return function () {
|
||||
if (typeof(oldInitSettings) === "function") {
|
||||
oldInitSettings.call(this);
|
||||
}
|
||||
|
||||
this.queueSettings = {};
|
||||
|
||||
this.queueSettings.queue_cancelled_flag = false;
|
||||
this.queueSettings.queue_upload_count = 0;
|
||||
|
||||
this.queueSettings.user_upload_complete_handler = this.settings.upload_complete_handler;
|
||||
this.queueSettings.user_upload_start_handler = this.settings.upload_start_handler;
|
||||
this.settings.upload_complete_handler = SWFUpload.queue.uploadCompleteHandler;
|
||||
this.settings.upload_start_handler = SWFUpload.queue.uploadStartHandler;
|
||||
|
||||
this.settings.queue_complete_handler = this.settings.queue_complete_handler || null;
|
||||
};
|
||||
})(SWFUpload.prototype.initSettings);
|
||||
|
||||
SWFUpload.prototype.startUpload = function (fileID) {
|
||||
this.queueSettings.queue_cancelled_flag = false;
|
||||
this.callFlash("StartUpload", [fileID]);
|
||||
};
|
||||
|
||||
SWFUpload.prototype.cancelQueue = function () {
|
||||
this.queueSettings.queue_cancelled_flag = true;
|
||||
this.stopUpload();
|
||||
|
||||
var stats = this.getStats();
|
||||
while (stats.files_queued > 0) {
|
||||
this.cancelUpload();
|
||||
stats = this.getStats();
|
||||
}
|
||||
};
|
||||
|
||||
SWFUpload.queue.uploadStartHandler = function (file) {
|
||||
var returnValue;
|
||||
if (typeof(this.queueSettings.user_upload_start_handler) === "function") {
|
||||
returnValue = this.queueSettings.user_upload_start_handler.call(this, file);
|
||||
}
|
||||
|
||||
// To prevent upload a real "FALSE" value must be returned, otherwise default to a real "TRUE" value.
|
||||
returnValue = (returnValue === false) ? false : true;
|
||||
|
||||
this.queueSettings.queue_cancelled_flag = !returnValue;
|
||||
|
||||
return returnValue;
|
||||
};
|
||||
|
||||
SWFUpload.queue.uploadCompleteHandler = function (file) {
|
||||
var user_upload_complete_handler = this.queueSettings.user_upload_complete_handler;
|
||||
var continueUpload;
|
||||
|
||||
if (file.filestatus === SWFUpload.FILE_STATUS.COMPLETE) {
|
||||
this.queueSettings.queue_upload_count++;
|
||||
}
|
||||
|
||||
if (typeof(user_upload_complete_handler) === "function") {
|
||||
continueUpload = (user_upload_complete_handler.call(this, file) === false) ? false : true;
|
||||
} else if (file.filestatus === SWFUpload.FILE_STATUS.QUEUED) {
|
||||
// If the file was stopped and re-queued don't restart the upload
|
||||
continueUpload = false;
|
||||
} else {
|
||||
continueUpload = true;
|
||||
}
|
||||
|
||||
if (continueUpload) {
|
||||
var stats = this.getStats();
|
||||
if (stats.files_queued > 0 && this.queueSettings.queue_cancelled_flag === false) {
|
||||
this.startUpload();
|
||||
} else if (this.queueSettings.queue_cancelled_flag === false) {
|
||||
this.queueEvent("queue_complete_handler", [this.queueSettings.queue_upload_count]);
|
||||
this.queueSettings.queue_upload_count = 0;
|
||||
} else {
|
||||
this.queueSettings.queue_cancelled_flag = false;
|
||||
this.queueSettings.queue_upload_count = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||