From 20963ac46316de7f7266d685d3d0879931e02d11 Mon Sep 17 00:00:00 2001 From: Tobias Reich Date: Sun, 6 Mar 2016 18:19:27 +0100 Subject: [PATCH] Replaced lychee.goto('') with lychee.goto() --- src/scripts/album.js | 4 ++-- src/scripts/header.js | 2 +- src/scripts/init.js | 2 +- src/scripts/lychee.js | 5 ++--- src/scripts/upload.js | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/scripts/album.js b/src/scripts/album.js index e33e19a..15df334 100644 --- a/src/scripts/album.js +++ b/src/scripts/album.js @@ -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() } diff --git a/src/scripts/header.js b/src/scripts/header.js index c8a9672..6c4b81c 100644 --- a/src/scripts/header.js +++ b/src/scripts/header.js @@ -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()) }) diff --git a/src/scripts/init.js b/src/scripts/init.js index 612eeff..71520e5 100755 --- a/src/scripts/init.js +++ b/src/scripts/init.js @@ -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 }) diff --git a/src/scripts/lychee.js b/src/scripts/lychee.js index c92699e..78c4c53 100644 --- a/src/scripts/lychee.js +++ b/src/scripts/lychee.js @@ -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() diff --git a/src/scripts/upload.js b/src/scripts/upload.js index 45eb106..d99d6c1 100755 --- a/src/scripts/upload.js +++ b/src/scripts/upload.js @@ -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()