added global veriables and fixed variable images per page
This commit is contained in:
parent
a88b920606
commit
d346e90e13
@ -8,6 +8,7 @@ function getWidget(type) {
|
||||
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");}
|
@ -1,5 +1,5 @@
|
||||
function ImageListSelection(position,count) {
|
||||
count = "number" == typeof count ? count : 5;
|
||||
count = "number" == typeof count ? count : window.g_Gallery.pageCount;
|
||||
var selection = window.curGallery.imageList.slice(position,position+count);
|
||||
window.curGallery.container.list.innerHTML = "";
|
||||
selection.forEach( function (e,i) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
function initGalery(galleryName, pageCount) {
|
||||
pageCount = "number" == typeof pageCount ? pageCount : 5;
|
||||
pageCount = "number" == typeof pageCount ? pageCount : window.g_Gallery.pageCount;
|
||||
window.curGallery = {};
|
||||
getImageList(window.api_url, galleryName);
|
||||
window.curGallery.Position = 0;
|
||||
|
@ -1,5 +1,5 @@
|
||||
function listGalleries() {
|
||||
window.galleryBox = elementPlace("body","GalleryBox",null,"div");
|
||||
window.galleryBox = elementPlace(window.g_Gallery.parentID,"GalleryBox",null,"div");
|
||||
window.galleryList = elementPlace("#GalleryBox","GalleryList",null,"ul");
|
||||
window.galleryList.innerHTML = "";
|
||||
window.galleriesList.forEach(function(e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user