X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=phpfspot.js;h=23a713055ed7ad1713aa475b92f0c508f3af8093;hp=ed19372f449a6777938c1cbcaee50fba71faeb94;hb=fe544d65af90df49390155616b9c864ea60ff2e5;hpb=9ad429db3fa1ecfdca81cdd5a0925d112f3eb677 diff --git a/phpfspot.js b/phpfspot.js index ed19372..23a7130 100644 --- a/phpfspot.js +++ b/phpfspot.js @@ -3,3 +3,49 @@ 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'); +} + +function showPhotoIndex() +{ + HTML_AJAX.replace(document.getElementById("content"), 'rpc.php?action=show_photo_index'); + +// content = document.getElementById("content"); +// content.innerHTML = HTML_AJAX.grab('rpc.php?action=show_photo_index'); +} + +function showBubbleDetails(object, id, direction) +{ + HTML_AJAX.replace(object, 'rpc.php?action=showbubbledetails&id=' + id + '&direction=" + direction'); +}