X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=phpfspot.js;h=26e50903c63b38cb78532dfe25bc53280ced1ff9;hp=6671eb2cb1914a49a4da406cf0bd446055358038;hb=35efccbba53481402a9146911bb786781c1e3dc3;hpb=fc802d09f196e338f7485e38057ec84df5c81bf2 diff --git a/phpfspot.js b/phpfspot.js index 6671eb2..26e5090 100644 --- a/phpfspot.js +++ b/phpfspot.js @@ -113,9 +113,6 @@ function startSearch() request = request + '&from='+ from +'&to='+ to; } - var sort_order = document.getElementsByName('sort_order')[0]; - request = request + '&sort_order='+ sort_order.options[sort_order.selectedIndex].value; - HTML_AJAX.grab(encodeURI(request)); refreshAvailableTags(); @@ -163,10 +160,12 @@ function AskServerWhatToDo() return HTML_AJAX.grab(encodeURI('rpc.php?action=what_to_do')); } -function init_phpfspot() +function init_phpfspot(mode) { + /* always load list of available tags */ refreshAvailableTags(); + /* ask the server what we are currently displaying */ whattodo = AskServerWhatToDo(); if(whattodo == 'showpi' || whattodo == 'showpi_date') { @@ -182,7 +181,7 @@ function init_phpfspot() refreshSelectedTags(); } } -} +} // init_phpfspot() function setBackGrdColor(item, color) { @@ -402,6 +401,23 @@ function initSlider() } +function update_sort_order(obj) +{ + var objTemp = new Object(); + objTemp['value'] = obj.options[obj.selectedIndex].value; + + var retr = HTML_AJAX.post('rpc.php?action=update_sort_order', objTemp); + + if(retr == "ok") { + showPhotoIndex(); + } + else { + window.alert(retr); + } + +} // update_sort_order() + + var startup = 1; var calendar_shown = 0; var calendar_mode = '';