summaryrefslogtreecommitdiffstats
path: root/phpfspot.js
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2007-07-04 19:02:47 +0000
committerAndreas Unterkircher <unki@netshadow.at>2007-07-04 19:02:47 +0000
commit8f56c03f5e097d31ba940e6f97f65e0e23ae3861 (patch)
tree0624ef414512552a6fae36649696cff45e202637 /phpfspot.js
parentd7790a08d8d457bf07d0277fc9fda3811faf2362 (diff)
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
Diffstat (limited to 'phpfspot.js')
-rw-r--r--phpfspot.js17
1 files changed, 17 insertions, 0 deletions
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;
+