mirror of
https://forge.murkfall.net/bluesaxman/imapi.git
synced 2026-03-13 02:54:19 -06:00
added global veriables and fixed variable images per page
This commit is contained in:
@@ -8,6 +8,7 @@ function getWidget(type) {
|
|||||||
if (typeof imageViewElements !== "function") {getJavascript(path+"imageViewElements");}
|
if (typeof imageViewElements !== "function") {getJavascript(path+"imageViewElements");}
|
||||||
}
|
}
|
||||||
if ("gallery" == type) {
|
if ("gallery" == type) {
|
||||||
|
window.g_Gallery = {"pageCount":5, "parentID":"body"};
|
||||||
if (typeof getGalleries !== "function") {getJavascript(path+"getGalleries");}
|
if (typeof getGalleries !== "function") {getJavascript(path+"getGalleries");}
|
||||||
if (typeof putGalleries !== "function") {getJavascript(path+"putGalleries");}
|
if (typeof putGalleries !== "function") {getJavascript(path+"putGalleries");}
|
||||||
if (typeof listGalleries !== "function") {getJavascript(path+"listGalleries");}
|
if (typeof listGalleries !== "function") {getJavascript(path+"listGalleries");}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
function ImageListSelection(position,count) {
|
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);
|
var selection = window.curGallery.imageList.slice(position,position+count);
|
||||||
window.curGallery.container.list.innerHTML = "";
|
window.curGallery.container.list.innerHTML = "";
|
||||||
selection.forEach( function (e,i) {
|
selection.forEach( function (e,i) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
function initGalery(galleryName, pageCount) {
|
function initGalery(galleryName, pageCount) {
|
||||||
pageCount = "number" == typeof pageCount ? pageCount : 5;
|
pageCount = "number" == typeof pageCount ? pageCount : window.g_Gallery.pageCount;
|
||||||
window.curGallery = {};
|
window.curGallery = {};
|
||||||
getImageList(window.api_url, galleryName);
|
getImageList(window.api_url, galleryName);
|
||||||
window.curGallery.Position = 0;
|
window.curGallery.Position = 0;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
function listGalleries() {
|
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 = elementPlace("#GalleryBox","GalleryList",null,"ul");
|
||||||
window.galleryList.innerHTML = "";
|
window.galleryList.innerHTML = "";
|
||||||
window.galleriesList.forEach(function(e) {
|
window.galleriesList.forEach(function(e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user