Replaced lychee.goto('') with lychee.goto()

This commit is contained in:
Tobias Reich 2016-03-06 18:19:27 +01:00
parent c594210579
commit 20963ac463
5 changed files with 7 additions and 8 deletions

View File

@ -55,7 +55,7 @@ album.load = function(albumID, refresh = false) {
} else {
// Album not public
lychee.content.show()
lychee.goto('')
lychee.goto()
}
return false
}
@ -178,7 +178,7 @@ album.delete = function(albumIDs) {
} else {
albums.refresh()
lychee.goto('')
lychee.goto()
}

View File

@ -52,7 +52,7 @@ header.bind = function() {
header.dom('#button_trash') .on(eventName, function() { photo.delete([ photo.getID() ]) })
header.dom('#button_archive') .on(eventName, function() { album.getArchive(album.getID()) })
header.dom('#button_star') .on(eventName, function() { photo.setStar([ photo.getID() ]) })
header.dom('#button_back_home') .on(eventName, function() { lychee.goto('') })
header.dom('#button_back_home') .on(eventName, function() { lychee.goto() })
header.dom('#button_back') .on(eventName, function() { lychee.goto(album.getID()) })
header.dom('.header__search').on('keyup click', function() { search.find($(this).val()) })

View File

@ -68,7 +68,7 @@ $(document).ready(function() {
if (basicModal.visible()===true) basicModal.cancel()
else if (visible.contextMenu()) contextMenu.close()
else if (visible.photo()) lychee.goto(album.getID())
else if (visible.album()) lychee.goto('')
else if (visible.album()) lychee.goto()
else if (visible.albums() && header.dom('.header__search').val().length!==0) search.reset()
return false
})

View File

@ -156,10 +156,9 @@ lychee.logout = function() {
}
lychee.goto = function(url) {
lychee.goto = function(url = '') {
if (url===undefined) url = '#'
else url = '#' + url
url = '#' + url
history.pushState(null, null, url)
lychee.load()

View File

@ -386,7 +386,7 @@ upload.start = {
// Go back to the album overview to show the imported albums
if (visible.albums()) lychee.load()
else lychee.goto('')
else lychee.goto()
basicModal.close()