芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/myvyralapp.com/assets/global/js/lightcase.min.js
!function(r){"use strict";var f={cache:{},support:{},objects:{},init:function(e){return this.each(function(){r(this).unbind("click.lightcase").bind("click.lightcase",function(t){t.preventDefault(),r(this).lightcase("start",e)})})},start:function(t){f.origin=lightcase.origin=this,f.settings=lightcase.settings=r.extend(!0,{idPrefix:"lightcase-",classPrefix:"lightcase-",attrPrefix:"lc-",transition:"elastic",transitionOpen:null,transitionClose:null,transitionIn:null,transitionOut:null,cssTransitions:!0,speedIn:250,speedOut:250,width:null,height:null,maxWidth:800,maxHeight:500,forceWidth:!1,forceHeight:!1,liveResize:!0,fullScreenModeForMobile:!0,mobileMatchExpression:/(iphone|ipod|ipad|android|blackberry|symbian)/,disableShrink:!1,fixedRatio:!0,shrinkFactor:.75,overlayOpacity:.9,slideshow:!1,slideshowAutoStart:!0,breakBeforeShow:!1,timeout:5e3,swipe:!0,useKeys:!0,useCategories:!0,useAsCollection:!1,navigateEndless:!0,closeOnOverlayClick:!0,title:null,caption:null,showTitle:!0,showCaption:!0,showSequenceInfo:!0,inline:{width:"auto",height:"auto"},ajax:{width:"auto",height:"auto",type:"get",dataType:"html",data:{}},iframe:{width:800,height:500,frameborder:0},flash:{width:400,height:205,wmode:"transparent"},video:{width:400,height:225,poster:"",preload:"auto",controls:!0,autobuffer:!0,autoplay:!0,loop:!1},attr:"data-rel",href:null,type:null,typeMapping:{image:"jpg,jpeg,gif,png,bmp",flash:"swf",video:"mp4,mov,ogv,ogg,webm",iframe:"html,php",ajax:"json,txt",inline:"#"},errorMessage:function(){return'
'+f.settings.labels.errorMessage+"
"},labels:{errorMessage:"Source could not be found...","sequenceInfo.of":" of ",close:"Close","navigator.prev":"Prev","navigator.next":"Next","navigator.play":"Play","navigator.pause":"Pause"},markup:function(){f.objects.body.append(f.objects.overlay=r('
'),f.objects.loading=r('
'),f.objects.case=r('
')),f.objects.case.after(f.objects.close=r('
'+f.settings.labels.close+"
"),f.objects.nav=r('
')),f.objects.nav.append(f.objects.prev=r('
'+f.settings.labels["navigator.prev"]+"
").hide(),f.objects.next=r('
'+f.settings.labels["navigator.next"]+"
").hide(),f.objects.play=r('
'+f.settings.labels["navigator.play"]+"
").hide(),f.objects.pause=r('
'+f.settings.labels["navigator.pause"]+"
").hide()),f.objects.case.append(f.objects.content=r('
'),f.objects.info=r('
')),f.objects.content.append(f.objects.contentInner=r('
')),f.objects.info.append(f.objects.sequenceInfo=r('
'),f.objects.title=r('
'),f.objects.caption=r('
'))},onInit:{},onStart:{},onBeforeCalculateDimensions:{},onAfterCalculateDimensions:{},onBeforeShow:{},onFinish:{},onResize:{},onClose:{},onCleanup:{}},t,f.origin.data?f.origin.data("lc-options"):{}),f.objects.document=r("html"),f.objects.body=r("body"),f._callHooks(f.settings.onInit),f.objectData=f._setObjectData(this),f._addElements(),f._open(),f.dimensions=f.getViewportDimensions()},get:function(t){return f.objects[t]},getObjectData:function(){return f.objectData},_setObjectData:function(t){var e=r(t),i={this:r(t),title:f.settings.title||e.attr(f._prefixAttributeName("title"))||e.attr("title"),caption:f.settings.caption||e.attr(f._prefixAttributeName("caption"))||e.children("img").attr("alt"),url:f._determineUrl(),requestType:f.settings.ajax.type,requestData:f.settings.ajax.data,requestDataType:f.settings.ajax.dataType,rel:e.attr(f._determineAttributeSelector()),type:f.settings.type||f._verifyDataType(f._determineUrl()),isPartOfSequence:f.settings.useAsCollection||f._isPartOfSequence(e.attr(f.settings.attr),":"),isPartOfSequenceWithSlideshow:f._isPartOfSequence(e.attr(f.settings.attr),":slideshow"),currentIndex:r(f._determineAttributeSelector()).index(e),sequenceLength:r(f._determineAttributeSelector()).length};return i.sequenceInfo=i.currentIndex+1+f.settings.labels["sequenceInfo.of"]+i.sequenceLength,i.prevIndex=i.currentIndex-1,i.nextIndex=i.currentIndex+1,i},_prefixAttributeName:function(t){return"data-"+f.settings.attrPrefix+t},_determineLinkTarget:function(){return f.settings.href||r(f.origin).attr(f._prefixAttributeName("href"))||r(f.origin).attr("href")},_determineAttributeSelector:function(){var t=r(f.origin),i="";if(void 0!==f.cache.selector)i=f.cache.selector;else if(!0===f.settings.useCategories&&t.attr(f._prefixAttributeName("categories"))){var e=t.attr(f._prefixAttributeName("categories")).split(" ");r.each(e,function(t,e){0
=e.density&&e.density>=o&&f._matchMedia()("screen and (min-width:"+e.width+"px)").matches&&e.width>=a&&(a=e.width,o=e.density,n=e.url)}}),n},_normalizeUrl:function(t){var c=/^\d+$/;return t.split(",").map(function(t){var o={width:0,density:0};return t.trim().split(/\s+/).forEach(function(t,e){if(0===e)return o.url=t;var i=t.substring(0,t.length-1),s=t[t.length-1],n=parseInt(i,10),a=parseFloat(i);"w"===s&&c.test(i)?o.width=n:"h"===s&&c.test(i)?o.height=n:"x"!==s||isNaN(a)||(o.density=a)}),o})},_isPartOfSequence:function(t,e){var i=r("["+f.settings.attr+'="'+t+'"]');return new RegExp(e).test(t)&&1
')).html(f._cloneObject(r(f.objectData.url))),r.each(f.settings.inline,function(t,e){i.attr(f._prefixAttributeName(t),e)});break;case"ajax":i=r('
'),r.each(f.settings.ajax,function(t,e){"data"!==t&&i.attr(f._prefixAttributeName(t),e)});break;case"flash":i=r('
'),r.each(f.settings.flash,function(t,e){i.attr(t,e)});break;case"video":(i=r("
")).attr("src",f.objectData.url),r.each(f.settings.video,function(t,e){i.attr(t,e)});break;default:(i=r("
")).attr({src:f.objectData.url}),r.each(f.settings.iframe,function(t,e){i.attr(t,e)})}f._addObject(i),f._loadObject(i)},_addObject:function(t){f.objects.contentInner.html(t),f._loading("start"),f._callHooks(f.settings.onStart),!0===f.settings.showSequenceInfo&&f.objectData.isPartOfSequence?(f.objects.sequenceInfo.html(f.objectData.sequenceInfo),f.objects.sequenceInfo.show()):(f.objects.sequenceInfo.empty(),f.objects.sequenceInfo.hide()),!0===f.settings.showTitle&&void 0!==f.objectData.title&&""!==f.objectData.title?(f.objects.title.html(f.objectData.title),f.objects.title.show()):(f.objects.title.empty(),f.objects.title.hide()),!0===f.settings.showCaption&&void 0!==f.objectData.caption&&""!==f.objectData.caption?(f.objects.caption.html(f.objectData.caption),f.objects.caption.show()):(f.objects.caption.empty(),f.objects.caption.hide())},_loadObject:function(s){switch(f.objectData.type){case"inline":r(f.objectData.url)?f._showContent(s):f.error();break;case"ajax":r.ajax(r.extend({},f.settings.ajax,{url:f.objectData.url,type:f.objectData.requestType,dataType:f.objectData.requestDataType,data:f.objectData.requestData,success:function(t,e,i){i.getResponseHeader("X-Ajax-Location")?(f.objectData.url=i.getResponseHeader("X-Ajax-Location"),f._loadObject(s)):("json"===f.objectData.requestDataType?f.objectData.data=t:s.html(t),f._showContent(s))},error:function(t,e,i){f.error()}}));break;case"flash":f._showContent(s);break;case"video":"function"==typeof s.get(0).canPlayType||0===f.objects.case.find("video").length?f._showContent(s):f.error();break;default:f.objectData.url?(s.on("load",function(){f._showContent(s)}),s.on("error",function(){f.error()})):f.error()}},error:function(){f.objectData.type="error";var t=r('
');t.html(f.settings.errorMessage),f.objects.contentInner.html(t),f._showContent(f.objects.contentInner)},_calculateDimensions:function(t){if(f._cleanupDimensions(),t){var e={ratio:1,objectWidth:t.attr("width")?t.attr("width"):t.attr(f._prefixAttributeName("width")),objectHeight:t.attr("height")?t.attr("height"):t.attr(f._prefixAttributeName("height"))};if(!f.settings.disableShrink)switch(e.maxWidth=parseInt(f.dimensions.windowWidth*f.settings.shrinkFactor),e.maxHeight=parseInt(f.dimensions.windowHeight*f.settings.shrinkFactor),e.maxWidth>f.settings.maxWidth&&(e.maxWidth=f.settings.maxWidth),e.maxHeight>f.settings.maxHeight&&(e.maxHeight=f.settings.maxHeight),e.differenceWidthAsPercent=parseInt(100/e.maxWidth*e.objectWidth),e.differenceHeightAsPercent=parseInt(100/e.maxHeight*e.objectHeight),f.objectData.type){case"image":case"flash":case"video":case"iframe":case"ajax":case"inline":if("image"===f.objectData.type||!0===f.settings.fixedRatio){100
e.differenceHeightAsPercent&&(e.objectWidth=e.maxWidth,e.objectHeight=parseInt(e.objectHeight/e.differenceWidthAsPercent*100)),100
e.differenceWidthAsPercent&&(e.objectWidth=parseInt(e.objectWidth/e.differenceHeightAsPercent*100),e.objectHeight=e.maxHeight),100
e.maxWidth&&(e.objectWidth=e.maxWidth);break;default:(isNaN(e.objectWidth)||e.objectWidth>e.maxWidth)&&!f.settings.forceWidth&&(e.objectWidth=e.maxWidth),(isNaN(e.objectHeight)&&"auto"!==e.objectHeight||e.objectHeight>e.maxHeight)&&!f.settings.forceHeight&&(e.objectHeight=e.maxHeight)}if(f.settings.forceWidth){try{e.objectWidth=f.settings[f.objectData.type].width}catch(t){e.objectWidth=f.settings.width||e.objectWidth}e.maxWidth=null}if(t.attr(f._prefixAttributeName("max-width"))&&(e.maxWidth=t.attr(f._prefixAttributeName("max-width"))),f.settings.forceHeight){try{e.objectHeight=f.settings[f.objectData.type].height}catch(t){e.objectHeight=f.settings.height||e.objectHeight}e.maxHeight=null}t.attr(f._prefixAttributeName("max-height"))&&(e.maxHeight=t.attr(f._prefixAttributeName("max-height"))),f._adjustDimensions(t,e)}},_adjustDimensions:function(t,e){t.css({width:e.objectWidth,height:e.objectHeight,"max-width":e.maxWidth,"max-height":e.maxHeight}),f.objects.contentInner.css({width:t.outerWidth(),height:t.outerHeight(),"max-width":"100%"}),f.objects.case.css({width:f.objects.contentInner.outerWidth(),"max-width":"100%"}),f.objects.case.css({"margin-top":parseInt(-f.objects.case.outerHeight()/2),"margin-left":parseInt(-f.objects.case.outerWidth()/2)})},_loading:function(t){"start"===t?(f.objects.case.addClass(f.settings.classPrefix+"loading"),f.objects.loading.show()):"end"===t&&(f.objects.case.removeClass(f.settings.classPrefix+"loading"),f.objects.loading.hide())},getViewportDimensions:function(){return{windowWidth:r(window).innerWidth(),windowHeight:r(window).innerHeight()}},_verifyDataUrl:function(t){return!(!t||void 0===t||""===t)&&(-1