summaryrefslogtreecommitdiffstats
path: root/phpfspot.js
diff options
context:
space:
mode:
authorAndreas Unterkircher <unki@netshadow.at>2007-06-05 20:21:28 +0000
committerAndreas Unterkircher <unki@netshadow.at>2007-06-05 20:21:28 +0000
commit193a2982417fb5b004c47cc96dcd112e1b07e47d (patch)
tree20bcab4ee39da221bd4b35cb8e44bde6ba529ea3 /phpfspot.js
parentac63881d744ce0eea0ab6d2ec6510cfecea0954a (diff)
ajax based add/remove/reset tag list
git-svn-id: file:///var/lib/svn/phpfspot/trunk@16 fa6a889d-dae6-447d-9e79-4ba9a3039384
Diffstat (limited to 'phpfspot.js')
-rw-r--r--phpfspot.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/phpfspot.js b/phpfspot.js
index ed19372..4f8fd52 100644
--- a/phpfspot.js
+++ b/phpfspot.js
@@ -3,3 +3,36 @@ function showImage(id)
content = document.getElementById("content");
content.innerHTML = HTML_AJAX.grab('rpc.php?action=showphoto&id=' + id);
}
+
+function Tags(mode, id)
+{
+ if(mode == "add") {
+ // add the tag to users session
+ HTML_AJAX.grab('rpc.php?action=addtag&id=' + id);
+ }
+ else if(mode == "del") {
+ // del the tag from users session
+ HTML_AJAX.grab('rpc.php?action=deltag&id=' + id);
+ }
+ else if(mode == "reset") {
+ HTML_AJAX.grab('rpc.php?action=resettags');
+ }
+
+ refreshAvailableTags();
+ refreshSelectedTags();
+
+}
+
+function refreshAvailableTags()
+{
+ // update available tags
+ content = document.getElementById("available_tags");
+ content.innerHTML = HTML_AJAX.grab('rpc.php?action=show_available_tags');
+}
+
+function refreshSelectedTags()
+{
+ // update selected tags
+ content = document.getElementById("selected_tags");
+ content.innerHTML = HTML_AJAX.grab('rpc.php?action=show_selected_tags');
+}