|
@@ -71,8 +71,8 @@ photo.preloadNext = function(photoID) {
|
|
album.json.content[photoID] &&
|
|
album.json.content[photoID] &&
|
|
album.json.content[photoID].nextPhoto!='') {
|
|
album.json.content[photoID].nextPhoto!='') {
|
|
|
|
|
|
- let nextPhoto = album.json.content[photoID].nextPhoto,
|
|
+ let nextPhoto = album.json.content[photoID].nextPhoto
|
|
- url = album.json.content[nextPhoto].url
|
|
+ let url = album.json.content[nextPhoto].url
|
|
|
|
|
|
$('head [data-prefetch]').remove()
|
|
$('head [data-prefetch]').remove()
|
|
$('head').append(`<link data-prefetch rel="prefetch" href="${ url }">`)
|
|
$('head').append(`<link data-prefetch rel="prefetch" href="${ url }">`)
|
|
@@ -152,7 +152,7 @@ photo.next = function(animate) {
|
|
photo.duplicate = function(photoIDs) {
|
|
photo.duplicate = function(photoIDs) {
|
|
|
|
|
|
if (!photoIDs) return false
|
|
if (!photoIDs) return false
|
|
- if (photoIDs instanceof Array===false) photoIDs = [photoIDs]
|
|
+ if (photoIDs instanceof Array===false) photoIDs = [ photoIDs ]
|
|
|
|
|
|
albums.refresh()
|
|
albums.refresh()
|
|
|
|
|
|
@@ -171,13 +171,13 @@ photo.duplicate = function(photoIDs) {
|
|
|
|
|
|
photo.delete = function(photoIDs) {
|
|
photo.delete = function(photoIDs) {
|
|
|
|
|
|
- let action = {},
|
|
+ let action = {}
|
|
- cancel = {},
|
|
+ let cancel = {}
|
|
- msg = '',
|
|
+ let msg = ''
|
|
- photoTitle = ''
|
|
+ let photoTitle = ''
|
|
|
|
|
|
if (!photoIDs) return false
|
|
if (!photoIDs) return false
|
|
- if (photoIDs instanceof Array===false) photoIDs = [photoIDs]
|
|
+ if (photoIDs instanceof Array===false) photoIDs = [ photoIDs ]
|
|
|
|
|
|
if (photoIDs.length===1) {
|
|
if (photoIDs.length===1) {
|
|
|
|
|
|
@@ -192,8 +192,8 @@ photo.delete = function(photoIDs) {
|
|
|
|
|
|
action.fn = function() {
|
|
action.fn = function() {
|
|
|
|
|
|
- let nextPhoto,
|
|
+ let nextPhoto
|
|
- previousPhoto
|
|
+ let previousPhoto
|
|
|
|
|
|
basicModal.close()
|
|
basicModal.close()
|
|
|
|
|
|
@@ -269,11 +269,11 @@ photo.delete = function(photoIDs) {
|
|
|
|
|
|
photo.setTitle = function(photoIDs) {
|
|
photo.setTitle = function(photoIDs) {
|
|
|
|
|
|
- let oldTitle = '',
|
|
+ let oldTitle = ''
|
|
- msg = ''
|
|
+ let msg = ''
|
|
|
|
|
|
if (!photoIDs) return false
|
|
if (!photoIDs) return false
|
|
- if (photoIDs instanceof Array===false) photoIDs = [photoIDs]
|
|
+ if (photoIDs instanceof Array===false) photoIDs = [ photoIDs ]
|
|
|
|
|
|
if (photoIDs.length===1) {
|
|
if (photoIDs.length===1) {
|
|
|
|
|
|
@@ -300,8 +300,8 @@ photo.setTitle = function(photoIDs) {
|
|
})
|
|
})
|
|
|
|
|
|
let params = {
|
|
let params = {
|
|
- photoIDs: photoIDs.join(),
|
|
+ photoIDs : photoIDs.join(),
|
|
- title: newTitle
|
|
+ title : newTitle
|
|
}
|
|
}
|
|
|
|
|
|
api.post('Photo::setTitle', params, function(data) {
|
|
api.post('Photo::setTitle', params, function(data) {
|
|
@@ -335,11 +335,11 @@ photo.setTitle = function(photoIDs) {
|
|
|
|
|
|
photo.setAlbum = function(photoIDs, albumID) {
|
|
photo.setAlbum = function(photoIDs, albumID) {
|
|
|
|
|
|
- let nextPhoto,
|
|
+ let nextPhoto
|
|
- previousPhoto
|
|
+ let previousPhoto
|
|
|
|
|
|
if (!photoIDs) return false
|
|
if (!photoIDs) return false
|
|
- if (photoIDs instanceof Array===false) photoIDs = [photoIDs]
|
|
+ if (photoIDs instanceof Array===false) photoIDs = [ photoIDs ]
|
|
|
|
|
|
if (visible.photo) lychee.goto(album.getID())
|
|
if (visible.photo) lychee.goto(album.getID())
|
|
|
|
|
|
@@ -416,7 +416,7 @@ photo.setPublic = function(photoID, e) {
|
|
}
|
|
}
|
|
|
|
|
|
basicModal.show({
|
|
basicModal.show({
|
|
- body: "<p>This photo is located in a public album. To make this photo private or public, edit the visibility of the associated album.</p>",
|
|
+ body: '<p>This photo is located in a public album. To make this photo private or public, edit the visibility of the associated album.</p>',
|
|
buttons: {
|
|
buttons: {
|
|
action: {
|
|
action: {
|
|
title: 'Show Album',
|
|
title: 'Show Album',
|
|
@@ -500,11 +500,11 @@ photo.setDescription = function(photoID) {
|
|
|
|
|
|
photo.editTags = function(photoIDs) {
|
|
photo.editTags = function(photoIDs) {
|
|
|
|
|
|
- let oldTags = '',
|
|
+ let oldTags = ''
|
|
- msg = ''
|
|
+ let msg = ''
|
|
|
|
|
|
if (!photoIDs) return false
|
|
if (!photoIDs) return false
|
|
- if (photoIDs instanceof Array===false) photoIDs = [photoIDs]
|
|
+ if (photoIDs instanceof Array===false) photoIDs = [ photoIDs ]
|
|
|
|
|
|
|
|
|
|
if (visible.photo()) oldTags = photo.json.tags
|
|
if (visible.photo()) oldTags = photo.json.tags
|
|
@@ -591,14 +591,14 @@ photo.deleteTag = function(photoID, index) {
|
|
|
|
|
|
|
|
|
|
photo.json.tags = tags.toString()
|
|
photo.json.tags = tags.toString()
|
|
- photo.setTags([photoID], photo.json.tags)
|
|
+ photo.setTags([ photoID ], photo.json.tags)
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
photo.share = function(photoID, service) {
|
|
photo.share = function(photoID, service) {
|
|
|
|
|
|
- let link = '',
|
|
+ let link = ''
|
|
- url = photo.getViewLink(photoID)
|
|
+ let url = photo.getViewLink(photoID)
|
|
|
|
|
|
switch (service) {
|
|
switch (service) {
|
|
case 'twitter':
|
|
case 'twitter':
|
|
@@ -627,8 +627,8 @@ photo.share = function(photoID, service) {
|
|
|
|
|
|
photo.getArchive = function(photoID) {
|
|
photo.getArchive = function(photoID) {
|
|
|
|
|
|
- let link,
|
|
+ let link
|
|
- url = `${ api.path }?function=Photo::getArchive&photoID=${ photoID }`
|
|
+ let url = `${ api.path }?function=Photo::getArchive&photoID=${ photoID }`
|
|
|
|
|
|
if (location.href.indexOf('index.html')>0) link = location.href.replace(location.hash, '').replace('index.html', url)
|
|
if (location.href.indexOf('index.html')>0) link = location.href.replace(location.hash, '').replace('index.html', url)
|
|
else link = location.href.replace(location.hash, '') + url
|
|
else link = location.href.replace(location.hash, '') + url
|