master
parent
14448c7d52
commit
cd1f340af3
|
|
@ -26,19 +26,15 @@ if ($user->isAdmin()) {
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta name="generator" content="gelato cms <?php echo version();?>" />
|
<meta name="generator" content="gelato cms <?php echo version();?>" />
|
||||||
<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
|
<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
|
||||||
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/mootools.js"></script>
|
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/jquery.js"></script>
|
||||||
|
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/tools.js"></script>
|
||||||
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/sortable.js"></script>
|
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/sortable.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<!--
|
$(document).ready(function(){
|
||||||
window.onload = function() {
|
$("#divMessages").fadeOut(5000,function(){
|
||||||
contenedor = new Fx.Style('divMessages', 'opacity', {duration: 5000, onComplete:
|
$("#divMessages").css({display:"none"});
|
||||||
function() {
|
});
|
||||||
document.getElementById('divMessages').style.display="none";
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
contenedor.custom(1,0);
|
|
||||||
}
|
|
||||||
-->
|
|
||||||
</script>
|
</script>
|
||||||
<style type="text/css" media="screen">
|
<style type="text/css" media="screen">
|
||||||
@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
|
@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
|
||||||
|
|
|
||||||
|
|
@ -68,19 +68,14 @@ if ($isAdmin) {
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta name="generator" content="gelato cms <?php echo version();?>" />
|
<meta name="generator" content="gelato cms <?php echo version();?>" />
|
||||||
<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
|
<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
|
||||||
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/mootools.js"></script>
|
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/jquery.js"></script>
|
||||||
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/tools.js"></script>
|
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/tools.js"></script>
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
<!--
|
$(document).ready(function(){
|
||||||
window.onload = function() {
|
$("#divMessages").fadeOut(5000,function(){
|
||||||
contenedor = new Fx.Style('divMessages', 'opacity', {duration: 5000, onComplete:
|
$("#divMessages").css({display:"none"});
|
||||||
function() {
|
});
|
||||||
document.getElementById('divMessages').style.display="none";
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
contenedor.custom(1,0);
|
|
||||||
}
|
|
||||||
-->
|
|
||||||
</script>
|
</script>
|
||||||
<style type="text/css" media="screen">
|
<style type="text/css" media="screen">
|
||||||
@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
|
@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 43 B |
Binary file not shown.
|
After Width: | Height: | Size: 222 B |
|
|
@ -0,0 +1,92 @@
|
||||||
|
|
||||||
|
|
||||||
|
#lightbox{
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 100;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#lightbox a img{ border: none; }
|
||||||
|
|
||||||
|
#outerImageContainer{
|
||||||
|
position: relative;
|
||||||
|
background-color: #fff;
|
||||||
|
width: 250px;
|
||||||
|
height: 250px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
#imageContainer{
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#loading{
|
||||||
|
position: absolute;
|
||||||
|
top: 40%;
|
||||||
|
left: 0%;
|
||||||
|
height: 25%;
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 0;
|
||||||
|
}
|
||||||
|
#hoverNav{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
#imageContainer>#hoverNav{ left: 0;}
|
||||||
|
#hoverNav a{ outline: none;}
|
||||||
|
|
||||||
|
#prevLink, #nextLink{
|
||||||
|
width: 49%;
|
||||||
|
height: 100%;
|
||||||
|
background: transparent url(../images/blank.gif) no-repeat; /* Trick IE into showing hover */
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
#prevLink { left: 0; float: left;}
|
||||||
|
#nextLink { right: 0; float: right;}
|
||||||
|
#prevLink:hover, #prevLink:visited:hover { background: url(../images/prevlabel.gif) left 15% no-repeat; }
|
||||||
|
#nextLink:hover, #nextLink:visited:hover { background: url(../images/nextlabel.gif) right 15% no-repeat; }
|
||||||
|
|
||||||
|
|
||||||
|
#imageDataContainer{
|
||||||
|
font: 10px Verdana, Helvetica, sans-serif;
|
||||||
|
background-color: #fff;
|
||||||
|
margin: 0 auto;
|
||||||
|
line-height: 1.4em;
|
||||||
|
overflow: auto;
|
||||||
|
width: 100%
|
||||||
|
}
|
||||||
|
|
||||||
|
#imageData{ padding:0 10px; color: #666; }
|
||||||
|
#imageData #imageDetails{ width: 70%; float: left; text-align: left; }
|
||||||
|
#imageData #caption{ font-weight: bold; }
|
||||||
|
#imageData #numberDisplay{ display: block; clear: left; padding-bottom: 1.0em; }
|
||||||
|
#imageData #bottomNavClose{ width: 66px; float: right; margin: 1.0em;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#overlay{
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 90;
|
||||||
|
width: 100%;
|
||||||
|
height: 500px;
|
||||||
|
background-color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* * * * * V 0.3 * * * * * /
|
||||||
|
/* html,body thanks to Torben - http://blog.schreiter.info/ */
|
||||||
|
html, body {
|
||||||
|
height:100%;
|
||||||
|
min-height:100%;
|
||||||
|
}
|
||||||
|
|
@ -96,37 +96,19 @@ if ($user->isAdmin()) {
|
||||||
<meta name="generator" content="gelato cms <?php echo version();?>" />
|
<meta name="generator" content="gelato cms <?php echo version();?>" />
|
||||||
<title>gelato :: <?php echo __("control panel")?></title>
|
<title>gelato :: <?php echo __("control panel")?></title>
|
||||||
<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
|
<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
|
||||||
|
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/jquery.js"></script>
|
||||||
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/tools.js"></script>
|
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/tools.js"></script>
|
||||||
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/mootools.js"></script>
|
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/lightbox.js"></script>
|
||||||
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/slimbox.js"></script>
|
|
||||||
<script language="javascript" type="text/javascript">
|
<script language="javascript" type="text/javascript">
|
||||||
<!--
|
$(document).ready(function(){
|
||||||
function exit(el, path) {
|
$("#divMessages").fadeOut(5000,function(){
|
||||||
el = $(el);
|
$("#divMessages").css({display:"none"});
|
||||||
el.style.display="block";
|
});
|
||||||
el.setHTML('Processing request…');
|
});
|
||||||
new Ajax(path, {
|
|
||||||
onComplete:function(e) {
|
|
||||||
el.setHTML(e).effect('opacity').custom(0,1);
|
|
||||||
window.location='../login.php';
|
|
||||||
}
|
|
||||||
}).request();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onload = function() {
|
|
||||||
contenedor = new Fx.Style('divMessages', 'opacity', {duration: 5000, onComplete:
|
|
||||||
function() {
|
|
||||||
document.getElementById('divMessages').style.display="none";
|
|
||||||
}
|
|
||||||
});
|
|
||||||
contenedor.custom(1,0);
|
|
||||||
}
|
|
||||||
-->
|
|
||||||
</script>
|
</script>
|
||||||
<style type="text/css" media="screen">
|
<style type="text/css" media="screen">
|
||||||
@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
|
@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
|
||||||
@import "<?php echo $conf->urlGelato;?>/admin/css/slimbox.css";
|
@import "<?php echo $conf->urlGelato;?>/admin/css/lightbox.css";
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
@ -369,7 +351,7 @@ if ($user->isAdmin()) {
|
||||||
$photoPath = $register["url"];
|
$photoPath = $register["url"];
|
||||||
}
|
}
|
||||||
|
|
||||||
$effect = " style=\"cursor: pointer;\" onclick=\"Lightbox.show('".$register["url"]."', '".strip_tags($register["description"])."');\" ";
|
$effect = " href=\"".str_replace("../", $conf->urlGelato."/", $register["url"])."\" rel=\"lightbox\"";
|
||||||
|
|
||||||
$input = array("{Id_Post}", "{Date_Added}", "{Permalink}", "{PhotoURL}", "{PhotoAlt}", "{Caption}", "{Effect}", "{URL_Tumble}");
|
$input = array("{Id_Post}", "{Date_Added}", "{Permalink}", "{PhotoURL}", "{PhotoAlt}", "{Caption}", "{Effect}", "{URL_Tumble}");
|
||||||
$output = array($register["id_post"], $formatedDate, $permalink, $photoPath, strip_tags($register["description"]), $register["description"], $effect, $conf->urlGelato);
|
$output = array($register["id_post"], $formatedDate, $permalink, $photoPath, strip_tags($register["description"]), $register["description"], $effect, $conf->urlGelato);
|
||||||
|
|
|
||||||
|
|
@ -69,19 +69,14 @@ if ($user->isAdmin()) {
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta name="generator" content="gelato cms <?php echo version();?>" />
|
<meta name="generator" content="gelato cms <?php echo version();?>" />
|
||||||
<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
|
<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
|
||||||
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/mootools.js"></script>
|
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/jquery.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<!--
|
$(document).ready(function(){
|
||||||
window.onload = function() {
|
$("#divMessages").fadeOut(5000,function(){
|
||||||
contenedor = new Fx.Style('divMessages', 'opacity', {duration: 5000, onComplete:
|
$("#divMessages").css({display:"none"});
|
||||||
function() {
|
});
|
||||||
document.getElementById('divMessages').style.display="none";
|
});
|
||||||
}
|
</script>
|
||||||
});
|
|
||||||
contenedor.custom(1,0);
|
|
||||||
}
|
|
||||||
-->
|
|
||||||
</script>
|
|
||||||
<style type="text/css" media="screen">
|
<style type="text/css" media="screen">
|
||||||
@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
|
@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,364 @@
|
||||||
|
/**
|
||||||
|
* jQuery Lightbox
|
||||||
|
* Version 0.3 - 09/17/2007
|
||||||
|
* @author Warren Krewenki
|
||||||
|
*
|
||||||
|
* Based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
|
||||||
|
* Originally written to make use of the Prototype framework, and Script.acalo.us, now altered to use jQuery.
|
||||||
|
*
|
||||||
|
* New in this version:
|
||||||
|
* - fully encapsulated in one JSON object
|
||||||
|
* - new method of adding the lightbox html
|
||||||
|
* - removal of some dead functions
|
||||||
|
**/
|
||||||
|
|
||||||
|
var Lightbox = {
|
||||||
|
fileLoadingImage : "admin/css/images/loading.gif",
|
||||||
|
fileBottomNavCloseImage : 'admin/css/images/closelabel.gif',
|
||||||
|
overlayOpacity : 0.8,
|
||||||
|
borderSize : 10,
|
||||||
|
imageArray : new Array,
|
||||||
|
activeImage : null,
|
||||||
|
inprogress : false,
|
||||||
|
|
||||||
|
initialize: function() {
|
||||||
|
// attach lightbox to any links with rel 'lightbox'
|
||||||
|
$("a").each(function(){
|
||||||
|
if(this.rel.toLowerCase().match('lightbox')){
|
||||||
|
$(this).click(function(){
|
||||||
|
Lightbox.start(this);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$("body").append('<div id="overlay"></div><div id="lightbox"><div id="outerImageContainer"><div id="imageContainer"><img id="lightboxImage"><div style="" id="hoverNav"><a href="#" id="prevLink"></a><a href="#" id="nextLink"></a></div><div id="loading"><a href="#" id="loadingLink"><img src="admin/css/images/loading.gif"></a></div></div></div><div id="imageDataContainer"><div id="imageData"><div id="imageDetails"><span id="caption"></span><span id="numberDisplay"></span></div><div id="bottomNav"><a href="#" id="bottomNavClose"><img src="admin/css/images/close.gif"></a></div></div></div></div>');
|
||||||
|
$("#overlay").click(function(){ Lightbox.end(); }).hide();
|
||||||
|
$("#lightbox").click(function(){ Lightbox.end();}).hide();
|
||||||
|
$("#loadingLink").click(function(){ Lightbox.end(); return false;});
|
||||||
|
$("#bottomNavClose").click(function(){ Lightbox.end(); return false; });
|
||||||
|
$('#outerImageContainer').css({width: '250px', height: '250px;'});
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// start()
|
||||||
|
// Display overlay and lightbox. If image is part of a set, add siblings to Lightbox.imageArray.
|
||||||
|
//
|
||||||
|
start: function(imageLink) {
|
||||||
|
$("select, embed, object").hide();
|
||||||
|
|
||||||
|
// *
|
||||||
|
var urlImg = $("img", imageLink).attr("src");
|
||||||
|
urlImg = urlImg.split("classes");
|
||||||
|
//urlImg = urlImg[0]+'admin/css/images/loading.gif';
|
||||||
|
$("#loadingLink > img").attr({src:urlImg[0]+'admin/css/images/loading.gif'})
|
||||||
|
$("#bottomNavClose > img").attr({src:urlImg[0]+'admin/css/images/close.gif'})
|
||||||
|
|
||||||
|
// stretch overlay to fill page and fade in
|
||||||
|
var arrayPageSize = Lightbox.getPageSize();
|
||||||
|
$("#overlay").hide().css({width: '100%', height: arrayPageSize[1]+'px', opacity : Lightbox.overlayOpacity}).fadeIn();
|
||||||
|
|
||||||
|
Lightbox.imageArray = [];
|
||||||
|
imageNum = 0;
|
||||||
|
|
||||||
|
var anchors = document.getElementsByTagName( imageLink.tagName);
|
||||||
|
|
||||||
|
// if image is NOT part of a set..
|
||||||
|
if((imageLink.rel == 'lightbox')){
|
||||||
|
// add single image to Lightbox.imageArray
|
||||||
|
Lightbox.imageArray.push(new Array(imageLink.href, imageLink.title));
|
||||||
|
} else {
|
||||||
|
// if image is part of a set..
|
||||||
|
|
||||||
|
// loop through anchors, find other images in set, and add them to Lightbox.imageArray
|
||||||
|
for (var i=0; i<anchors.length; i++){
|
||||||
|
var anchor = anchors[i];
|
||||||
|
if (anchor.href && (anchor.rel == imageLink.rel)){
|
||||||
|
Lightbox.imageArray.push(new Array(anchor.href, anchor.title));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(i = 0; i < Lightbox.imageArray.length; i++){
|
||||||
|
for(j = Lightbox.imageArray.length-1; j>i; j--){
|
||||||
|
if(Lightbox.imageArray[i][0] == Lightbox.imageArray[j][0]){
|
||||||
|
Lightbox.imageArray.splice(j,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while(Lightbox.imageArray[imageNum][0] != imageLink.href) { imageNum++;}
|
||||||
|
}
|
||||||
|
|
||||||
|
// calculate top and left offset for the lightbox
|
||||||
|
var arrayPageScroll = Lightbox.getPageScroll();
|
||||||
|
var lightboxTop = arrayPageScroll[1] + (arrayPageSize[3] / 10);
|
||||||
|
var lightboxLeft = arrayPageScroll[0];
|
||||||
|
$('#lightbox').css({top: lightboxTop+'px', left: lightboxLeft+'px'}).show();
|
||||||
|
|
||||||
|
this.changeImage(imageNum);
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// changeImage()
|
||||||
|
// Hide most elements and preload image in preparation for resizing image container.
|
||||||
|
//
|
||||||
|
changeImage: function(imageNum) {
|
||||||
|
if(this.inprogress == false){
|
||||||
|
this.inprogress = true;
|
||||||
|
Lightbox.activeImage = imageNum; // update global var
|
||||||
|
|
||||||
|
// hide elements during transition
|
||||||
|
$('#loading').show();
|
||||||
|
$('#lightboxImage').hide();
|
||||||
|
$('#hoverNav').hide();
|
||||||
|
$('#prevLink').hide();
|
||||||
|
$('#nextLink').hide();
|
||||||
|
$('#imageDataContainer').hide();
|
||||||
|
$('#numberDisplay').hide();
|
||||||
|
|
||||||
|
imgPreloader = new Image();
|
||||||
|
|
||||||
|
// once image is preloaded, resize image container
|
||||||
|
imgPreloader.onload=function(){
|
||||||
|
console.log(Lightbox.activeImage);
|
||||||
|
document.getElementById('lightboxImage').src = Lightbox.imageArray[Lightbox.activeImage][0];
|
||||||
|
Lightbox.resizeImageContainer(imgPreloader.width, imgPreloader.height);
|
||||||
|
}
|
||||||
|
imgPreloader.src = Lightbox.imageArray[Lightbox.activeImage][0];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// resizeImageContainer()
|
||||||
|
//
|
||||||
|
resizeImageContainer: function( imgWidth, imgHeight) {
|
||||||
|
|
||||||
|
// get curren width and height
|
||||||
|
this.widthCurrent = document.getElementById('outerImageContainer').offsetWidth;
|
||||||
|
this.heightCurrent = document.getElementById('outerImageContainer').offsetHeight;
|
||||||
|
|
||||||
|
// get new width and height
|
||||||
|
var widthNew = (imgWidth + (Lightbox.borderSize * 2));
|
||||||
|
var heightNew = (imgHeight + (Lightbox.borderSize * 2));
|
||||||
|
|
||||||
|
// scalars based on change from old to new
|
||||||
|
this.xScale = ( widthNew / this.widthCurrent) * 100;
|
||||||
|
this.yScale = ( heightNew / this.heightCurrent) * 100;
|
||||||
|
|
||||||
|
// calculate size difference between new and old image, and resize if necessary
|
||||||
|
wDiff = this.widthCurrent - widthNew;
|
||||||
|
hDiff = this.heightCurrent - heightNew;
|
||||||
|
|
||||||
|
$('#outerImageContainer').animate({width: widthNew},400,'linear',function(){
|
||||||
|
$("#outerImageContainer").animate({height: heightNew},400,'linear',function(){
|
||||||
|
Lightbox.showImage();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// if new and old image are same size and no scaling transition is necessary,
|
||||||
|
// do a quick pause to prevent image flicker.
|
||||||
|
if((hDiff == 0) && (wDiff == 0)){
|
||||||
|
if (navigator.appVersion.indexOf("MSIE")!=-1){ Lightbox.pause(250); } else { Lightbox.pause(100);}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#prevLink').css({height: imgHeight+'px'});
|
||||||
|
$('#nextLink').css({height: imgHeight+'px'});
|
||||||
|
$('#imageDataContainer').css({width: widthNew+'px'});
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// showImage()
|
||||||
|
// Display image and begin preloading neighbors.
|
||||||
|
//
|
||||||
|
showImage: function(){
|
||||||
|
$('#loading').hide();
|
||||||
|
$('#lightboxImage').fadeIn("fast");
|
||||||
|
Lightbox.updateDetails();
|
||||||
|
this.preloadNeighborImages();
|
||||||
|
this.inprogress = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// updateDetails()
|
||||||
|
// Display caption, image number, and bottom nav.
|
||||||
|
//
|
||||||
|
updateDetails: function() {
|
||||||
|
$("#imageDataContainer").hide();
|
||||||
|
// if caption is not null
|
||||||
|
if(Lightbox.imageArray[Lightbox.activeImage][1]){
|
||||||
|
$('#caption').html(Lightbox.imageArray[Lightbox.activeImage][1]).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
// if image is part of set display 'Image x of x'
|
||||||
|
if(Lightbox.imageArray.length > 1){
|
||||||
|
$('#numberDisplay').html("Image " + eval(Lightbox.activeImage + 1) + " of " + Lightbox.imageArray.length).show();
|
||||||
|
}
|
||||||
|
|
||||||
|
$("#imageDataContainer").hide().slideDown("slow");
|
||||||
|
var arrayPageSize = Lightbox.getPageSize();
|
||||||
|
$('#overLay').css({height: arrayPageSize[1]+'px'});
|
||||||
|
Lightbox.updateNav();
|
||||||
|
},
|
||||||
|
|
||||||
|
//
|
||||||
|
// updateNav()
|
||||||
|
// Display appropriate previous and next hover navigation.
|
||||||
|
//
|
||||||
|
updateNav: function() {
|
||||||
|
|
||||||
|
$('#hoverNav').show();
|
||||||
|
|
||||||
|
// if not first image in set, display prev image button
|
||||||
|
if(Lightbox.activeImage != 0){
|
||||||
|
$('#prevLink').show().click(function(){
|
||||||
|
Lightbox.changeImage(Lightbox.activeImage - 1); return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// if not last image in set, display next image button
|
||||||
|
if(Lightbox.activeImage != (Lightbox.imageArray.length - 1)){
|
||||||
|
$('#nextLink').show().click(function(){
|
||||||
|
|
||||||
|
Lightbox.changeImage(Lightbox.activeImage +1); return false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
this.enableKeyboardNav();
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
enableKeyboardNav: function() {
|
||||||
|
document.onkeydown = this.keyboardAction;
|
||||||
|
},
|
||||||
|
|
||||||
|
disableKeyboardNav: function() {
|
||||||
|
document.onkeydown = '';
|
||||||
|
},
|
||||||
|
|
||||||
|
keyboardAction: function(e) {
|
||||||
|
if (e == null) { // ie
|
||||||
|
keycode = event.keyCode;
|
||||||
|
escapeKey = 27;
|
||||||
|
} else { // mozilla
|
||||||
|
keycode = e.keyCode;
|
||||||
|
escapeKey = e.DOM_VK_ESCAPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
key = String.fromCharCode(keycode).toLowerCase();
|
||||||
|
|
||||||
|
if((key == 'x') || (key == 'o') || (key == 'c') || (keycode == escapeKey)){ // close lightbox
|
||||||
|
Lightbox.end();
|
||||||
|
} else if((key == 'p') || (keycode == 37)){ // display previous image
|
||||||
|
if(Lightbox.activeImage != 0){
|
||||||
|
Lightbox.disableKeyboardNav();
|
||||||
|
Lightbox.changeImage(Lightbox.activeImage - 1);
|
||||||
|
}
|
||||||
|
} else if((key == 'n') || (keycode == 39)){ // display next image
|
||||||
|
if(Lightbox.activeImage != (Lightbox.imageArray.length - 1)){
|
||||||
|
Lightbox.disableKeyboardNav();
|
||||||
|
Lightbox.changeImage(Lightbox.activeImage + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
preloadNeighborImages: function(){
|
||||||
|
|
||||||
|
if((Lightbox.imageArray.length - 1) > Lightbox.activeImage){
|
||||||
|
preloadNextImage = new Image();
|
||||||
|
preloadNextImage.src = Lightbox.imageArray[Lightbox.activeImage + 1][0];
|
||||||
|
}
|
||||||
|
if(Lightbox.activeImage > 0){
|
||||||
|
preloadPrevImage = new Image();
|
||||||
|
preloadPrevImage.src = Lightbox.imageArray[Lightbox.activeImage - 1][0];
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
end: function() {
|
||||||
|
this.disableKeyboardNav();
|
||||||
|
$('#lightbox').hide();
|
||||||
|
$("#overlay").fadeOut();
|
||||||
|
$("select, object, embed").show();
|
||||||
|
},
|
||||||
|
|
||||||
|
getPageSize : function(){
|
||||||
|
var xScroll, yScroll;
|
||||||
|
|
||||||
|
if (window.innerHeight && window.scrollMaxY) {
|
||||||
|
xScroll = window.innerWidth + window.scrollMaxX;
|
||||||
|
yScroll = window.innerHeight + window.scrollMaxY;
|
||||||
|
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
|
||||||
|
xScroll = document.body.scrollWidth;
|
||||||
|
yScroll = document.body.scrollHeight;
|
||||||
|
} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
|
||||||
|
xScroll = document.body.offsetWidth;
|
||||||
|
yScroll = document.body.offsetHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
var windowWidth, windowHeight;
|
||||||
|
|
||||||
|
if (self.innerHeight) { // all except Explorer
|
||||||
|
if(document.documentElement.clientWidth){
|
||||||
|
windowWidth = document.documentElement.clientWidth;
|
||||||
|
} else {
|
||||||
|
windowWidth = self.innerWidth;
|
||||||
|
}
|
||||||
|
windowHeight = self.innerHeight;
|
||||||
|
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
|
||||||
|
windowWidth = document.documentElement.clientWidth;
|
||||||
|
windowHeight = document.documentElement.clientHeight;
|
||||||
|
} else if (document.body) { // other Explorers
|
||||||
|
windowWidth = document.body.clientWidth;
|
||||||
|
windowHeight = document.body.clientHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
// for small pages with total height less then height of the viewport
|
||||||
|
if(yScroll < windowHeight){
|
||||||
|
pageHeight = windowHeight;
|
||||||
|
} else {
|
||||||
|
pageHeight = yScroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// for small pages with total width less then width of the viewport
|
||||||
|
if(xScroll < windowWidth){
|
||||||
|
pageWidth = xScroll;
|
||||||
|
} else {
|
||||||
|
pageWidth = windowWidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
|
||||||
|
return arrayPageSize;
|
||||||
|
},
|
||||||
|
getPageScroll : function(){
|
||||||
|
|
||||||
|
var xScroll, yScroll;
|
||||||
|
|
||||||
|
if (self.pageYOffset) {
|
||||||
|
yScroll = self.pageYOffset;
|
||||||
|
xScroll = self.pageXOffset;
|
||||||
|
} else if (document.documentElement && document.documentElement.scrollTop){ // Explorer 6 Strict
|
||||||
|
yScroll = document.documentElement.scrollTop;
|
||||||
|
xScroll = document.documentElement.scrollLeft;
|
||||||
|
} else if (document.body) {// all other Explorers
|
||||||
|
yScroll = document.body.scrollTop;
|
||||||
|
xScroll = document.body.scrollLeft;
|
||||||
|
}
|
||||||
|
|
||||||
|
arrayPageScroll = new Array(xScroll,yScroll)
|
||||||
|
return arrayPageScroll;
|
||||||
|
},
|
||||||
|
pause : function(ms){
|
||||||
|
var date = new Date();
|
||||||
|
curDate = null;
|
||||||
|
do{var curDate = new Date();}
|
||||||
|
while( curDate - date < ms);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$(document).ready(function(){
|
||||||
|
Lightbox.initialize();
|
||||||
|
});
|
||||||
|
|
@ -1,17 +1,15 @@
|
||||||
//<!--
|
|
||||||
|
|
||||||
function validateFrmAddUser() {
|
function validateFrmAddUser() {
|
||||||
if ($('login').value == "") {
|
if ($("#login").value == "") {
|
||||||
alert("The username field cannot be left blank.");
|
alert("The username field cannot be left blank.");
|
||||||
document.frm_add.login.select();
|
document.frm_add.login.select();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ($('password').value == "") {
|
if ($("#password").val() == "") {
|
||||||
alert("The password field cannot be left blank.");
|
alert("The password field cannot be left blank.");
|
||||||
document.frm_add.password.select();
|
document.frm_add.password.select();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ($('password').value != $('repass').value) {
|
if ($("#password").val() != $("#repass").val()) {
|
||||||
alert("The password must match,\nplease verify them.");
|
alert("The password must match,\nplease verify them.");
|
||||||
document.frm_add.password.focus();
|
document.frm_add.password.focus();
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -19,17 +17,33 @@ function validateFrmAddUser() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function verifyExistingUser() {
|
function verifyExistingUser() {
|
||||||
$('div-process').style.display="block";
|
$("#div-process").css({display:"block"});
|
||||||
el = $('target');
|
$("#target").css({display:"block"});
|
||||||
el.style.display="block";
|
$.ajax({
|
||||||
var path = 'ajax.php?action=verify&login='+$('login').value;
|
url: "ajax.php?action=verify&login="+$("#login").val(),
|
||||||
new Ajax(path, {
|
cache: false,
|
||||||
onComplete:function(e) {
|
success: function(html){
|
||||||
el.setHTML(e);
|
$("#target").html(html);
|
||||||
$('div-process').style.display="none";
|
$("#div-process").css({display:"none"});
|
||||||
|
/*$("#login").css({display:"none"});*/
|
||||||
}
|
}
|
||||||
}).request();
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function exit(el, path) {
|
||||||
|
el=document.getElementById(el);
|
||||||
|
$(el).css({display:"block"});
|
||||||
|
$(el).html("Processing request...");
|
||||||
|
$.ajax({
|
||||||
|
url: path,
|
||||||
|
cache: false,
|
||||||
|
success: function(html){
|
||||||
|
$(el).html(html);
|
||||||
|
window.location='../login.php';
|
||||||
|
}
|
||||||
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -44,4 +58,3 @@ function selectFeedType(feed_url,username){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//-->
|
|
||||||
|
|
@ -32,18 +32,13 @@ if ($user->isAdmin()) {
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta name="generator" content="gelato cms <?php echo version();?>" />
|
<meta name="generator" content="gelato cms <?php echo version();?>" />
|
||||||
<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
|
<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
|
||||||
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/mootools.js"></script>
|
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/jquery.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<!--
|
$(document).ready(function(){
|
||||||
window.onload = function() {
|
$("#divMessages").fadeOut(5000,function(){
|
||||||
contenedor = new Fx.Style('divMessages', 'opacity', {duration: 5000, onComplete:
|
$("#divMessages").css({display:"none"});
|
||||||
function() {
|
});
|
||||||
document.getElementById('divMessages').style.display="none";
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
contenedor.custom(1,0);
|
|
||||||
}
|
|
||||||
-->
|
|
||||||
</script>
|
</script>
|
||||||
<style type="text/css" media="screen">
|
<style type="text/css" media="screen">
|
||||||
@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
|
@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,6 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="post">
|
<div class="post">
|
||||||
<span class="option">{Caption}</span>
|
<span class="option">{Caption}</span>
|
||||||
<p><img src="{PhotoURL}" alt="{PhotoAlt}" {Effect} /></p>
|
<p><a {Effect}><img src="{PhotoURL}" alt="{PhotoAlt}" /></a></a></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -53,7 +53,7 @@ if ($user->isAdmin()) {
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta name="generator" content="gelato cms <?php echo version();?>" />
|
<meta name="generator" content="gelato cms <?php echo version();?>" />
|
||||||
<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
|
<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
|
||||||
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/mootools.js"></script>
|
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/jquery.js"></script>
|
||||||
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/tools.js"></script>
|
<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/tools.js"></script>
|
||||||
<style type="text/css" media="screen">
|
<style type="text/css" media="screen">
|
||||||
@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
|
@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue