1
This commit is contained in:
30
public/static/plugs/jquery/area/area.js
vendored
Normal file
30
public/static/plugs/jquery/area/area.js
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
/* PCAS (Province City Area Selector 省、市、地区联动选择JS封装类) Ver 2.02 完整版 *\
|
||||
|
||||
制作时间:2005-12-30
|
||||
更新时间:2006-01-24
|
||||
数据修正:2012-01-17(截止2011年10月31日)
|
||||
|
||||
演示地址:http://www.popub.net/script/pcasunzip.html
|
||||
下载地址:http://www.popub.net/script/pcasunzip.js
|
||||
应用说明:页面包含<script type="text/javascript" src="pcasunzip.js" charset="gb2312"></script>
|
||||
省市联动
|
||||
new PCAS("Province","City")
|
||||
new PCAS("Province","City","吉林省")
|
||||
new PCAS("Province","City","吉林省","吉林市")
|
||||
省市地区联动
|
||||
new PCAS("Province","City","Area")
|
||||
new PCAS("Province","City","Area","吉林省")
|
||||
new PCAS("Province","City","Area","吉林省","松原市")
|
||||
new PCAS("Province","City","Area","吉林省","松原市","宁江区")
|
||||
省、市、地区对象取得的值均为实际值。
|
||||
注:省、市、地区提示信息选项的值为""(空字符串)
|
||||
|
||||
\*** 程序制作/版权所有:崔永祥(333) E-Mail:zhadan007@21cn.com 网址:http://www.popub.net ***/
|
||||
|
||||
|
||||
SPT = "-省份-";
|
||||
SCT = "-城市-";
|
||||
SAT = "-地区-";
|
||||
ShowT = 0; /* 提示文字 0:不显示 1:显示 */
|
||||
PCAD = "__STRING__";
|
||||
if (ShowT)PCAD = SPT + "$" + SCT + "," + SAT + "#" + PCAD; PCAArea = []; PCAP = []; PCAC = []; PCAA = []; PCAN = PCAD.split("#"); for (i = 0; i < PCAN.length; i++){PCAA[i] = []; TArea = PCAN[i].split("$")[1].split("|"); for (j = 0; j < TArea.length; j++){PCAA[i][j] = TArea[j].split(","); if (PCAA[i][j].length == 1)PCAA[i][j][1] = SAT; TArea[j] = TArea[j].split(",")[0]}PCAArea[i] = PCAN[i].split("$")[0] + "," + TArea.join(","); PCAP[i] = PCAArea[i].split(",")[0]; PCAC[i] = PCAArea[i].split(',')}function PCAS(){this.SelP = document.getElementsByName(arguments[0])[0]; this.SelC = document.getElementsByName(arguments[1])[0]; this.SelA = document.getElementsByName(arguments[2])[0]; this.DefP = this.SelA?arguments[3]:arguments[2]; this.DefC = this.SelA?arguments[4]:arguments[3]; this.DefA = this.SelA?arguments[5]:arguments[4]; this.SelP.PCA = this; this.SelC.PCA = this; this.SelP.onchange = function(){PCAS.SetC(this.PCA)}; if (this.SelA)this.SelC.onchange = function(){PCAS.SetA(this.PCA)}; PCAS.SetP(this)}; PCAS.SetP = function(PCA){for (i = 0; i < PCAP.length; i++){PCAPT = PCAPV = PCAP[i]; if (PCAPT == SPT)PCAPV = ""; PCA.SelP.options.add(new Option(PCAPT, PCAPV)); if (PCA.DefP == PCAPV)PCA.SelP[i].selected = true}PCAS.SetC(PCA)}; PCAS.SetC = function(PCA){PI = PCA.SelP.selectedIndex; PCA.SelC.length = 0; for (i = 1; i < PCAC[PI].length; i++){PCACT = PCACV = PCAC[PI][i]; if (PCACT == SCT)PCACV = ""; PCA.SelC.options.add(new Option(PCACT, PCACV)); if (PCA.DefC == PCACV)PCA.SelC[i - 1].selected = true}if (PCA.SelA)PCAS.SetA(PCA)}; PCAS.SetA = function(PCA){PI = PCA.SelP.selectedIndex; CI = PCA.SelC.selectedIndex; PCA.SelA.length = 0; for (i = 1; i < PCAA[PI][CI].length; i++){PCAAT = PCAAV = PCAA[PI][CI][i]; if (PCAAT == SAT)PCAAV = ""; PCA.SelA.options.add(new Option(PCAAT, PCAAV)); if (PCA.DefA == PCAAV)PCA.SelA[i - 1].selected = true} try{$(PCA.SelA).trigger('change')} catch (e){}}
|
||||
6198
public/static/plugs/jquery/area/area.json
Normal file
6198
public/static/plugs/jquery/area/area.json
Normal file
File diff suppressed because it is too large
Load Diff
18
public/static/plugs/jquery/area/area.php
Normal file
18
public/static/plugs/jquery/area/area.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
$data = [];
|
||||
$list = json_decode(file_get_contents(__DIR__ . '/area.json'), true);
|
||||
foreach ($list as $citys) {
|
||||
$lines = [];
|
||||
foreach ($citys['list'] as $area) {
|
||||
$lines[] = $area['name'] . ',' . join(',', $area['list']);
|
||||
}
|
||||
$data[] = $citys['name'] . '$' . join('|', $lines);
|
||||
}
|
||||
$filename = dirname(__DIR__) . '/pcasunzips.js';
|
||||
$content = str_replace('__STRING__', join('#', $data), file_get_contents(__DIR__ . '/area.js'));
|
||||
if (file_put_contents($filename, $content)) {
|
||||
echo 'success';
|
||||
} else {
|
||||
echo 'error';
|
||||
}
|
||||
79
public/static/plugs/jquery/autocompleter.css
Normal file
79
public/static/plugs/jquery/autocompleter.css
Normal file
@ -0,0 +1,79 @@
|
||||
.autocompleter {
|
||||
left: 0;
|
||||
top: 37px;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.autocompleter, .autocompleter-hint {
|
||||
position: absolute
|
||||
}
|
||||
|
||||
.autocompleter-focus .autocompleter-list {
|
||||
border: 1px solid #c9c9c9;
|
||||
border-bottom-left-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
}
|
||||
|
||||
.autocompleter-list {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align: left;
|
||||
list-style: none;
|
||||
box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
}
|
||||
|
||||
.autocompleter-item {
|
||||
color: #444;
|
||||
cursor: pointer;
|
||||
padding: 6px 12px;
|
||||
}
|
||||
|
||||
.autocompleter-item strong {
|
||||
color: #00B83F;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.autocompleter-item span {
|
||||
color: #aaa
|
||||
}
|
||||
|
||||
.autocompleter-item:hover,
|
||||
.autocompleter-item-selected {
|
||||
color: #fff;
|
||||
background: #009688 !important;
|
||||
}
|
||||
|
||||
.autocompleter-item:hover span,
|
||||
.autocompleter-item:hover strong,
|
||||
.autocompleter-item-selected span,
|
||||
.autocompleter-item-selected strong {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.autocompleter-hint {
|
||||
left: 0;
|
||||
top: -56px;
|
||||
width: 100%;
|
||||
color: #ccc;
|
||||
display: none;
|
||||
font-size: 24px;
|
||||
text-align: left;
|
||||
font-weight: 400;
|
||||
padding: 12px 12px 12px 13px;
|
||||
}
|
||||
|
||||
.autocompleter-hint span {
|
||||
color: transparent
|
||||
}
|
||||
|
||||
.autocompleter-hint-show {
|
||||
display: block
|
||||
}
|
||||
|
||||
.autocompleter-closed {
|
||||
display: none
|
||||
}
|
||||
8
public/static/plugs/jquery/autocompleter.min.js
vendored
Normal file
8
public/static/plugs/jquery/autocompleter.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/static/plugs/jquery/base64.min.js
vendored
Normal file
1
public/static/plugs/jquery/base64.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
!function(){function t(t){this.message=t}var r="undefined"!=typeof exports?exports:self,e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.prototype=new Error,t.prototype.name="InvalidCharacterError",r.btoa||(r.btoa=function(r){for(var o,n,a=String(r),i=0,c=e,d="";a.charAt(0|i)||(c="=",i%1);d+=c.charAt(63&o>>8-i%1*8)){if(n=a.charCodeAt(i+=.75),n>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");o=o<<8|n}return d}),r.atob||(r.atob=function(r){var o=String(r).replace(/=+$/,"");if(o.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,a,i=0,c=0,d="";a=o.charAt(c++);~a&&(n=i%4?64*n+a:a,i++%4)?d+=String.fromCharCode(255&n>>(-2*i&6)):0)a=e.indexOf(a);return d})}();
|
||||
5
public/static/plugs/jquery/jquery.min.js
vendored
Normal file
5
public/static/plugs/jquery/jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/static/plugs/jquery/json.min.js
vendored
Normal file
1
public/static/plugs/jquery/json.min.js
vendored
Normal file
@ -0,0 +1 @@
|
||||
"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(t){return t<10?"0"+t:t}function this_value(){return this.valueOf()}function quote(t){return rx_escapable.lastIndex=0,rx_escapable.test(t)?'"'+t.replace(rx_escapable,function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function str(t,e){var r,n,o,u,f,a=gap,i=e[t];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(t)),"function"==typeof rep&&(i=rep.call(e,t,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,f=[],"[object Array]"===Object.prototype.toString.apply(i)){for(u=i.length,r=0;r<u;r+=1)f[r]=str(r,i)||"null";return o=0===f.length?"[]":gap?"[\n"+gap+f.join(",\n"+gap)+"\n"+a+"]":"["+f.join(",")+"]",gap=a,o}if(rep&&"object"==typeof rep)for(u=rep.length,r=0;r<u;r+=1)"string"==typeof rep[r]&&(n=rep[r],o=str(n,i),o&&f.push(quote(n)+(gap?": ":":")+o));else for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(o=str(n,i),o&&f.push(quote(n)+(gap?": ":":")+o));return o=0===f.length?"{}":gap?"{\n"+gap+f.join(",\n"+gap)+"\n"+a+"}":"{"+f.join(",")+"}",gap=a,o}}var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(t,e,r){var n;if(gap="",indent="","number"==typeof r)for(n=0;n<r;n+=1)indent+=" ";else"string"==typeof r&&(indent=r);if(rep=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return str("",{"":t})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(t,e){var r,n,o=t[e];if(o&&"object"==typeof o)for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n=walk(o,r),void 0!==n?o[r]=n:delete o[r]);return reviver.call(t,e,o)}var j;if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}();
|
||||
18
public/static/plugs/jquery/less.min.js
vendored
Normal file
18
public/static/plugs/jquery/less.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
9
public/static/plugs/jquery/masonry.min.js
vendored
Normal file
9
public/static/plugs/jquery/masonry.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
public/static/plugs/jquery/md5.min.js
vendored
Normal file
1
public/static/plugs/jquery/md5.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
public/static/plugs/jquery/pace.min.js
vendored
Normal file
2
public/static/plugs/jquery/pace.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
30
public/static/plugs/jquery/pcasunzips.js
vendored
Normal file
30
public/static/plugs/jquery/pcasunzips.js
vendored
Normal file
File diff suppressed because one or more lines are too long
46
public/static/plugs/jquery/uploader.js
vendored
Normal file
46
public/static/plugs/jquery/uploader.js
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
define(function () {
|
||||
return function (element, InitHandler, UploadedHandler, CompleteHandler) {
|
||||
var exts = $(element).data('type') || '*';
|
||||
var uptype = $(element).attr('data-uptype') || '';
|
||||
|
||||
// 检查可以上传的文件后缀
|
||||
$.form.load('?s=' + window.ADMIN_MODULE + '/api.plugs/check', {
|
||||
exts: exts,
|
||||
uptype: uptype
|
||||
}, 'post', function (ret, options) {
|
||||
options = {url: ret.data.data.url, exts: ret.data.exts, acceptMime: ret.data.mime, data: ret.data.data};
|
||||
if (exts.indexOf('*') > -1) delete options.exts, delete options.acceptMime;
|
||||
return renderUploader(options), false;
|
||||
}, false, false, 0);
|
||||
|
||||
// 初始化上传组件
|
||||
function renderUploader(options, headers) {
|
||||
this.options = {
|
||||
proindex: 0,
|
||||
elem: element,
|
||||
headers: headers || {},
|
||||
multiple: $(element).attr('data-multiple') > 0,
|
||||
before: function () {
|
||||
this.proindex = $.msg.loading('上传进度 <span data-upload-progress>0%</span>');
|
||||
},
|
||||
progress: function (n) {
|
||||
$('[data-upload-progress]').html(n + '%');
|
||||
},
|
||||
done: function (ret) {
|
||||
this.multiple || $.msg.close(this.proindex);
|
||||
if (ret.uploaded) {
|
||||
if (typeof UploadedHandler === 'function') UploadedHandler(ret.url);
|
||||
else $('[name="' + ($(element).data('field') || 'file') + '"]').val(ret.url).trigger('change');
|
||||
} else {
|
||||
$.msg.error(ret.info || ret.error.message || '文件上传出错!');
|
||||
}
|
||||
},
|
||||
allDone: function () {
|
||||
$.msg.close(this.proindex), $(element).html($(element).data('html'));
|
||||
if (typeof CompleteHandler === 'function') CompleteHandler();
|
||||
}
|
||||
};
|
||||
layui.upload.render($.extend(this.options, options));
|
||||
};
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user