added global veriables and fixed variable images per page

This commit is contained in:
bluesaxman
2019-04-29 09:27:40 -06:00
parent a88b920606
commit d346e90e13
5 changed files with 5 additions and 4 deletions

23
js/base.js Normal file
View File

@@ -0,0 +1,23 @@
window.api_url = ""; // Webfacing URL to imapi.pl
function getWidget(type) {
var path = window.api_url+"?l!j!";
if ("thumbnail" == type) {
if (typeof getImage !== "function") {getJavascript(path+"getImage");}
if (typeof showImage !== "function") {getJavascript(path+"showImage");}
if (typeof imageViewElements !== "function") {getJavascript(path+"imageViewElements");}
}
if ("gallery" == type) {
window.g_Gallery = {"pageCount":5, "parentID":"body"};
if (typeof getGalleries !== "function") {getJavascript(path+"getGalleries");}
if (typeof putGalleries !== "function") {getJavascript(path+"putGalleries");}
if (typeof listGalleries !== "function") {getJavascript(path+"listGalleries");}
if (typeof initGalery !== "function") {getJavascript(path+"initGalery");}
if (typeof getImageList !== "function") {getJavascript(path+"getImageList");}
if (typeof putImageList !== "function") {getJavascript(path+"putImageList");}
if (typeof ImageListSelection !== "function") {getJavascript(path+"ImageListSelection");}
if (typeof initImage !== "function") {getJavascript(path+"initImage");}
if (typeof imageViewElements !== "function") {getJavascript(path+"imageViewElements");}
if (typeof refreshImage !== "function") {getJavascript(path+"refreshImage");}
}
}