From c26b4e439926472b98e025cb78916bc7ab01004c Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Sat, 20 Sep 2014 18:06:03 +0200 Subject: [PATCH] Fixed wrong header in photo-view --- assets/js/view.js | 5 +++-- assets/min/main.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/assets/js/view.js b/assets/js/view.js index add2ab6..ccd2a97 100644 --- a/assets/js/view.js +++ b/assets/js/view.js @@ -53,12 +53,11 @@ view = { var albumID = album.getID(); - lychee.header.removeClass("view"); - switch (mode) { case "albums": + lychee.header.removeClass("view"); $("#tools_album, #tools_photo").hide(); $("#tools_albums").show(); @@ -66,6 +65,7 @@ view = { case "album": + lychee.header.removeClass("view"); $("#tools_albums, #tools_photo").hide(); $("#tools_album").show(); @@ -84,6 +84,7 @@ view = { case "photo": + lychee.header.addClass("view"); $("#tools_albums, #tools_album").hide(); $("#tools_photo").show(); diff --git a/assets/min/main.js b/assets/min/main.js index eb81ec4..5f0aff5 100644 --- a/assets/min/main.js +++ b/assets/min/main.js @@ -3,4 +3,4 @@ function mobileBrowser(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test for(t=0;r>t;t++)o[t]&&o[t].finish&&o[t].finish.call(this);delete n.finish})}}),J.each(["toggle","show","hide"],function(e,t){var n=J.fn[t];J.fn[t]=function(e,o,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(N(t,!0),e,o,i)}}),J.each({slideDown:N("show"),slideUp:N("hide"),slideToggle:N("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){J.fn[e]=function(e,n,o){return this.animate(t,e,n,o)}}),J.timers=[],J.fx.tick=function(){var e,t=0,n=J.timers;for(Gt=J.now();t1)},removeAttr:function(e){return this.each(function(){J.removeAttr(this,e)})}}),J.extend({attr:function(e,t,n){var o,i,a=e.nodeType;return e&&3!==a&&8!==a&&2!==a?typeof e.getAttribute===jt?J.prop(e,t,n):(1===a&&J.isXMLDoc(e)||(t=t.toLowerCase(),o=J.attrHooks[t]||(J.expr.match.bool.test(t)?an:on)),void 0===n?o&&"get"in o&&null!==(i=o.get(e,t))?i:(i=J.find.attr(e,t),null==i?void 0:i):null!==n?o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:(e.setAttribute(t,n+""),n):void J.removeAttr(e,t)):void 0},removeAttr:function(e,t){var n,o,i=0,a=t&&t.match(ht);if(a&&1===e.nodeType)for(;n=a[i++];)o=J.propFix[n]||n,J.expr.match.bool.test(n)&&(e[o]=!1),e.removeAttribute(n)},attrHooks:{type:{set:function(e,t){if(!G.radioValue&&"radio"===t&&J.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}}}),an={set:function(e,t,n){return t===!1?J.removeAttr(e,n):e.setAttribute(n,n),n}},J.each(J.expr.match.bool.source.match(/\w+/g),function(e,t){var n=rn[t]||J.find.attr;rn[t]=function(e,t,o){var i,a;return o||(a=rn[t],rn[t]=i,i=null!=n(e,t,o)?t.toLowerCase():null,rn[t]=a),i}});var sn=/^(?:input|select|textarea|button)$/i;J.fn.extend({prop:function(e,t){return gt(this,J.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[J.propFix[e]||e]})}}),J.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,n){var o,i,a,r=e.nodeType;return e&&3!==r&&8!==r&&2!==r?(a=1!==r||!J.isXMLDoc(e),a&&(t=J.propFix[t]||t,i=J.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(o=i.set(e,n,t))?o:e[t]=n:i&&"get"in i&&null!==(o=i.get(e,t))?o:e[t]):void 0},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||sn.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),G.optSelected||(J.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),J.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){J.propFix[this.toLowerCase()]=this});var ln=/[\t\r\n\f]/g;J.fn.extend({addClass:function(e){var t,n,o,i,a,r,s="string"==typeof e&&e,l=0,u=this.length;if(J.isFunction(e))return this.each(function(t){J(this).addClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(ht)||[];u>l;l++)if(n=this[l],o=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(ln," "):" ")){for(a=0;i=t[a++];)o.indexOf(" "+i+" ")<0&&(o+=i+" ");r=J.trim(o),n.className!==r&&(n.className=r)}return this},removeClass:function(e){var t,n,o,i,a,r,s=0===arguments.length||"string"==typeof e&&e,l=0,u=this.length;if(J.isFunction(e))return this.each(function(t){J(this).removeClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(ht)||[];u>l;l++)if(n=this[l],o=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(ln," "):"")){for(a=0;i=t[a++];)for(;o.indexOf(" "+i+" ")>=0;)o=o.replace(" "+i+" "," ");r=e?J.trim(o):"",n.className!==r&&(n.className=r)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):this.each(J.isFunction(e)?function(n){J(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if("string"===n)for(var t,o=0,i=J(this),a=e.match(ht)||[];t=a[o++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else(n===jt||"boolean"===n)&&(this.className&&bt.set(this,"__className__",this.className),this.className=this.className||e===!1?"":bt.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,o=this.length;o>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(ln," ").indexOf(t)>=0)return!0;return!1}});var un=/\r/g;J.fn.extend({val:function(e){var t,n,o,i=this[0];return arguments.length?(o=J.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=o?e.call(this,n,J(this).val()):e,null==i?i="":"number"==typeof i?i+="":J.isArray(i)&&(i=J.map(i,function(e){return null==e?"":e+""})),t=J.valHooks[this.type]||J.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=J.valHooks[i.type]||J.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(un,""):null==n?"":n)):void 0}}),J.extend({valHooks:{option:{get:function(e){var t=J.find.attr(e,"value");return null!=t?t:J.trim(J.text(e))}},select:{get:function(e){for(var t,n,o=e.options,i=e.selectedIndex,a="select-one"===e.type||0>i,r=a?null:[],s=a?i+1:o.length,l=0>i?s:a?i:0;s>l;l++)if(n=o[l],!(!n.selected&&l!==i||(G.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&J.nodeName(n.parentNode,"optgroup"))){if(t=J(n).val(),a)return t;r.push(t)}return r},set:function(e,t){for(var n,o,i=e.options,a=J.makeArray(t),r=i.length;r--;)o=i[r],(o.selected=J.inArray(o.value,a)>=0)&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),J.each(["radio","checkbox"],function(){J.valHooks[this]={set:function(e,t){return J.isArray(t)?e.checked=J.inArray(J(e).val(),t)>=0:void 0}},G.checkOn||(J.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),J.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){J.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),J.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,o){return this.on(t,e,n,o)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var cn=J.now(),dn=/\?/;J.parseJSON=function(e){return JSON.parse(e+"")},J.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{n=new DOMParser,t=n.parseFromString(e,"text/xml")}catch(o){t=void 0}return(!t||t.getElementsByTagName("parsererror").length)&&J.error("Invalid XML: "+e),t};var pn,hn,fn=/#.*$/,mn=/([?&])_=[^&]*/,gn=/^(.*?):[ \t]*([^\r\n]*)$/gm,bn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,yn=/^\/\//,wn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,xn={},Tn={},$n="*/".concat("*");try{hn=location.href}catch(kn){hn=Q.createElement("a"),hn.href="",hn=hn.href}pn=wn.exec(hn.toLowerCase())||[],J.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:hn,type:"GET",isLocal:bn.test(pn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$n,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":J.parseJSON,"text xml":J.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?O(O(e,J.ajaxSettings),t):O(J.ajaxSettings,e)},ajaxPrefilter:P(xn),ajaxTransport:P(Tn),ajax:function(e,t){function n(e,t,n,r){var l,c,b,v,w,T=t;2!==y&&(y=2,s&&clearTimeout(s),o=void 0,a=r||"",x.readyState=e>0?4:0,l=e>=200&&300>e||304===e,n&&(v=H(d,x,n)),v=q(d,v,x,l),l?(d.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(J.lastModified[i]=w),w=x.getResponseHeader("etag"),w&&(J.etag[i]=w)),204===e||"HEAD"===d.type?T="nocontent":304===e?T="notmodified":(T=v.state,c=v.data,b=v.error,l=!b)):(b=T,(e||!T)&&(T="error",0>e&&(e=0))),x.status=e,x.statusText=(t||T)+"",l?f.resolveWith(p,[c,T,x]):f.rejectWith(p,[x,T,b]),x.statusCode(g),g=void 0,u&&h.trigger(l?"ajaxSuccess":"ajaxError",[x,d,l?c:b]),m.fireWith(p,[x,T]),u&&(h.trigger("ajaxComplete",[x,d]),--J.active||J.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var o,i,a,r,s,l,u,c,d=J.ajaxSetup({},t),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?J(p):J.event,f=J.Deferred(),m=J.Callbacks("once memory"),g=d.statusCode||{},b={},v={},y=0,w="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===y){if(!r)for(r={};t=gn.exec(a);)r[t[1].toLowerCase()]=t[2];t=r[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===y?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return y||(e=v[n]=v[n]||e,b[e]=t),this},overrideMimeType:function(e){return y||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>y)for(t in e)g[t]=[g[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||w;return o&&o.abort(t),n(0,t),this}};if(f.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,d.url=((e||d.url||hn)+"").replace(fn,"").replace(yn,pn[1]+"//"),d.type=t.method||t.type||d.method||d.type,d.dataTypes=J.trim(d.dataType||"*").toLowerCase().match(ht)||[""],null==d.crossDomain&&(l=wn.exec(d.url.toLowerCase()),d.crossDomain=!(!l||l[1]===pn[1]&&l[2]===pn[2]&&(l[3]||("http:"===l[1]?"80":"443"))===(pn[3]||("http:"===pn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=J.param(d.data,d.traditional)),L(xn,d,t,x),2===y)return x;u=d.global,u&&0===J.active++&&J.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!vn.test(d.type),i=d.url,d.hasContent||(d.data&&(i=d.url+=(dn.test(i)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=mn.test(i)?i.replace(mn,"$1_="+cn++):i+(dn.test(i)?"&":"?")+"_="+cn++)),d.ifModified&&(J.lastModified[i]&&x.setRequestHeader("If-Modified-Since",J.lastModified[i]),J.etag[i]&&x.setRequestHeader("If-None-Match",J.etag[i])),(d.data&&d.hasContent&&d.contentType!==!1||t.contentType)&&x.setRequestHeader("Content-Type",d.contentType),x.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+$n+"; q=0.01":""):d.accepts["*"]);for(c in d.headers)x.setRequestHeader(c,d.headers[c]);if(d.beforeSend&&(d.beforeSend.call(p,x,d)===!1||2===y))return x.abort();w="abort";for(c in{success:1,error:1,complete:1})x[c](d[c]);if(o=L(Tn,d,t,x)){x.readyState=1,u&&h.trigger("ajaxSend",[x,d]),d.async&&d.timeout>0&&(s=setTimeout(function(){x.abort("timeout")},d.timeout));try{y=1,o.send(b,n)}catch(T){if(!(2>y))throw T;n(-1,T)}}else n(-1,"No Transport");return x},getJSON:function(e,t,n){return J.get(e,t,n,"json")},getScript:function(e,t){return J.get(e,void 0,t,"script")}}),J.each(["get","post"],function(e,t){J[t]=function(e,n,o,i){return J.isFunction(n)&&(i=i||o,o=n,n=void 0),J.ajax({url:e,type:t,dataType:i,data:n,success:o})}}),J.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){J.fn[t]=function(e){return this.on(t,e)}}),J._evalUrl=function(e){return J.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},J.fn.extend({wrapAll:function(e){var t;return J.isFunction(e)?this.each(function(t){J(this).wrapAll(e.call(this,t))}):(this[0]&&(t=J(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return this.each(J.isFunction(e)?function(t){J(this).wrapInner(e.call(this,t))}:function(){var t=J(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=J.isFunction(e);return this.each(function(n){J(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){J.nodeName(this,"body")||J(this).replaceWith(this.childNodes)}).end()}}),J.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0},J.expr.filters.visible=function(e){return!J.expr.filters.hidden(e)};var jn=/%20/g,Cn=/\[\]$/,Dn=/\r?\n/g,Sn=/^(?:submit|button|image|reset|file)$/i,An=/^(?:input|select|textarea|keygen)/i;J.param=function(e,t){var n,o=[],i=function(e,t){t=J.isFunction(t)?t():null==t?"":t,o[o.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=J.ajaxSettings&&J.ajaxSettings.traditional),J.isArray(e)||e.jquery&&!J.isPlainObject(e))J.each(e,function(){i(this.name,this.value)});else for(n in e)R(n,e[n],t,i);return o.join("&").replace(jn,"+")},J.fn.extend({serialize:function(){return J.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=J.prop(this,"elements");return e?J.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!J(this).is(":disabled")&&An.test(this.nodeName)&&!Sn.test(e)&&(this.checked||!kt.test(e))}).map(function(e,t){var n=J(this).val();return null==n?null:J.isArray(n)?J.map(n,function(e){return{name:t.name,value:e.replace(Dn,"\r\n")}}):{name:t.name,value:n.replace(Dn,"\r\n")}}).get()}}),J.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var Nn=0,In={},_n={0:200,1223:204},Mn=J.ajaxSettings.xhr();e.ActiveXObject&&J(e).on("unload",function(){for(var e in In)In[e]()}),G.cors=!!Mn&&"withCredentials"in Mn,G.ajax=Mn=!!Mn,J.ajaxTransport(function(e){var t;return G.cors||Mn&&!e.crossDomain?{send:function(n,o){var i,a=e.xhr(),r=++Nn;if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)a[i]=e.xhrFields[i];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(i in n)a.setRequestHeader(i,n[i]);t=function(e){return function(){t&&(delete In[r],t=a.onload=a.onerror=null,"abort"===e?a.abort():"error"===e?o(a.status,a.statusText):o(_n[a.status]||a.status,a.statusText,"string"==typeof a.responseText?{text:a.responseText}:void 0,a.getAllResponseHeaders()))}},a.onload=t(),a.onerror=t("error"),t=In[r]=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(s){if(t)throw s}},abort:function(){t&&t()}}:void 0}),J.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return J.globalEval(e),e}}}),J.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),J.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(o,i){t=J("