From b66bdce28d848649591a35ac7bbc8e45b46d0a26 Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Sun, 17 Aug 2014 19:33:22 +0200 Subject: [PATCH] Added downloadable to Infobox and improved naming --- assets/js/build.js | 33 +++++++++++++++++++-------------- assets/min/main.js | 8 ++++---- assets/min/view.js | 8 ++++---- 3 files changed, 27 insertions(+), 22 deletions(-) diff --git a/assets/js/build.js b/assets/js/build.js index 00e9527..dbe50ed 100644 --- a/assets/js/build.js +++ b/assets/js/build.js @@ -309,13 +309,13 @@ build = { switch (photoJSON.public) { case "0": - public = "Private"; + public = "No"; break; case "1": - public = "Public"; + public = "Yes"; break; case "2": - public = "Public (Album)"; + public = "Yes (Album)"; break; default: public = "-"; @@ -354,7 +354,7 @@ build = { infos = infos.concat([ ["", "Share"], - ["Visibility", public] + ["Public", public] ]); $.each(infos, function(index) { @@ -401,8 +401,9 @@ build = { if (!albumJSON) return ""; var infobox = "", - public, - password, + public = "-", + password = "-", + downloadable = "-", editTitleHTML, editDescriptionHTML, infos; @@ -412,13 +413,10 @@ build = { switch (albumJSON.public) { case "0": - public = "Private"; + public = "No"; break; case "1": - public = "Public"; - break; - default: - public = "-"; + public = "Yes"; break; } @@ -429,8 +427,14 @@ build = { case true: password = "Yes"; break; - default: - password = "-"; + } + + switch (albumJSON.downloadable) { + case "0": + downloadable = "No"; + break; + case "1": + downloadable = "Yes"; break; } @@ -445,7 +449,8 @@ build = { ["Created", albumJSON.sysdate], ["Images", albumJSON.num], ["", "Share"], - ["Visibility", public], + ["Public", public], + ["Downloadable", downloadable], ["Password", password] ]; diff --git a/assets/min/main.js b/assets/min/main.js index b94196e..dc6d198 100644 --- a/assets/min/main.js +++ b/assets/min/main.js @@ -1,6 +1,6 @@ -function mobileBrowser(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)?!0:!1}function gup(e){e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var t="[\\?&]"+e+"=([^&#]*)",n=new RegExp(t),o=n.exec(window.location.href);return null===o?"":o[1]}!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=e.length,n=J.type(e);return"function"===n||J.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function o(e,t,n){if(J.isFunction(t))return J.grep(e,function(e,o){return!!t.call(e,o,e)!==n});if(t.nodeType)return J.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return J.filter(t,e,n);t=J.filter(t,e)}return J.grep(e,function(e){return z.call(t,e)>=0!==n})}function i(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function a(e){var t=ft[e]={};return J.each(e.match(ht)||[],function(e,n){t[n]=!0}),t}function r(){Q.removeEventListener("DOMContentLoaded",r,!1),e.removeEventListener("load",r,!1),J.ready()}function s(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=J.expando+Math.random()}function l(e,t,n){var o;if(void 0===n&&1===e.nodeType)if(o="data-"+t.replace(wt,"-$1").toLowerCase(),n=e.getAttribute(o),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:yt.test(n)?J.parseJSON(n):n}catch(i){}bt.set(e,t,n)}else n=void 0;return n}function u(){return!0}function c(){return!1}function d(){try{return Q.activeElement}catch(e){}}function p(e,t){return J.nodeName(e,"table")&&J.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function h(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function f(e){var t=Lt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n=0,o=e.length;o>n;n++)vt.set(e[n],"globalEval",!t||vt.get(t[n],"globalEval"))}function g(e,t){var n,o,i,a,r,s,l,u;if(1===t.nodeType){if(vt.hasData(e)&&(a=vt.access(e),r=vt.set(t,a),u=a.events)){delete r.handle,r.events={};for(i in u)for(n=0,o=u[i].length;o>n;n++)J.event.add(t,i,u[i][n])}bt.hasData(e)&&(s=bt.access(e),l=J.extend({},s),bt.set(t,l))}}function v(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&J.nodeName(e,t)?J.merge([e],n):n}function b(e,t){var n=t.nodeName.toLowerCase();"input"===n&&kt.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function y(t,n){var o,i=J(n.createElement(t)).appendTo(n.body),a=e.getDefaultComputedStyle&&(o=e.getDefaultComputedStyle(i[0]))?o.display:J.css(i[0],"display");return i.detach(),a}function w(e){var t=Q,n=Rt[e];return n||(n=y(e,t),"none"!==n&&n||(qt=(qt||J("