* called for photo-index export. will return the
* selected mode via AJAX from the server.
*/
-function setViewMode(mode)
+function setViewMode(srv_webpath, mode)
{
+ if(srv_webpath != undefined)
+ web_path = srv_webpath;
+ else
+ web_path = '';
+
var exprt = document.getElementById('output');
exprt.innerHTML = "Loading...";
exprt.innerHTML = HTML_AJAX.grab(encodeURI(web_path + '/rpc.php?action=get_export&mode=' + mode));
var waiting = 100;
var counting;
- lbImg=WSR_getElementsByClassName(document,"img","thumb");
- for(i=0;i<lbImg.length;i++){
- lbImg[i].src=image_url[i];
- // to not bomb the server with requests, give the page some time
- // to load the images one by one. if a image exceeds the timeout,
- // the next image will be loaded.
- if(lbImg[i].complete != undefined && lbImg[i].complete != true) {
- counting = 0;
- while(lbImg[i].complete != true && counting < timeout) {
- window.setTimeout("noop()", waiting);
- counting+=waiting;
+ lbImg = WSR_getElementsByClassName(document,"img","thumb");
+ if(lbImg != undefined) {
+ for(i=0;i<lbImg.length;i++){
+ lbImg[i].src=image_url[i];
+ // to not bomb the server with requests, give the page some time
+ // to load the images one by one. if a image exceeds the timeout,
+ // the next image will be loaded.
+ if(lbImg[i].complete != undefined && lbImg[i].complete != true) {
+ counting = 0;
+ while(lbImg[i].complete != true && counting < timeout) {
+ window.setTimeout("noop()", waiting);
+ counting+=waiting;
+ }
}
}
}
/**
* start slideshow
*/
-function startSlideShow()
+function startSlideShow(srv_webpath)
{
+ if(srv_webpath != undefined)
+ web_path = srv_webpath;
+ else
+ web_path = '';
+
if(!sliding) {
HTML_AJAX.grab(encodeURI(web_path + '/rpc.php?action=reset_slideshow'));
nextSlide();
if(document.getElementById('next_link')) {
var next_link = document.getElementById('next_link').href;
window.location.href = next_link;
- document.getElementById('autobrowse_ico').src = web_path + "/resources/32_pause.png";
+ document.getElementById('autobrowse_ico').src = web_path + "/resources/16_pause.png";
}
/* we have reached the last photo */
else {
if(ab_ico = document.getElementById('autobrowse_ico'))
- ab_ico.src = web_path + "/resources/32_play.png";
+ ab_ico.src = web_path + "/resources/16_play.png";
clearInterval(autobrowse);
}