Add backload for multiple file upload
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* JavaScript Templates 2.4.1
|
||||
* https://github.com/blueimp/JavaScript-Templates
|
||||
*
|
||||
* Copyright 2011, Sebastian Tschan
|
||||
* https://blueimp.net
|
||||
*
|
||||
* Licensed under the MIT license:
|
||||
* http://www.opensource.org/licenses/MIT
|
||||
*
|
||||
* Inspired by John Resig's JavaScript Micro-Templating:
|
||||
* http://ejohn.org/blog/javascript-micro-templating/
|
||||
*/
|
||||
|
||||
/*jslint evil: true, regexp: true, unparam: true */
|
||||
/*global document, define */
|
||||
|
||||
(function ($) {
|
||||
"use strict";
|
||||
var tmpl = function (str, data) {
|
||||
var f = !/[^\w\-\.:]/.test(str) ? tmpl.cache[str] = tmpl.cache[str] ||
|
||||
tmpl(tmpl.load(str)) :
|
||||
new Function(
|
||||
tmpl.arg + ',tmpl',
|
||||
"var _e=tmpl.encode" + tmpl.helper + ",_s='" +
|
||||
str.replace(tmpl.regexp, tmpl.func) +
|
||||
"';return _s;"
|
||||
);
|
||||
return data ? f(data, tmpl) : function (data) {
|
||||
return f(data, tmpl);
|
||||
};
|
||||
};
|
||||
tmpl.cache = {};
|
||||
tmpl.load = function (id) {
|
||||
return document.getElementById(id).innerHTML;
|
||||
};
|
||||
tmpl.regexp = /([\s'\\])(?!(?:[^{]|\{(?!%))*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g;
|
||||
tmpl.func = function (s, p1, p2, p3, p4, p5) {
|
||||
if (p1) { // whitespace, quote and backspace in HTML context
|
||||
return {
|
||||
"\n": "\\n",
|
||||
"\r": "\\r",
|
||||
"\t": "\\t",
|
||||
" " : " "
|
||||
}[p1] || "\\" + p1;
|
||||
}
|
||||
if (p2) { // interpolation: {%=prop%}, or unescaped: {%#prop%}
|
||||
if (p2 === "=") {
|
||||
return "'+_e(" + p3 + ")+'";
|
||||
}
|
||||
return "'+(" + p3 + "==null?'':" + p3 + ")+'";
|
||||
}
|
||||
if (p4) { // evaluation start tag: {%
|
||||
return "';";
|
||||
}
|
||||
if (p5) { // evaluation end tag: %}
|
||||
return "_s+='";
|
||||
}
|
||||
};
|
||||
tmpl.encReg = /[<>&"'\x00]/g;
|
||||
tmpl.encMap = {
|
||||
"<" : "<",
|
||||
">" : ">",
|
||||
"&" : "&",
|
||||
"\"" : """,
|
||||
"'" : "'"
|
||||
};
|
||||
tmpl.encode = function (s) {
|
||||
/*jshint eqnull:true */
|
||||
return (s == null ? "" : "" + s).replace(
|
||||
tmpl.encReg,
|
||||
function (c) {
|
||||
return tmpl.encMap[c] || "";
|
||||
}
|
||||
);
|
||||
};
|
||||
tmpl.arg = "o";
|
||||
tmpl.helper = ",print=function(s,e){_s+=e?(s==null?'':s):_e(s);}" +
|
||||
",include=function(s,d){_s+=tmpl(s,d);}";
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define(function () {
|
||||
return tmpl;
|
||||
});
|
||||
} else {
|
||||
$.tmpl = tmpl;
|
||||
}
|
||||
}(this));
|
||||
@@ -0,0 +1 @@
|
||||
!function(a){"use strict";var b=function(a,c){var d=/[^\w\-\.:]/.test(a)?new Function(b.arg+",tmpl","var _e=tmpl.encode"+b.helper+",_s='"+a.replace(b.regexp,b.func)+"';return _s;"):b.cache[a]=b.cache[a]||b(b.load(a));return c?d(c,b):function(a){return d(a,b)}};b.cache={},b.load=function(a){return document.getElementById(a).innerHTML},b.regexp=/([\s'\\])(?!(?:[^{]|\{(?!%))*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g,b.func=function(a,b,c,d,e,f){return b?{"\n":"\\n","\r":"\\r"," ":"\\t"," ":" "}[b]||"\\"+b:c?"="===c?"'+_e("+d+")+'":"'+("+d+"==null?'':"+d+")+'":e?"';":f?"_s+='":void 0},b.encReg=/[<>&"'\x00]/g,b.encMap={"<":"<",">":">","&":"&",'"':""","'":"'"},b.encode=function(a){return(null==a?"":""+a).replace(b.encReg,function(a){return b.encMap[a]||""})},b.arg="o",b.helper=",print=function(s,e){_s+=e?(s==null?'':s):_e(s);},include=function(s,d){_s+=tmpl(s,d);}","function"==typeof define&&define.amd?define(function(){return b}):a.tmpl=b}(this);
|
||||
Reference in New Issue
Block a user