diff options
author | Andreas Unterkircher <unki@netshadow.at> | 2007-06-05 20:21:28 +0000 |
---|---|---|
committer | Andreas Unterkircher <unki@netshadow.at> | 2007-06-05 20:21:28 +0000 |
commit | 193a2982417fb5b004c47cc96dcd112e1b07e47d (patch) | |
tree | 20bcab4ee39da221bd4b35cb8e44bde6ba529ea3 /phpfspot.js | |
parent | ac63881d744ce0eea0ab6d2ec6510cfecea0954a (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.js | 33 |
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'); +} |