From 8f56c03f5e097d31ba940e6f97f65e0e23ae3861 Mon Sep 17 00:00:00 2001 From: Andreas Unterkircher Date: Wed, 4 Jul 2007 19:02:47 +0000 Subject: issue13, if user jumps into from an external link, immediatley display the photo index according the tag selection provided git-svn-id: file:///var/lib/svn/phpfspot/trunk@162 fa6a889d-dae6-447d-9e79-4ba9a3039384 --- phpfspot.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'phpfspot.js') diff --git a/phpfspot.js b/phpfspot.js index 2d7e780..22840b7 100644 --- a/phpfspot.js +++ b/phpfspot.js @@ -49,6 +49,13 @@ function refreshSelectedTags() var selected_tags = document.getElementById("selected_tags"); selected_tags.innerHTML = "Loading..."; selected_tags.innerHTML = HTML_AJAX.grab(encodeURI('rpc.php?action=show_selected_tags')); + + // if no tags are currently selected, return false from here + if(selected_tags.innerHTML == "") + return false; + + return true; + } function showPhotoIndex(begin_with) @@ -113,4 +120,14 @@ function clearSearch() document.getElementsByName('searchfor')[0].value = ''; } +function init_phpfspot() +{ + refreshAvailableTags(); + + if(refreshSelectedTags()) { + showPhotoIndex(); + } +} + var startup = 1; + -- cgit v1.2.3-18-g5258