添加项目文件。
This commit is contained in:
1 parent
05e131ca4e
commit
514d6f5255
1162 files changed
+81255
No files matched your search
+3
@@ -0,0 +1,3 @@
|
||||
/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */
|
||||
;!function(e,t){var n,i={},r=function(e,t){var n,i,r;if("string"==typeof e)return s(e);for(n=[],i=e.length,r=0;i>r;r++)n.push(s(e[r]));return t.apply(null,n)},o=function(e,t,n){2===arguments.length&&(n=t,t=null),r(t||[],function(){a(e,n,arguments)})},a=function(e,t,n){var o,a={exports:t};"function"==typeof t&&(n.length||(n=[r,a.exports,a]),o=t.apply(null,n),void 0!==o&&(a.exports=o)),i[e]=a.exports},s=function(t){var n=i[t]||e[t];if(!n)throw new Error("`"+t+"` is undefined");return n},u=function(e){var t,n,r,o,a,s;s=function(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)};for(t in i)if(n=e,i.hasOwnProperty(t)){for(r=t.split("/"),a=s(r.pop());o=s(r.shift());)n[o]=n[o]||{},n=n[o];n[a]=i[t]}},c=t(e,o,r);u(c),"object"==typeof module&&"object"==typeof module.exports?module.exports=c:"function"==typeof define&&define.amd?define([],c):(n=e.WebUploader,e.WebUploader=c,e.WebUploader.noConflict=function(){e.WebUploader=n})}(this,function(e,t,n){return t("dollar-third",[],function(){return e.jQuery||e.Zepto}),t("dollar",["dollar-third"],function(e){return e}),t("promise-third",["dollar"],function(e){return{Deferred:e.Deferred,when:e.when,isPromise:function(e){return e&&"function"==typeof e.then}}}),t("promise",["promise-third"],function(e){return e}),t("base",["dollar","promise"],function(t,n){function i(e){return function(){return s.apply(e,arguments)}}function r(e,t){return function(){return e.apply(t,arguments)}}function o(e){var t;return Object.create?Object.create(e):(t=function(){},t.prototype=e,new t)}var a=function(){},s=Function.call;return{version:"0.1.2",$:t,Deferred:n.Deferred,isPromise:n.isPromise,when:n.when,browser:function(e){var t={},n=e.match(/WebKit\/([\d.]+)/),i=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),r=e.match(/MSIE\s([\d\.]+)/)||e.match(/(?:trident)(?:.*rv:([\w.]+))?/i),o=e.match(/Firefox\/([\d.]+)/),a=e.match(/Safari\/([\d.]+)/),s=e.match(/OPR\/([\d.]+)/);return n&&(t.webkit=parseFloat(n[1])),i&&(t.chrome=parseFloat(i[1])),r&&(t.ie=parseFloat(r[1])),o&&(t.firefox=parseFloat(o[1])),a&&(t.safari=parseFloat(a[1])),s&&(t.opera=parseFloat(s[1])),t}(navigator.userAgent),os:function(e){var t={},n=e.match(/(?:Android);?[\s\/]+([\d.]+)?/),i=e.match(/(?:iPad|iPod|iPhone).*OS\s([\d_]+)/);return n&&(t.android=parseFloat(n[1])),i&&(t.ios=parseFloat(i[1].replace(/_/g,"."))),t}(navigator.userAgent),inherits:function(e,n,i){var r;return"function"==typeof n?(r=n,n=null):r=n&&n.hasOwnProperty("constructor")?n.constructor:function(){return e.apply(this,arguments)},t.extend(!0,r,e,i||{}),r.__super__=e.prototype,r.prototype=o(e.prototype),n&&t.extend(!0,r.prototype,n),r},noop:a,bindFn:r,log:function(){return e.console?r(console.log,console):a}(),nextTick:function(){return function(e){setTimeout(e,1)}}(),slice:i([].slice),guid:function(){var e=0;return function(t){for(var n=(+new Date).toString(32),i=0;5>i;i++)n+=Math.floor(65535*Math.random()).toString(32);return(t||"wu_")+n+(e++).toString(32)}}(),formatSize:function(e,t,n){var i;for(n=n||["B","K","M","G","TB"];(i=n.shift())&&e>1024;)e/=1024;return("B"===i?e:e.toFixed(t||2))+i}}}),t("mediator",["base"],function(e){function t(e,t,n,i){return o.grep(e,function(e){return!(!e||t&&e.e!==t||n&&e.cb!==n&&e.cb._cb!==n||i&&e.ctx!==i)})}function n(e,t,n){o.each((e||"").split(s),function(e,i){n(i,t)})}function i(e,t){for(var n,i=!1,r=-1,o=e.length;++r<o;)if(n=e[r],n.cb.apply(n.ctx2,t)===!1){i=!0;break}return!i}var r,o=e.$,a=[].slice,s=/\s+/;return r={on:function(e,t,i){var r,o=this;return t?(r=this._events||(this._events=[]),n(e,t,function(e,t){var n={e:e};n.cb=t,n.ctx=i,n.ctx2=i||o,n.id=r.length,r.push(n)}),this):this},once:function(e,t,i){var r=this;return t?(n(e,t,function(e,t){var n=function(){return r.off(e,n),t.apply(i||r,arguments)};n._cb=t,r.on(e,n,i)}),r):r},off:function(e,i,r){var a=this._events;return a?e||i||r?(n(e,i,function(e,n){o.each(t(a,e,n,r),function(){delete a[this.id]})}),this):(this._events=[],this):this},trigger:function(e){var n,r,o;return this._events&&e?(n=a.call(arguments,1),r=t(this._events,e),o=t(this._events,"all"),i(r,n)&&i(o,arguments)):this}},o.extend({installTo:function(e){return o.extend(e,r)}},r)}),t("uploader",["base","mediator"],function(e,t){function n(e){this.options=i.extend(!0,{},n.options,e),this._init(this.options)}var i=e.$;return n.options={},t.installTo(n.prototype),i.each({upload:"start-upload",stop:"stop-upload",getFile:"get-file",getFiles:"get-files",addFile:"add-file",addFiles:"add-file",sort:"sort-files",removeFile:"remove-file",skipFile:"skip-file",retry:"retry",isInProgress:"is-in-progress",makeThumb:"make-thumb",getDimension:"get-dimension",addButton:"add-btn",getRuntimeType:"get-runtime-type",refresh:"refresh",disable:"disable",enable:"enable",reset:"reset"},function(e,t){n.prototype[e]=function(){return this.request(t,arguments)}}),i.extend(n.prototype,{state:"pending",_init:function(e){var t=this;t.request("init",e,function(){t.state="ready",t.trigger("ready")})},option:function(e,t){var n=this.optLine truncated
|
||||
this.dragLeaveHandler=e.bindFn(this._dragLeaveHandler,this),this.dropHandler=e.bindFn(this._dropHandler,this),this.dndOver=!1,t.on("dragenter",this.dragEnterHandler),t.on("dragover",this.dragOverHandler),t.on("dragleave",this.dragLeaveHandler),t.on("drop",this.dropHandler),this.options.disableGlobalDnd&&(i(document).on("dragover",this.dragOverHandler),i(document).on("drop",this.dropHandler))},_dragEnterHandler:function(e){var t,n=this,i=n._denied||!1;return e=e.originalEvent||e,n.dndOver||(n.dndOver=!0,t=e.dataTransfer.items,t&&t.length&&(n._denied=i=!n.trigger("accept",t)),n.elem.addClass(r+"over"),n.elem[i?"addClass":"removeClass"](r+"denied")),e.dataTransfer.dropEffect=i?"none":"copy",!1},_dragOverHandler:function(e){var t=this.elem.parent().get(0);return!(t&&!i.contains(t,e.currentTarget))&&(clearTimeout(this._leaveTimer),this._dragEnterHandler.call(this,e),!1)},_dragLeaveHandler:function(){var e,t=this;return e=function(){t.dndOver=!1,t.elem.removeClass(r+"over "+r+"denied")},clearTimeout(t._leaveTimer),t._leaveTimer=setTimeout(e,100),!1},_dropHandler:function(e){var t=this,o=t.getRuid(),a=t.elem.parent().get(0);return!(a&&!i.contains(a,e.currentTarget))&&(t._getTansferFiles(e,function(e){t.trigger("drop",i.map(e,function(e){return new n(o,e)}))}),t.dndOver=!1,t.elem.removeClass(r+"over"),!1)},_getTansferFiles:function(t,n){var i,r,o,a,s,u,c,l,f=[],d=[];for(t=t.originalEvent||t,o=t.dataTransfer,i=o.items,r=o.files,l=!(!i||!i[0].webkitGetAsEntry),u=0,c=r.length;c>u;u++)a=r[u],s=i&&i[u],l&&s.webkitGetAsEntry().isDirectory?d.push(this._traverseDirectoryTree(s.webkitGetAsEntry(),f)):f.push(a);e.when.apply(e,d).done(function(){f.length&&n(f)})},_traverseDirectoryTree:function(t,n){var i=e.Deferred(),r=this;return t.isFile?t.file(function(e){n.push(e),i.resolve()}):t.isDirectory&&t.createReader().readEntries(function(t){var o,a=t.length,s=[],u=[];for(o=0;a>o;o++)s.push(r._traverseDirectoryTree(t[o],u));e.when.apply(e,s).then(function(){n.push.apply(n,u),i.resolve()},i.reject)}),i.promise()},destroy:function(){var e=this.elem;e.off("dragenter",this.dragEnterHandler),e.off("dragover",this.dragEnterHandler),e.off("dragleave",this.dragLeaveHandler),e.off("drop",this.dropHandler),this.options.disableGlobalDnd&&(i(document).off("dragover",this.dragOverHandler),i(document).off("drop",this.dropHandler))}})}),t("runtime/html5/filepaste",["base","runtime/html5/runtime","lib/file"],function(e,t,n){return t.register("FilePaste",{init:function(){var t,n,i,r,o=this.options,a=this.elem=o.container,s=".*";if(o.accept){for(t=[],n=0,i=o.accept.length;i>n;n++)r=o.accept[n].mimeTypes,r&&t.push(r);t.length&&(s=t.join(","),s=s.replace(/,/g,"|").replace(/\*/g,".*"))}this.accept=s=new RegExp(s,"i"),this.hander=e.bindFn(this._pasteHander,this),a.on("paste",this.hander)},_pasteHander:function(e){var t,i,r,o,a,s=[],u=this.getRuid();for(e=e.originalEvent||e,t=e.clipboardData.items,o=0,a=t.length;a>o;o++)i=t[o],"file"===i.kind&&(r=i.getAsFile())&&s.push(new n(u,r));s.length&&(e.preventDefault(),e.stopPropagation(),this.trigger("paste",s))},destroy:function(){this.elem.off("paste",this.hander)}})}),t("runtime/html5/filepicker",["base","runtime/html5/runtime"],function(e,t){var n=e.$;return t.register("FilePicker",{init:function(){var e,t,i,r,o=this.getRuntime().getContainer(),a=this,s=a.owner,u=a.options,c=n(document.createElement("label")),l=n(document.createElement("input"));if(l.attr("type","file"),l.attr("name",u.name),l.addClass("webuploader-element-invisible"),c.on("click",function(){l.trigger("click")}),c.css({opacity:0,width:"100%",height:"100%",display:"block",cursor:"pointer",background:"#ffffff"}),u.multiple&&l.attr("multiple","multiple"),u.accept&&u.accept.length>0){for(e=[],t=0,i=u.accept.length;i>t;t++)e.push(u.accept[t].mimeTypes);l.attr("accept",e.join(","))}o.append(l),o.append(c),r=function(e){s.trigger(e.type)},l.on("change",function(e){var t,i=arguments.callee;a.files=e.target.files,t=this.cloneNode(!0),this.parentNode.replaceChild(t,this),l.off(),l=n(t).on("change",i).on("mouseenter mouseleave",r),s.trigger("change")}),c.on("mouseenter mouseleave",r)},getFiles:function(){return this.files},destroy:function(){}})}),t("runtime/html5/util",["base"],function(t){var n=e.createObjectURL&&e||e.URL&&URL.revokeObjectURL&&URL||e.webkitURL,i=t.noop,r=i;return n&&(i=function(){return n.createObjectURL.apply(n,arguments)},r=function(){return n.revokeObjectURL.apply(n,arguments)}),{createObjectURL:i,revokeObjectURL:r,dataURL2Blob:function(e){var t,n,i,r,o,a;for(a=e.split(","),t=~a[0].indexOf("base64")?atob(a[1]):decodeURIComponent(a[1]),i=new ArrayBuffer(t.length),n=new Uint8Array(i),r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return o=a[0].split(":")[1].split(";")[0],this.arrayBufferToBlob(i,o)},dataURL2ArrayBuffer:function(e){var t,n,i,r;for(r=e.split(","),t=~r[0].indexOf("base64")?atob(r[1]):decodeURIComponent(r[1]),n=new Uint8Array(t.length),i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n.buffer},arrayBufferToBlob:function(t,n){Line truncated
|
||||
Reference in new issue
Block a user