X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=phpfspot.js;h=54395e2a8aa27497f62d5232302129a952b7c2ac;hb=37d9c8bf7eb7c4244f93d9ed780333ec1fa4ae86;hp=57345ab1705caf7eb064fbce9b4aa4fa5974d08b;hpb=bba20b67709ecf7aab8a6da9e44b6e64352d2475;p=phpfspot.git diff --git a/phpfspot.js b/phpfspot.js index 57345ab..54395e2 100644 --- a/phpfspot.js +++ b/phpfspot.js @@ -820,6 +820,27 @@ function update_sort_order(obj) } // update_sort_order() +/** + * if the photo-version ѕelect-box has changed, set the newly + * choosen photo version as the to-be-displayed photo version + */ +function update_photo_version(obj, current_photo) +{ + var objTemp = new Object(); + objTemp['photo_version'] = obj.options[obj.selectedIndex].value; + objTemp['photo_idx'] = current_photo; + + var retr = HTML_AJAX.post(web_path + '/rpc.php?action=update_photo_version', objTemp); + + if(retr == "ok") { + showPhoto(current_photo); + } + else { + window.alert("Server message: "+ retr); + } + +} // update_photo_version() + /** * show rate stars *