Compare commits
No commits in common. "858fec7ec160315e9e4c400900763daac81d189d" and "dc582438dec9a03ae73c029987bbdf0900f6ab87" have entirely different histories.
858fec7ec1
...
dc582438de
|
@ -6,7 +6,6 @@ $data = array();
|
||||||
$data["albumcontents"] = "";
|
$data["albumcontents"] = "";
|
||||||
$data["albumtitle"] = "";
|
$data["albumtitle"] = "";
|
||||||
$data["albumdescription"] = "";
|
$data["albumdescription"] = "";
|
||||||
$data["images"] = array();
|
|
||||||
|
|
||||||
if ( $_SESSION['currentalbum'] != 0 ) {
|
if ( $_SESSION['currentalbum'] != 0 ) {
|
||||||
$album = new Album($_SESSION['currentalbum']);
|
$album = new Album($_SESSION['currentalbum']);
|
||||||
|
@ -16,7 +15,6 @@ if ( $_SESSION['currentalbum'] != 0 ) {
|
||||||
$griditems = Image::getImagesForAlbum($album->getID());
|
$griditems = Image::getImagesForAlbum($album->getID());
|
||||||
$data["albumtitle"] = $album->getTitle();
|
$data["albumtitle"] = $album->getTitle();
|
||||||
$data["albumdescription"] = $album->getDescription();
|
$data["albumdescription"] = $album->getDescription();
|
||||||
$data["images"] = $griditems;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( $_SESSION['currentalbum'] == 0 ) {
|
if ( $_SESSION['currentalbum'] == 0 ) {
|
||||||
|
|
|
@ -253,8 +253,8 @@ class Image implements JsonSerializable {
|
||||||
'id' => $this->getID(),
|
'id' => $this->getID(),
|
||||||
'album_id' => $this->getAlbumID(),
|
'album_id' => $this->getAlbumID(),
|
||||||
'albumfolder' => $this->getAlbumFolder(),
|
'albumfolder' => $this->getAlbumFolder(),
|
||||||
'imageurl' => basename(ALBUMFOLDER) . "/" . $this->getAlbumFolder() . $this->getFileName(),
|
'imageurl' => basename(ALBUMFOLDER) . "/" . $this->getAlbumFolder() . "/" . $this->getFileName(),
|
||||||
'thumburl' => basename(THUMBNAILFOLDER) . "/" . $this->getAlbumFolder() . $this->getFileName(),
|
'thumburl' => basename(THUMBNAILFOLDER) . "/" . $this->getAlbumFolder() . "/" . $this->getFileName(),
|
||||||
'title' => $this->getTitle(),
|
'title' => $this->getTitle(),
|
||||||
'description' => $this->getDescription(),
|
'description' => $this->getDescription(),
|
||||||
'createtime' => $this->getCreateTime()
|
'createtime' => $this->getCreateTime()
|
||||||
|
|
1
core/simpleLightbox.min.css
vendored
1
core/simpleLightbox.min.css
vendored
File diff suppressed because one or more lines are too long
1
core/simpleLightbox.min.js
vendored
1
core/simpleLightbox.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
Project source: https://github.com/dbrekalo/simpleLightbox
|
|
|
@ -9,11 +9,7 @@
|
||||||
<script type="text/javascript" src="core/jquery-3.6.0.min.js"></script>
|
<script type="text/javascript" src="core/jquery-3.6.0.min.js"></script>
|
||||||
<!-- Toastr library -->
|
<!-- Toastr library -->
|
||||||
<script type="text/javascript" src="core/toastr.min.js"></script>
|
<script type="text/javascript" src="core/toastr.min.js"></script>
|
||||||
<!-- simpleLightbox library -->
|
|
||||||
<script type="text/javascript" src="core/simpleLightbox.min.js"></script>
|
|
||||||
<!-- Include time library "moment" -->
|
<!-- Include time library "moment" -->
|
||||||
<script type="text/javascript" src="core/moment.min.js"></script>
|
<script type="text/javascript" src="core/moment.min.js"></script>
|
||||||
<!-- Script for global stuff -->
|
|
||||||
<script type="text/javascript" src="js/main.js"></script>
|
|
||||||
<!-- Script for menu highlighting -->
|
<!-- Script for menu highlighting -->
|
||||||
<script type="text/javascript" src="js/menu.js"></script>
|
<script type="text/javascript" src="js/menu.js"></script>
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
<meta http-equiv="content-type" content="text/html; charset=windows-1252" />
|
<meta http-equiv="content-type" content="text/html; charset=windows-1252" />
|
||||||
<!-- Toastr CSS -->
|
<!-- Toastr CSS -->
|
||||||
<link rel="stylesheet" type="text/css" href="core/toastr.min.css" />
|
<link rel="stylesheet" type="text/css" href="core/toastr.min.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="core/simpleLightbox.min.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="style/style.css" title="style" />
|
<link rel="stylesheet" type="text/css" href="style/style.css" title="style" />
|
||||||
<link rel="shortcut icon" href="graphics/oldman_head.gif">
|
<link rel="shortcut icon" href="graphics/oldman_head.gif">
|
||||||
</head>
|
</head>
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
function basename(str, sep) {
|
|
||||||
return str.substr(str.lastIndexOf(sep) + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// vim: set ts=4:sw=4
|
|
|
@ -1,5 +1,3 @@
|
||||||
var lightboxImages = [];
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$("#btn_refresh").click(function() { refreshAlbums() });
|
$("#btn_refresh").click(function() { refreshAlbums() });
|
||||||
$("#btn_album_0").click(function() { showAlbum($(this)) });
|
$("#btn_album_0").click(function() { showAlbum($(this)) });
|
||||||
|
@ -27,12 +25,10 @@ function getAlbumInfo() {
|
||||||
url: 'ajax/getalbuminfo.php',
|
url: 'ajax/getalbuminfo.php',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(data, stat, jqo) {
|
success: function(data, stat, jqo) {
|
||||||
lightboxImages = [];
|
|
||||||
if ( data.currentalbum == 0 ) {
|
if ( data.currentalbum == 0 ) {
|
||||||
$("#albumdetails").addClass("hidden");
|
$("#albumdetails").addClass("hidden");
|
||||||
} else {
|
} else {
|
||||||
$("#albumdetails").removeClass("hidden");
|
$("#albumdetails").removeClass("hidden");
|
||||||
lightboxImages = data.images;
|
|
||||||
}
|
}
|
||||||
$("#albumtitle").html(data.albumtitle);
|
$("#albumtitle").html(data.albumtitle);
|
||||||
$("#albumdescription").html(data.albumdescription);
|
$("#albumdescription").html(data.albumdescription);
|
||||||
|
@ -44,7 +40,6 @@ function getAlbumInfo() {
|
||||||
showImage($(this));
|
showImage($(this));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log(lightboxImages);
|
|
||||||
},
|
},
|
||||||
error: function(jqp, status, error) {
|
error: function(jqp, status, error) {
|
||||||
toastr.error("Error retrieving album info!\n" + error, "Server Error");
|
toastr.error("Error retrieving album info!\n" + error, "Server Error");
|
||||||
|
@ -54,24 +49,7 @@ function getAlbumInfo() {
|
||||||
|
|
||||||
function showImage(clickedElement) {
|
function showImage(clickedElement) {
|
||||||
var imageid = clickedElement.attr("id").substring(clickedElement.attr("id").lastIndexOf("_") + 1);
|
var imageid = clickedElement.attr("id").substring(clickedElement.attr("id").lastIndexOf("_") + 1);
|
||||||
var startIndex = 0;
|
console.log(imageid);
|
||||||
var images = [];
|
|
||||||
var captions = [];
|
|
||||||
lightboxImages.forEach(function(image, index) {
|
|
||||||
if ( image.id == imageid ) startIndex = index;
|
|
||||||
images.push(image.imageurl);
|
|
||||||
captions.push(image.description);
|
|
||||||
});
|
|
||||||
/*
|
|
||||||
images.forEach(function(image, index) {
|
|
||||||
if ( basename(image, "/") == basename(clickedElement.attr("src"), "/") ) startIndex = index;
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
SimpleLightbox.open({
|
|
||||||
items: images,
|
|
||||||
captions: captions,
|
|
||||||
startAt: startIndex
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function showAlbum(clickedElement) {
|
function showAlbum(clickedElement) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user