sort images by time like f-spot does
[phpfspot.git] / phpfspot.js
1 function showImage(id)
2 {
3    content = document.getElementById("content");
4    content.innerHTML = HTML_AJAX.grab('rpc.php?action=showphoto&id=' + id);
5 }
6
7 function Tags(mode, id)
8 {
9    if(mode == "add") {
10       // add the tag to users session
11       HTML_AJAX.grab('rpc.php?action=addtag&id=' + id);
12    }
13    else if(mode == "del") {
14       // del the tag from users session
15       HTML_AJAX.grab('rpc.php?action=deltag&id=' + id);
16    }
17    else if(mode == "reset") {
18       HTML_AJAX.grab('rpc.php?action=resettags');
19    }
20    
21    refreshAvailableTags();
22    refreshSelectedTags();
23
24 }
25
26 function refreshAvailableTags()
27 {
28    // update available tags
29    content = document.getElementById("available_tags");
30    content.innerHTML = HTML_AJAX.grab('rpc.php?action=show_available_tags');
31 }
32
33 function refreshSelectedTags()
34 {
35    // update selected tags
36    content = document.getElementById("selected_tags");
37    content.innerHTML = HTML_AJAX.grab('rpc.php?action=show_selected_tags');
38 }
39
40 function showPhotoIndex()
41 {
42    content = document.getElementById("content");
43    content.innerHTML = HTML_AJAX.grab('rpc.php?action=show_photo_index');
44 }