projects
/
phpfspot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
issue100, add/remove tag and tag-condition use HTTP POST
[phpfspot.git]
/
phpfspot.js
diff --git
a/phpfspot.js
b/phpfspot.js
index c90d80e1365e337fb730ff4abed673d02d23c8c3..ca3f9c01508fa8c94e25eae0794823d7986b8f12 100644
(file)
--- a/
phpfspot.js
+++ b/
phpfspot.js
@@
-12,24
+12,35
@@
function showCredits()
function Tags(mode, id)
{
function Tags(mode, id)
{
+ var objTemp = new Object();
+
if(mode == "add") {
if(mode == "add") {
- // add the tag to users session
- HTML_AJAX.grab(encodeURI('rpc.php?action=addtag&id=' + id));
+ // add tag to users session
+ objTemp['action'] = 'addtag';
+ objTemp['id'] = id;
}
else if(mode == "del") {
}
else if(mode == "del") {
- // del the tag from users session
- HTML_AJAX.grab(encodeURI('rpc.php?action=deltag&id=' + id));
+ // del tag from users session
+ objTemp['action'] = 'deltag';
+ objTemp['id'] = id;
}
else if(mode == "condition") {
setCheckedValue(id, id.value);
}
else if(mode == "condition") {
setCheckedValue(id, id.value);
- HTML_AJAX.grab(encodeURI('rpc.php?action=tagcondition&mode=' + id.value));
+ objTemp['action'] = 'tagcondition';
+ objTemp['mode'] = id.value;
}
}
- refreshAvailableTags();
- refreshSelectedTags();
- refreshPhotoIndex();
+ var retr = HTML_AJAX.post('rpc.php', objTemp);
+ if(retr == "ok") {
+ refreshAvailableTags();
+ refreshSelectedTags();
+ refreshPhotoIndex();
+ }
+ else {
+ window.alert(retr);
+ }
-}
+}
// Tags()
function refreshAvailableTags()
{
function refreshAvailableTags()
{
@@
-101,7
+112,6
@@
function startSearch()
to_day = document.getElementById('today').value;
to = to_year +"-"+ to_month +"-"+ to_day;
to_day = document.getElementById('today').value;
to = to_year +"-"+ to_month +"-"+ to_day;
- // Create object with values of the form
var objTemp = new Object();
objTemp['action'] = 'search';
var objTemp = new Object();
objTemp['action'] = 'search';