Subversion Repositories Sites.tela-botanica.org

Compare Revisions

Regard whitespace Rev 433 → Rev 434

/trunk/wikini/maj_wikini/actions/galerie/configuration/gal_config.inc.php
77,7 → 77,7
 
// Configuration du rendu
/** Nom du fichier de squelette à utiliser pour la liste des pages.*/
define('GAL_SQUELETTE_LISTE', 'gal_liste.tpl.html');
define('GAL_SQUELETTE_LISTE', 'gal_liste_ss_inclusion.tpl.html');
 
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
/trunk/wikini/maj_wikini/actions/galerie/presentation/scripts/showthumb.php
1,52 → 1,99
<?php
if($_GET['img'] == "")
// Vérification de la présence d'un chemin vers l'image
if($_GET['img'] == '') {
exit;
}
// Récupération de paramêtres
$_image_ = urldecode( $_GET['img'] );
 
$_dossier = dirname($_image_).'/cache/';
$_fichier = pathinfo($_image_);
$_fichier['filename'] = trim(basename($_image_, $_fichier['extension']), '.');
$_width_min_ = intval($_GET['width']);
$_height_min_ = intval($_GET['height']);
$_quality_ = intval($_GET['quality']);
$_centrage = false;
if (isset($_GET['centrage'])) {
$_centrage = (bool)$_GET['centrage'];
}
 
// Création du dossier de cache
if (!is_dir($_dossier)) {
mkdir($_dossier);
}
// Création du nom du fichier de cache
$fichier_cache = $_dossier.$_fichier['filename'].'_w'.$_width_min_.'_q'.$_quality_.'.'.$_fichier['extension'];
// Recherche de la présence d'une image en cache ou création de celle-ci
if (file_exists($fichier_cache)) {
switch (strtolower($_fichier['extension'])) {
case 'jpg' :
header('Content-type: image/jpg');
Imagejpeg(ImageCreateFromJpeg($fichier_cache));
break;
case 'gif' :
header('Content-type: image/gif');
Imagegif(ImageCreateFromGif($fichier_cache));
break;
case 'png' :
header('Content-type: image/png');
Imagepng(ImageCreateFromPng($fichier_cache));
break;
}
} else {
// Calcul de la hauteur et de la largeur
$info = getimagesize($_image_);
if ($info[0] == '') {
exit();
}
$new_w = $_width_min_;
$imagedata = getimagesize($_image_);
 
if(!$imagedata[0])
exit();
 
$new_h = (int)($imagedata[1]*($new_w/$imagedata[0]));
 
$new_h = (int)($info[1]*($new_w/$info[0]));
if(($_height_min_) AND ($new_h > $_height_min_)) {
$new_h = $_height_min_;
$new_w = (int)($imagedata[0]*($new_h/$imagedata[1]));
$new_w = (int)($info[0]*($new_h/$info[1]));
}
 
if(strtolower(substr($_image_,-3)) == "jpg") {
// Définition des points d'origine de destination
$dst_x = 0;
$dst_y = 0;
$dst_l = $new_w;
$dst_h = $new_h;
if ($_centrage != false) {
$dst_x = (int)(($_width_min_ - $new_w) / 2);
$dst_y = (int)(($_height_min_ - $new_h) / 2);
$dst_l = $_width_min_;
$dst_h = $_height_min_;
}
// Création de l'image
switch (strtolower($_fichier['extension'])) {
case 'jpg' :
header("Content-type: image/jpg");
$dst_img=ImageCreate($new_w,$new_h);
$dst_img = imagecreatetruecolor($dst_l, $dst_h);
$c_fond = imagecolorallocate($dst_img, 255, 255, 255);
imagefill($dst_img, 0, 0, $c_fond);
$src_img=ImageCreateFromJpeg($_image_);
$dst_img = imagecreatetruecolor($new_w, $new_h);
imagecopyresampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img),ImageSY($src_img));
imagecopyresampled($dst_img,$src_img,$dst_x,$dst_y,0,0,$new_w,$new_h,ImageSX($src_img),ImageSY($src_img));
$img_cache = Imagejpeg($dst_img, $fichier_cache, $_quality_);
$img = Imagejpeg($dst_img, '', $_quality_);
}
 
if(substr($_GET['img'],-3) == "gif") {
break;
case 'gif' :
header("Content-type: image/gif");
$dst_img=ImageCreate($new_w,$new_h);
$src_img=ImageCreateFromGif($_image_);
ImagePaletteCopy($dst_img,$src_img);
ImageCopyResized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img),ImageSY($src_img));
ImageCopyResized($dst_img,$src_img,$dst_x,$dst_y,0,0,$new_w,$new_h,ImageSX($src_img),ImageSY($src_img));
$img_cache = Imagegif($dst_img, $fichier_cache, $_quality_);
$img = Imagegif($dst_img,'', $_quality_);
}
 
if(substr($_GET['img'],-3) == "png") {
break;
case 'png' :
header("Content-type: image/png");
$dst_img=ImageCreate($new_w,$new_h);
$src_img=ImageCreateFromPng($_image_);
ImagePaletteCopy($dst_img,$src_img);
ImageCopyResized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,ImageSX($src_img),ImageSY($src_img));
ImageCopyResized($dst_img,$src_img,$dst_x,$dst_y,0,0,$new_w,$new_h,ImageSX($src_img),ImageSY($src_img));
$img_cache = Imagepng($dst_img, $fichier_cache, $_quality_);
$img = Imagepng($dst_img,'', $_quality_);
break;
}
 
?>
}
?>
/trunk/wikini/maj_wikini/actions/galerie/presentation/scripts/jquery.galerie-0.1.pack.js
New file
0,0 → 1,1511
/**
* jQuery lightBox plugin
* This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
* and adapted to me for use like a plugin from jQuery.
* @name jquery-lightbox-0.4.js
* @author Leandro Vieira Pinho - http://leandrovieira.com
* @version 0.4
* @date November 17, 2007
* @category jQuery plugin
* @copyright (c) 2007 Leandro Vieira Pinho (leandrovieira.com)
* @license CC Attribution-No Derivative Works 2.5 Brazil - http://creativecommons.org/licenses/by-nd/2.5/br/deed.en_US
* @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
*/
 
// Offering a Custom Alias suport - More info: http://docs.jquery.com/Plugins/Authoring#Custom_Alias
(function($) {
/**
* $ is an alias to jQuery object
*
*/
$.fn.lightBox = function(settings) {
// Settings to configure the jQuery lightBox plugin how you like
settings = jQuery.extend({
// Configuration related to overlay
overlayBgColor: '#000', // (string) Background color to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the hexadecimal values for the red, green, and blue values of the color.
overlayOpacity: 0.8, // (integer) Opacity value to overlay; inform: 0.X. Where X are number from 0 to 9
// Configuration related to images
imageLoading: 'actions/galerie/presentation/images/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon
imageBtnPrev: 'actions/galerie/presentation/images/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image
imageBtnNext: 'actions/galerie/presentation/images/lightbox-btn-next.gif', // (string) Path and the name of the next button image
imageBtnClose: 'actions/galerie/presentation/images/lightbox-btn-close.gif', // (string) Path and the name of the close btn
imageBlank: 'actions/galerie/presentation/images/lightbox-blank.gif', // (string) Path and the name of a blank image (one pixel)
// Configuration related to container image box
containerBorderSize: 10, // (integer) If you adjust the padding in the CSS for the container, #lightbox-container-image-box, you will need to update this value
containerResizeSpeed: 400, // (integer) Specify the resize duration of container image. These number are miliseconds. 400 is default.
// Configuration related to texts in caption. For example: Image 2 of 8. You can alter either "Image" and "of" texts.
txtImage: 'Image', // (string) Specify text "Image"
txtOf: 'of', // (string) Specify text "of"
// Configuration related to keyboard navigation
keyToClose: 'c', // (string) (c = close) Letter to close the jQuery lightBox interface. Beyond this letter, the letter X and the SCAPE key is used to.
keyToPrev: 'p', // (string) (p = previous) Letter to show the previous image
keyToNext: 'n', // (string) (n = next) Letter to show the next image.
// Don´t alter these variables in any way
imageArray: [],
activeImage: 0
},settings);
// Caching the jQuery object with all elements matched
var jQueryMatchedObj = this; // This, in this context, refer to jQuery object
/**
* Initializing the plugin calling the start function
*
* @return boolean false
*/
function _initialize() {
_start(this,jQueryMatchedObj); // This, in this context, refer to object (link) which the user have clicked
return false; // Avoid the browser following the link
}
/**
* Start the jQuery lightBox plugin
*
* @param object objClicked The object (link) whick the user have clicked
* @param object jQueryMatchedObj The jQuery object with all elements matched
*/
function _start(objClicked,jQueryMatchedObj) {
// Hime some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
$('embed, object, select').css({ 'visibility' : 'hidden' });
// Call the function to create the markup structure; style some elements; assign events in some elements.
_set_interface();
// Unset total images in imageArray
settings.imageArray.length = 0;
// Unset image active information
settings.activeImage = 0;
// We have an image set? Or just an image? Let´s see it.
if ( jQueryMatchedObj.length == 1 ) {
settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));
} else {
// Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references
for ( var i = 0; i < jQueryMatchedObj.length; i++ ) {
settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title')));
}
}
while ( settings.imageArray[settings.activeImage][0] != objClicked.getAttribute('href') ) {
settings.activeImage++;
}
// Call the function that prepares image exibition
_set_image_to_view();
}
/**
* Create the jQuery lightBox plugin interface
*
* The HTML markup will be like that:
<div id="jquery-overlay"></div>
<div id="jquery-lightbox">
<div id="lightbox-container-image-box">
<div id="lightbox-container-image">
<img src="../fotos/XX.jpg" id="lightbox-image">
<div id="lightbox-nav">
<a href="#" id="lightbox-nav-btnPrev"></a>
<a href="#" id="lightbox-nav-btnNext"></a>
</div>
<div id="lightbox-loading">
<a href="#" id="lightbox-loading-link">
<img src="../images/lightbox-ico-loading.gif">
</a>
</div>
</div>
</div>
<div id="lightbox-container-image-data-box">
<div id="lightbox-container-image-data">
<div id="lightbox-image-details">
<span id="lightbox-image-details-caption"></span>
<span id="lightbox-image-details-currentNumber"></span>
</div>
<div id="lightbox-secNav">
<a href="#" id="lightbox-secNav-btnClose">
<img src="../images/lightbox-btn-close.gif">
</a>
</div>
</div>
</div>
</div>
*
*/
function _set_interface() {
// Apply the HTML markup into body tag
$('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="' + settings.imageLoading + '"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="' + settings.imageBtnClose + '"></a></div></div></div></div>');
// Get page sizes
var arrPageSizes = ___getPageSize();
// Style overlay and show it
$('#jquery-overlay').css({
backgroundColor: settings.overlayBgColor,
opacity: settings.overlayOpacity,
width: arrPageSizes[0],
height: arrPageSizes[1]
}).fadeIn();
// Get page scroll
var arrPageScroll = ___getPageScroll();
// Calculate top and left offset for the jquery-lightbox div object and show it
$('#jquery-lightbox').css({
top: arrPageScroll[1] + (arrPageSizes[3] / 10),
left: arrPageScroll[0]
}).show();
// Assigning click events in elements to close overlay
$('#jquery-overlay,#jquery-lightbox').click(function() {
_finish();
});
// Assign the _finish function to lightbox-loading-link and lightbox-secNav-btnClose objects
$('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function() {
_finish();
return false;
});
// If window was resized, calculate the new overlay dimensions
$(window).resize(function() {
// Get page sizes
var arrPageSizes = ___getPageSize();
// Style overlay and show it
$('#jquery-overlay').css({
width: arrPageSizes[0],
height: arrPageSizes[1]
});
// Get page scroll
var arrPageScroll = ___getPageScroll();
// Calculate top and left offset for the jquery-lightbox div object and show it
$('#jquery-lightbox').css({
top: arrPageScroll[1] + (arrPageSizes[3] / 10),
left: arrPageScroll[0]
});
});
}
/**
* Prepares image exibition; doing a image´s preloader to calculate it´s size
*
*/
function _set_image_to_view() { // show the loading
// Show the loading
$('#lightbox-loading').show();
// Hide some elements
$('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
// Image preload process
var objImagePreloader = new Image();
objImagePreloader.onload = function() {
$('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);
// Perfomance an effect in the image container resizing it
_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);
// clear onLoad, IE behaves irratically with animated gifs otherwise
objImagePreloader.onload=function(){};
}
objImagePreloader.src = settings.imageArray[settings.activeImage][0];
};
/**
* Perfomance an effect in the image container resizing it
*
* @param integer intImageWidth The image´s width that will be showed
* @param integer intImageHeight The image´s height that will be showed
*/
function _resize_container_image_box(intImageWidth,intImageHeight) {
// Get current width and height
var intCurrentWidth = $('#lightbox-container-image-box').width();
var intCurrentHeight = $('#lightbox-container-image-box').height();
// Get the width and height of the selected image plus the padding
var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image´s width and the left and right padding value
var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image´s height and the left and right padding value
// Diferences
var intDiffW = intCurrentWidth - intWidth;
var intDiffH = intCurrentHeight - intHeight;
// Perfomance the effect
$('#lightbox-container-image-box').animate({ width: intWidth, height: intHeight },settings.containerResizeSpeed,function() { _show_image(); });
if ( ( intDiffW == 0 ) && ( intDiffH == 0 ) ) {
if ( $.browser.msie ) {
___pause(250);
} else {
___pause(100);
}
}
$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height: intImageHeight + (settings.containerBorderSize * 2) });
$('#lightbox-container-image-data-box').css({ width: intImageWidth });
};
/**
* Show the prepared image
*
*/
function _show_image() {
$('#lightbox-loading').hide();
$('#lightbox-image').fadeIn(function() {
_show_image_data();
_set_navigation();
});
_preload_neighbor_images();
};
/**
* Show the image information
*
*/
function _show_image_data() {
$('#lightbox-container-image-data-box').slideDown('fast');
$('#lightbox-image-details-caption').hide();
if ( settings.imageArray[settings.activeImage][1] ) {
$('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();
}
// If we have a image set, display 'Image X of X'
if ( settings.imageArray.length > 1 ) {
$('#lightbox-image-details-currentNumber').html(settings.txtImage + ' ' + ( settings.activeImage + 1 ) + ' ' + settings.txtOf + ' ' + settings.imageArray.length).show();
}
}
/**
* Display the button navigations
*
*/
function _set_navigation() {
$('#lightbox-nav').show();
 
// Instead to define this configuration in CSS file, we define here. And it´s need to IE. Just.
$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
// Show the prev button, if not the first image in set
if ( settings.activeImage != 0 ) {
// Show the images button for Next buttons
$('#lightbox-nav-btnPrev').unbind().hover(function() {
$(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' });
},function() {
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
}).show().bind('click',function() {
settings.activeImage = settings.activeImage - 1;
_set_image_to_view();
return false;
});
}
// Show the next button, if not the last image in set
if ( settings.activeImage != ( settings.imageArray.length -1 ) ) {
// Show the images button for Next buttons
$('#lightbox-nav-btnNext').unbind().hover(function() {
$(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' });
},function() {
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
}).show().bind('click',function() {
settings.activeImage = settings.activeImage + 1;
_set_image_to_view();
return false;
});
}
// Enable keyboard navigation
_enable_keyboard_navigation();
}
/**
* Enable a support to keyboard navigation
*
*/
function _enable_keyboard_navigation() {
$(document).keydown(function(objEvent) {
_keyboard_action(objEvent);
});
}
/**
* Disable the support to keyboard navigation
*
*/
function _disable_keyboard_navigation() {
$(document).unbind();
}
/**
* Perform the keyboard actions
*
*/
function _keyboard_action(objEvent) {
// To ie
if ( objEvent == null ) {
keycode = event.keyCode;
escapeKey = 27;
// To Mozilla
} else {
keycode = objEvent.keyCode;
escapeKey = objEvent.DOM_VK_ESCAPE;
}
// Get the key in lower case form
key = String.fromCharCode(keycode).toLowerCase();
// Verify the keys to close the ligthBox
if ( ( key == settings.keyToClose ) || ( key == 'x' ) || ( keycode == escapeKey ) ) {
_finish();
}
// Verify the key to show the previous image
if ( ( key == settings.keyToPrev ) || ( keycode == 37 ) ) {
// If we´re not showing the first image, call the previous
if ( settings.activeImage != 0 ) {
settings.activeImage = settings.activeImage - 1;
_set_image_to_view();
_disable_keyboard_navigation();
}
}
// Verify the key to show the next image
if ( ( key == settings.keyToNext ) || ( keycode == 39 ) ) {
// If we´re not showing the last image, call the next
if ( settings.activeImage != ( settings.imageArray.length - 1 ) ) {
settings.activeImage = settings.activeImage + 1;
_set_image_to_view();
_disable_keyboard_navigation();
}
}
}
/**
* Preload prev and next images being showed
*
*/
function _preload_neighbor_images() {
if ( (settings.imageArray.length -1) > settings.activeImage ) {
objNext = new Image();
objNext.src = settings.imageArray[settings.activeImage + 1][0];
}
if ( settings.activeImage > 0 ) {
objPrev = new Image();
objPrev.src = settings.imageArray[settings.activeImage -1][0];
}
}
/**
* Remove jQuery lightBox plugin HTML markup
*
*/
function _finish() {
$('#jquery-lightbox').remove();
$('#jquery-overlay').fadeOut(function() { $('#jquery-overlay').remove(); });
// Show some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
$('embed, object, select').css({ 'visibility' : 'visible' });
}
/**
/ THIRD FUNCTION
* getPageSize() by quirksmode.com
*
* @return Array Return an array with page width, height and window width, height
*/
function ___getPageSize() {
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;
};
/**
/ THIRD FUNCTION
* getPageScroll() by quirksmode.com
*
* @return Array Return an array with x,y page scroll values.
*/
function ___getPageScroll() {
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;
};
/**
* Stop the code execution from a escified time in milisecond
*
*/
function ___pause(ms) {
var date = new Date();
curDate = null;
do { var curDate = new Date(); }
while ( curDate - date < ms);
};
// Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once
return this.unbind('click').click(_initialize);
};
})(jQuery); // Call and execute the function immediately passing the jQuery object
 
/**
* jQuery SliderViewer Plugin
* @name jquery.slideviewer.1.1.js
* @author Gian Carlo Mingati - http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html
* @version 1.1
* @date October 6, 2007
* @category jQuery plugin
* @copyright (c) 2007 Gian Carlo Mingati (gcmingati.net)
* @license ?
* @example Visit http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html for more informations about this jQuery plugin
*/
 
jQuery(function(){
// Nous cachons les images si le javascript est activé!
jQuery("div.svw").removeClass("galerie");
jQuery("div.svw").css({
'width' : '50px',
'height' : '20px',
'background' : '#fff'
});
jQuery("div.svw ul").css({
'position' : 'relative',
'left' : '-999em'
});
jQuery("div.svw").prepend("<img src='http://www.gcmingati.net/wordpress/wp-content/uploads/svwloader.gif' class='ldrgif' alt='loading...'/ >");
});
var j = 0;
jQuery.fn.slideView = function(settings) {
settings = jQuery.extend({
easeFunc: "easeInOutExpo", /* <-- easing function names changed in jquery.easing.1.2.js */
easeTime: 750,
toolTip: false
}, settings);
return this.each(function(){
var container = jQuery(this);
container.find("img.ldrgif").remove(); // removes the preloader gif
container.removeClass("svw").addClass("stripViewer");
var pictWidth = container.find("li").find("img").width();
var pictHeight = container.find("li").find("img").height();
var pictEls = container.find("li").size();
var stripViewerWidth = pictWidth*pictEls;
container.find("ul").css("width" , stripViewerWidth); //assegnamo la larghezza alla lista UL
container.css("width" , pictWidth);
container.css("height" , pictHeight);
container.each(function(i) {
jQuery(this).after("<div class='stripTransmitter' id='stripTransmitter" + j + "'><ul><\/ul><\/div>");
jQuery(this).find("li").each(function(n) {
jQuery("div#stripTransmitter" + j + " ul").append("<li><a title='" + jQuery(this).find("img").attr("alt") + "' href='#'>"+(n+1)+"<\/a><\/li>");
});
jQuery("div#stripTransmitter" + j + " a").each(function(z) {
jQuery(this).bind("click", function(){
jQuery(this).addClass("current").parent().parent().find("a").not(jQuery(this)).removeClass("current"); // wow!
var cnt = - (pictWidth*z);
jQuery(this).parent().parent().parent().prev().find("ul").animate({ left: cnt}, settings.easeTime, settings.easeFunc);
return false;
});
});
jQuery("div#stripTransmitter" + j).css("width" , pictWidth);
jQuery("div#stripTransmitter" + j + " a:eq(0)").addClass("current");
if(settings.toolTip){
container.next(".stripTransmitter ul").find("a").Tooltip({
track: true,
delay: 0,
showURL: false,
showBody: false
});
}
});
j++;
});
};
 
/**
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built In easIng capabilities added In jQuery 1.1
* to offer multiple easIng options
*
* @copyright (c) 2007 George Smith
* @license Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/
 
// t: current time, b: begInnIng value, c: change In value, d: duration
jQuery.easing['jswing'] = jQuery.easing['swing'];
 
jQuery.extend( jQuery.easing,
{
def: 'easeOutQuad',
swing: function (x, t, b, c, d) {
//alert(jQuery.easing.default);
return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
},
easeInQuad: function (x, t, b, c, d) {
return c*(t/=d)*t + b;
},
easeOutQuad: function (x, t, b, c, d) {
return -c *(t/=d)*(t-2) + b;
},
easeInOutQuad: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t + b;
return -c/2 * ((--t)*(t-2) - 1) + b;
},
easeInCubic: function (x, t, b, c, d) {
return c*(t/=d)*t*t + b;
},
easeOutCubic: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t + 1) + b;
},
easeInOutCubic: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t + b;
return c/2*((t-=2)*t*t + 2) + b;
},
easeInQuart: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t + b;
},
easeOutQuart: function (x, t, b, c, d) {
return -c * ((t=t/d-1)*t*t*t - 1) + b;
},
easeInOutQuart: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
return -c/2 * ((t-=2)*t*t*t - 2) + b;
},
easeInQuint: function (x, t, b, c, d) {
return c*(t/=d)*t*t*t*t + b;
},
easeOutQuint: function (x, t, b, c, d) {
return c*((t=t/d-1)*t*t*t*t + 1) + b;
},
easeInOutQuint: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
return c/2*((t-=2)*t*t*t*t + 2) + b;
},
easeInSine: function (x, t, b, c, d) {
return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
},
easeOutSine: function (x, t, b, c, d) {
return c * Math.sin(t/d * (Math.PI/2)) + b;
},
easeInOutSine: function (x, t, b, c, d) {
return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
},
easeInExpo: function (x, t, b, c, d) {
return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
},
easeOutExpo: function (x, t, b, c, d) {
return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
},
easeInOutExpo: function (x, t, b, c, d) {
if (t==0) return b;
if (t==d) return b+c;
if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
},
easeInCirc: function (x, t, b, c, d) {
return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
},
easeOutCirc: function (x, t, b, c, d) {
return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
},
easeInOutCirc: function (x, t, b, c, d) {
if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
},
easeInElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
},
easeOutElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
},
easeInOutElastic: function (x, t, b, c, d) {
var s=1.70158;var p=0;var a=c;
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
if (a < Math.abs(c)) { a=c; var s=p/4; }
else var s = p/(2*Math.PI) * Math.asin (c/a);
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
},
easeInBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*(t/=d)*t*((s+1)*t - s) + b;
},
easeOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
},
easeInOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
},
easeInBounce: function (x, t, b, c, d) {
return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
},
easeOutBounce: function (x, t, b, c, d) {
if ((t/=d) < (1/2.75)) {
return c*(7.5625*t*t) + b;
} else if (t < (2/2.75)) {
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
} else if (t < (2.5/2.75)) {
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
} else {
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}
},
easeInOutBounce: function (x, t, b, c, d) {
if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
}
});
/*
* jQuery Tooltip plugin 1.1
*
* http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/
*
* Copyright (c) 2006 Jörn Zaefferer, Stefan Petre
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Revision: $Id: jquery.tooltip.js 2237 2007-07-04 19:11:15Z joern.zaefferer $
*
*/
 
/**
* Display a customized tooltip instead of the default one
* for every selected element. The tooltip behaviour mimics
* the default one, but lets you style the tooltip and
* specify the delay before displaying it. In addition, it displays the
* href value, if it is available.
*
* Requires dimensions plugin.
*
* When used on a page with select elements, include the bgiframe plugin. It is used if present.
*
* To style the tooltip, use these selectors in your stylesheet:
*
* #tooltip - The tooltip container
*
* #tooltip h3 - The tooltip title
*
* #tooltip div.body - The tooltip body, shown when using showBody
*
* #tooltip div.url - The tooltip url, shown when using showURL
*
*
* @example $('a, input, img').Tooltip();
* @desc Shows tooltips for anchors, inputs and images, if they have a title
*
* @example $('label').Tooltip({
* delay: 0,
* track: true,
* event: "click"
* });
* @desc Shows tooltips for labels with no delay, tracking mousemovement, displaying the tooltip when the label is clicked.
*
* @example // modify global settings
* $.extend($.fn.Tooltip.defaults, {
* track: true,
* delay: 0,
* showURL: false,
* showBody: " - ",
* fixPNG: true
* });
* // setup fancy tooltips
* $('a.pretty').Tooltip({
* extraClass: "fancy"
* });
$('img.pretty').Tooltip({
* extraClass: "fancy-img",
* });
* @desc This example starts with modifying the global settings, applying them to all following Tooltips; Afterwards, Tooltips for anchors with class pretty are created with an extra class for the Tooltip: "fancy" for anchors, "fancy-img" for images
*
* @param Object settings (optional) Customize your Tooltips
* @option Number delay The number of milliseconds before a tooltip is display. Default: 250
* @option Boolean track If true, let the tooltip track the mousemovement. Default: false
* @option Boolean showURL If true, shows the href or src attribute within p.url. Defaul: true
* @option String showBody If specified, uses the String to split the title, displaying the first part in the h3 tag, all following in the p.body tag, separated with <br/>s. Default: null
* @option String extraClass If specified, adds the class to the tooltip helper. Default: null
* @option Boolean fixPNG If true, fixes transparent PNGs in IE. Default: false
* @option Function bodyHandler If specified its called to format the tooltip-body, hiding the title-part. Default: none
* @option Number top The top-offset for the tooltip position. Default: 15
* @option Number left The left-offset for the tooltip position. Default: 15
*
* @name Tooltip
* @type jQuery
* @cat Plugins/Tooltip
* @author Jörn Zaefferer (http://bassistance.de)
*/
/**
* A global flag to disable all tooltips.
*
* @example $("button.openModal").click(function() {
* $.Tooltip.blocked = true;
* // do some other stuff, eg. showing a modal dialog
* $.Tooltip.blocked = false;
* });
*
* @property
* @name $.Tooltip.blocked
* @type Boolean
* @cat Plugins/Tooltip
*/
/**
* Global defaults for tooltips. Apply to all calls to the Tooltip plugin after modifying the defaults.
*
* @example $.extend($.Tooltip.defaults, {
* track: true,
* delay: 0
* });
*
* @property
* @name $.Tooltip.defaults
* @type Map
* @cat Plugins/Tooltip
*/
(function($) {
// the tooltip element
var helper = {},
// the current tooltipped element
current,
// the title of the current element, used for restoring
title,
// timeout id for delayed tooltips
tID,
// IE 5.5 or 6
IE = $.browser.msie && /MSIE\s(5\.5|6\.)/.test(navigator.userAgent),
// flag for mouse tracking
track = false;
$.Tooltip = {
blocked: false,
defaults: {
delay: 200,
showURL: true,
extraClass: "",
top: 15,
left: 15
},
block: function() {
$.Tooltip.blocked = !$.Tooltip.blocked;
}
};
$.fn.extend({
Tooltip: function(settings) {
settings = $.extend({}, $.Tooltip.defaults, settings);
createHelper();
return this.each(function() {
this.tSettings = settings;
// copy tooltip into its own expando and remove the title
this.tooltipText = this.title;
$(this).removeAttr("title");
// also remove alt attribute to prevent default tooltip in IE
this.alt = "";
})
.hover(save, hide)
.click(hide);
},
fixPNG: IE ? function() {
return this.each(function () {
var image = $(this).css('backgroundImage');
if (image.match(/^url\(["']?(.*\.png)["']?\)$/i)) {
image = RegExp.$1;
$(this).css({
'backgroundImage': 'none',
'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='" + image + "')"
}).each(function () {
var position = $(this).css('position');
if (position != 'absolute' && position != 'relative')
$(this).css('position', 'relative');
});
}
});
} : function() { return this; },
unfixPNG: IE ? function() {
return this.each(function () {
$(this).css({'filter': '', backgroundImage: ''});
});
} : function() { return this; },
hideWhenEmpty: function() {
return this.each(function() {
$(this)[ $(this).html() ? "show" : "hide" ]();
});
},
url: function() {
return this.attr('href') || this.attr('src');
}
});
function createHelper() {
// there can be only one tooltip helper
if( helper.parent )
return;
// create the helper, h3 for title, div for url
helper.parent = $('<div id="tooltip"><h3></h3><div class="body"></div><div class="url"></div></div>')
// hide it at first
.hide()
// add to document
.appendTo('body');
// apply bgiframe if available
if ( $.fn.bgiframe )
helper.parent.bgiframe();
// save references to title and url elements
helper.title = $('h3', helper.parent);
helper.body = $('div.body', helper.parent);
helper.url = $('div.url', helper.parent);
}
// main event handler to start showing tooltips
function handle(event) {
// show helper, either with timeout or on instant
if( this.tSettings.delay )
tID = setTimeout(show, this.tSettings.delay);
else
show();
// if selected, update the helper position when the mouse moves
track = !!this.tSettings.track;
$('body').bind('mousemove', update);
// update at least once
update(event);
}
// save elements title before the tooltip is displayed
function save() {
// if this is the current source, or it has no title (occurs with click event), stop
if ( $.Tooltip.blocked || this == current || !this.tooltipText )
return;
 
// save current
current = this;
title = this.tooltipText;
if ( this.tSettings.bodyHandler ) {
helper.title.hide();
helper.body.html( this.tSettings.bodyHandler.call(this) ).show();
} else if ( this.tSettings.showBody ) {
var parts = title.split(this.tSettings.showBody);
helper.title.html(parts.shift()).show();
helper.body.empty();
for(var i = 0, part; part = parts[i]; i++) {
if(i > 0)
helper.body.append("<br/>");
helper.body.append(part);
}
helper.body.hideWhenEmpty();
} else {
helper.title.html(title).show();
helper.body.hide();
}
// if element has href or src, add and show it, otherwise hide it
if( this.tSettings.showURL && $(this).url() )
helper.url.html( $(this).url().replace('http://', '') ).show();
else
helper.url.hide();
// add an optional class for this tip
helper.parent.addClass(this.tSettings.extraClass);
 
// fix PNG background for IE
if (this.tSettings.fixPNG )
helper.parent.fixPNG();
handle.apply(this, arguments);
}
// delete timeout and show helper
function show() {
tID = null;
helper.parent.show();
update();
}
/**
* callback for mousemove
* updates the helper position
* removes itself when no current element
*/
function update(event) {
if($.Tooltip.blocked)
return;
// stop updating when tracking is disabled and the tooltip is visible
if ( !track && helper.parent.is(":visible")) {
$('body').unbind('mousemove', update)
}
// if no current element is available, remove this listener
if( current == null ) {
$('body').unbind('mousemove', update);
return;
}
var left = helper.parent[0].offsetLeft;
var top = helper.parent[0].offsetTop;
if(event) {
// position the helper 15 pixel to bottom right, starting from mouse position
left = event.pageX + current.tSettings.left;
top = event.pageY + current.tSettings.top;
helper.parent.css({
left: left + 'px',
top: top + 'px'
});
}
var v = viewport(),
h = helper.parent[0];
// check horizontal position
if(v.x + v.cx < h.offsetLeft + h.offsetWidth) {
left -= h.offsetWidth + 20 + current.tSettings.left;
helper.parent.css({left: left + 'px'});
}
// check vertical position
if(v.y + v.cy < h.offsetTop + h.offsetHeight) {
top -= h.offsetHeight + 20 + current.tSettings.top;
helper.parent.css({top: top + 'px'});
}
}
function viewport() {
return {
x: $(window).scrollLeft(),
y: $(window).scrollTop(),
cx: $(window).width(),
cy: $(window).height()
};
}
// hide helper and restore added classes and the title
function hide(event) {
if($.Tooltip.blocked)
return;
// clear timeout if possible
if(tID)
clearTimeout(tID);
// no more current element
current = null;
helper.parent.hide().removeClass( this.tSettings.extraClass );
if( this.tSettings.fixPNG )
helper.parent.unfixPNG();
}
})(jQuery);
 
/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* $LastChangedDate: 2007-06-22 04:38:37 +0200 (Fr, 22 Jun 2007) $
* $Rev: 2141 $
*
* Version: 1.0b2
*/
 
(function($){
 
// store a copy of the core height and width methods
var height = $.fn.height,
width = $.fn.width;
 
$.fn.extend({
/**
* If used on document, returns the document's height (innerHeight)
* If used on window, returns the viewport's (window) height
* See core docs on height() to see what happens when used on an element.
*
* @example $("#testdiv").height()
* @result 200
*
* @example $(document).height()
* @result 800
*
* @example $(window).height()
* @result 400
*
* @name height
* @type Object
* @cat Plugins/Dimensions
*/
height: function() {
if ( this[0] == window )
return self.innerHeight ||
$.boxModel && document.documentElement.clientHeight ||
document.body.clientHeight;
if ( this[0] == document )
return Math.max( document.body.scrollHeight, document.body.offsetHeight );
return height.apply(this, arguments);
},
/**
* If used on document, returns the document's width (innerWidth)
* If used on window, returns the viewport's (window) width
* See core docs on height() to see what happens when used on an element.
*
* @example $("#testdiv").width()
* @result 200
*
* @example $(document).width()
* @result 800
*
* @example $(window).width()
* @result 400
*
* @name width
* @type Object
* @cat Plugins/Dimensions
*/
width: function() {
if ( this[0] == window )
return self.innerWidth ||
$.boxModel && document.documentElement.clientWidth ||
document.body.clientWidth;
 
if ( this[0] == document )
return Math.max( document.body.scrollWidth, document.body.offsetWidth );
 
return width.apply(this, arguments);
},
/**
* Returns the inner height value (without border) for the first matched element.
* If used on document, returns the document's height (innerHeight)
* If used on window, returns the viewport's (window) height
*
* @example $("#testdiv").innerHeight()
* @result 800
*
* @name innerHeight
* @type Number
* @cat Plugins/Dimensions
*/
innerHeight: function() {
return this[0] == window || this[0] == document ?
this.height() :
this.is(':visible') ?
this[0].offsetHeight - num(this, 'borderTopWidth') - num(this, 'borderBottomWidth') :
this.height() + num(this, 'paddingTop') + num(this, 'paddingBottom');
},
/**
* Returns the inner width value (without border) for the first matched element.
* If used on document, returns the document's Width (innerWidth)
* If used on window, returns the viewport's (window) width
*
* @example $("#testdiv").innerWidth()
* @result 1000
*
* @name innerWidth
* @type Number
* @cat Plugins/Dimensions
*/
innerWidth: function() {
return this[0] == window || this[0] == document ?
this.width() :
this.is(':visible') ?
this[0].offsetWidth - num(this, 'borderLeftWidth') - num(this, 'borderRightWidth') :
this.width() + num(this, 'paddingLeft') + num(this, 'paddingRight');
},
/**
* Returns the outer height value (including border) for the first matched element.
* Cannot be used on document or window.
*
* @example $("#testdiv").outerHeight()
* @result 1000
*
* @name outerHeight
* @type Number
* @cat Plugins/Dimensions
*/
outerHeight: function() {
return this[0] == window || this[0] == document ?
this.height() :
this.is(':visible') ?
this[0].offsetHeight :
this.height() + num(this,'borderTopWidth') + num(this, 'borderBottomWidth') + num(this, 'paddingTop') + num(this, 'paddingBottom');
},
/**
* Returns the outer width value (including border) for the first matched element.
* Cannot be used on document or window.
*
* @example $("#testdiv").outerHeight()
* @result 1000
*
* @name outerHeight
* @type Number
* @cat Plugins/Dimensions
*/
outerWidth: function() {
return this[0] == window || this[0] == document ?
this.width() :
this.is(':visible') ?
this[0].offsetWidth :
this.width() + num(this, 'borderLeftWidth') + num(this, 'borderRightWidth') + num(this, 'paddingLeft') + num(this, 'paddingRight');
},
/**
* Returns how many pixels the user has scrolled to the right (scrollLeft).
* Works on containers with overflow: auto and window/document.
*
* @example $("#testdiv").scrollLeft()
* @result 100
*
* @name scrollLeft
* @type Number
* @cat Plugins/Dimensions
*/
/**
* Sets the scrollLeft property and continues the chain.
* Works on containers with overflow: auto and window/document.
*
* @example $("#testdiv").scrollLeft(10).scrollLeft()
* @result 10
*
* @name scrollLeft
* @param Number value A positive number representing the desired scrollLeft.
* @type jQuery
* @cat Plugins/Dimensions
*/
scrollLeft: function(val) {
if ( val != undefined )
// set the scroll left
return this.each(function() {
if (this == window || this == document)
window.scrollTo( val, $(window).scrollTop() );
else
this.scrollLeft = val;
});
// return the scroll left offest in pixels
if ( this[0] == window || this[0] == document )
return self.pageXOffset ||
$.boxModel && document.documentElement.scrollLeft ||
document.body.scrollLeft;
return this[0].scrollLeft;
},
/**
* Returns how many pixels the user has scrolled to the bottom (scrollTop).
* Works on containers with overflow: auto and window/document.
*
* @example $("#testdiv").scrollTop()
* @result 100
*
* @name scrollTop
* @type Number
* @cat Plugins/Dimensions
*/
/**
* Sets the scrollTop property and continues the chain.
* Works on containers with overflow: auto and window/document.
*
* @example $("#testdiv").scrollTop(10).scrollTop()
* @result 10
*
* @name scrollTop
* @param Number value A positive number representing the desired scrollTop.
* @type jQuery
* @cat Plugins/Dimensions
*/
scrollTop: function(val) {
if ( val != undefined )
// set the scroll top
return this.each(function() {
if (this == window || this == document)
window.scrollTo( $(window).scrollLeft(), val );
else
this.scrollTop = val;
});
// return the scroll top offset in pixels
if ( this[0] == window || this[0] == document )
return self.pageYOffset ||
$.boxModel && document.documentElement.scrollTop ||
document.body.scrollTop;
 
return this[0].scrollTop;
},
/**
* Returns the top and left positioned offset in pixels.
* The positioned offset is the offset between a positioned
* parent and the element itself.
*
* @example $("#testdiv").position()
* @result { top: 100, left: 100 }
*
* @name position
* @param Map options Optional settings to configure the way the offset is calculated.
* @option Boolean margin Should the margin of the element be included in the calculations? False by default.
* @option Boolean border Should the border of the element be included in the calculations? False by default.
* @option Boolean padding Should the padding of the element be included in the calculations? False by default.
* @param Object returnObject An object to store the return value in, so as not to break the chain. If passed in the
* chain will not be broken and the result will be assigned to this object.
* @type Object
* @cat Plugins/Dimensions
*/
position: function(options, returnObject) {
var elem = this[0], parent = elem.parentNode, op = elem.offsetParent,
options = $.extend({ margin: false, border: false, padding: false, scroll: false }, options || {}),
x = elem.offsetLeft,
y = elem.offsetTop,
sl = elem.scrollLeft,
st = elem.scrollTop;
// Mozilla and IE do not add the border
if ($.browser.mozilla || $.browser.msie) {
// add borders to offset
x += num(elem, 'borderLeftWidth');
y += num(elem, 'borderTopWidth');
}
 
if ($.browser.mozilla) {
do {
// Mozilla does not add the border for a parent that has overflow set to anything but visible
if ($.browser.mozilla && parent != elem && $.css(parent, 'overflow') != 'visible') {
x += num(parent, 'borderLeftWidth');
y += num(parent, 'borderTopWidth');
}
 
if (parent == op) break; // break if we are already at the offestParent
} while ((parent = parent.parentNode) && (parent.tagName.toLowerCase() != 'body' || parent.tagName.toLowerCase() != 'html'));
}
var returnValue = handleOffsetReturn(elem, options, x, y, sl, st);
if (returnObject) { $.extend(returnObject, returnValue); return this; }
else { return returnValue; }
},
/**
* Returns the location of the element in pixels from the top left corner of the viewport.
*
* For accurate readings make sure to use pixel values for margins, borders and padding.
*
* Known issues:
* - Issue: A div positioned relative or static without any content before it and its parent will report an offsetTop of 0 in Safari
* Workaround: Place content before the relative div ... and set height and width to 0 and overflow to hidden
*
* @example $("#testdiv").offset()
* @result { top: 100, left: 100, scrollTop: 10, scrollLeft: 10 }
*
* @example $("#testdiv").offset({ scroll: false })
* @result { top: 90, left: 90 }
*
* @example var offset = {}
* $("#testdiv").offset({ scroll: false }, offset)
* @result offset = { top: 90, left: 90 }
*
* @name offset
* @param Map options Optional settings to configure the way the offset is calculated.
* @option Boolean margin Should the margin of the element be included in the calculations? True by default.
* @option Boolean border Should the border of the element be included in the calculations? False by default.
* @option Boolean padding Should the padding of the element be included in the calculations? False by default.
* @option Boolean scroll Should the scroll offsets of the parent elements be included in the calculations? True by default.
* When true it adds the totla scroll offets of all parents to the total offset and also adds two properties
* to the returned object, scrollTop and scrollLeft.
* @options Boolean lite Will use offsetLite instead of offset when set to true. False by default.
* @param Object returnObject An object to store the return value in, so as not to break the chain. If passed in the
* chain will not be broken and the result will be assigned to this object.
* @type Object
* @cat Plugins/Dimensions
*/
offset: function(options, returnObject) {
var x = 0, y = 0, sl = 0, st = 0,
elem = this[0], parent = this[0], op, parPos, elemPos = $.css(elem, 'position'),
mo = $.browser.mozilla, ie = $.browser.msie, sf = $.browser.safari, oa = $.browser.opera,
absparent = false, relparent = false,
options = $.extend({ margin: true, border: false, padding: false, scroll: true, lite: false }, options || {});
// Use offsetLite if lite option is true
if (options.lite) return this.offsetLite(options, returnObject);
if (elem.tagName.toLowerCase() == 'body') {
// Safari is the only one to get offsetLeft and offsetTop properties of the body "correct"
// Except they all mess up when the body is positioned absolute or relative
x = elem.offsetLeft;
y = elem.offsetTop;
// Mozilla ignores margin and subtracts border from body element
if (mo) {
x += num(elem, 'marginLeft') + (num(elem, 'borderLeftWidth')*2);
y += num(elem, 'marginTop') + (num(elem, 'borderTopWidth') *2);
} else
// Opera ignores margin
if (oa) {
x += num(elem, 'marginLeft');
y += num(elem, 'marginTop');
} else
// IE does not add the border in Standards Mode
if (ie && jQuery.boxModel) {
x += num(elem, 'borderLeftWidth');
y += num(elem, 'borderTopWidth');
}
} else {
do {
parPos = $.css(parent, 'position');
x += parent.offsetLeft;
y += parent.offsetTop;
 
// Mozilla and IE do not add the border
if (mo || ie) {
// add borders to offset
x += num(parent, 'borderLeftWidth');
y += num(parent, 'borderTopWidth');
 
// Mozilla does not include the border on body if an element isn't positioned absolute and is without an absolute parent
if (mo && parPos == 'absolute') absparent = true;
// IE does not include the border on the body if an element is position static and without an absolute or relative parent
if (ie && parPos == 'relative') relparent = true;
}
 
op = parent.offsetParent;
if (options.scroll || mo) {
do {
if (options.scroll) {
// get scroll offsets
sl += parent.scrollLeft;
st += parent.scrollTop;
}
// Mozilla does not add the border for a parent that has overflow set to anything but visible
if (mo && parent != elem && $.css(parent, 'overflow') != 'visible') {
x += num(parent, 'borderLeftWidth');
y += num(parent, 'borderTopWidth');
}
parent = parent.parentNode;
} while (parent != op);
}
parent = op;
 
if (parent.tagName.toLowerCase() == 'body' || parent.tagName.toLowerCase() == 'html') {
// Safari and IE Standards Mode doesn't add the body margin for elments positioned with static or relative
if ((sf || (ie && $.boxModel)) && elemPos != 'absolute' && elemPos != 'fixed') {
x += num(parent, 'marginLeft');
y += num(parent, 'marginTop');
}
// Mozilla does not include the border on body if an element isn't positioned absolute and is without an absolute parent
// IE does not include the border on the body if an element is positioned static and without an absolute or relative parent
if ( (mo && !absparent && elemPos != 'fixed') ||
(ie && elemPos == 'static' && !relparent) ) {
x += num(parent, 'borderLeftWidth');
y += num(parent, 'borderTopWidth');
}
break; // Exit the loop
}
} while (parent);
}
 
var returnValue = handleOffsetReturn(elem, options, x, y, sl, st);
 
if (returnObject) { $.extend(returnObject, returnValue); return this; }
else { return returnValue; }
},
/**
* Returns the location of the element in pixels from the top left corner of the viewport.
* This method is much faster than offset but not as accurate. This method can be invoked
* by setting the lite option to true in the offset method.
*
* @name offsetLite
* @param Map options Optional settings to configure the way the offset is calculated.
* @option Boolean margin Should the margin of the element be included in the calculations? True by default.
* @option Boolean border Should the border of the element be included in the calculations? False by default.
* @option Boolean padding Should the padding of the element be included in the calculations? False by default.
* @option Boolean scroll Should the scroll offsets of the parent elements be included in the calculations? True by default.
* When true it adds the totla scroll offets of all parents to the total offset and also adds two properties
* to the returned object, scrollTop and scrollLeft.
* @param Object returnObject An object to store the return value in, so as not to break the chain. If passed in the
* chain will not be broken and the result will be assigned to this object.
* @type Object
* @cat Plugins/Dimensions
*/
offsetLite: function(options, returnObject) {
var x = 0, y = 0, sl = 0, st = 0, parent = this[0], op,
options = $.extend({ margin: true, border: false, padding: false, scroll: true }, options || {});
do {
x += parent.offsetLeft;
y += parent.offsetTop;
 
op = parent.offsetParent;
if (options.scroll) {
// get scroll offsets
do {
sl += parent.scrollLeft;
st += parent.scrollTop;
parent = parent.parentNode;
} while(parent != op);
}
parent = op;
} while (parent && parent.tagName.toLowerCase() != 'body' && parent.tagName.toLowerCase() != 'html');
 
var returnValue = handleOffsetReturn(this[0], options, x, y, sl, st);
 
if (returnObject) { $.extend(returnObject, returnValue); return this; }
else { return returnValue; }
}
});
 
/**
* Handles converting a CSS Style into an Integer.
* @private
*/
var num = function(el, prop) {
return parseInt($.css(el.jquery?el[0]:el,prop))||0;
};
 
/**
* Handles the return value of the offset and offsetLite methods.
* @private
*/
var handleOffsetReturn = function(elem, options, x, y, sl, st) {
if ( !options.margin ) {
x -= num(elem, 'marginLeft');
y -= num(elem, 'marginTop');
}
 
// Safari and Opera do not add the border for the element
if ( options.border && ($.browser.safari || $.browser.opera) ) {
x += num(elem, 'borderLeftWidth');
y += num(elem, 'borderTopWidth');
} else if ( !options.border && !($.browser.safari || $.browser.opera) ) {
x -= num(elem, 'borderLeftWidth');
y -= num(elem, 'borderTopWidth');
}
 
if ( options.padding ) {
x += num(elem, 'paddingLeft');
y += num(elem, 'paddingTop');
}
// do not include scroll offset on the element
if ( options.scroll ) {
sl -= elem.scrollLeft;
st -= elem.scrollTop;
}
 
return options.scroll ? { top: y - st, left: x - sl, scrollTop: st, scrollLeft: sl }
: { top: y, left: x };
};
 
})(jQuery);
/trunk/wikini/maj_wikini/actions/galerie/presentation/scripts/jquery.galerie-0.1.js
401,6 → 401,7
var pictEls = container.find("li").size();
var stripViewerWidth = pictWidth*pictEls;
container.find("ul").css("width" , stripViewerWidth); //assegnamo la larghezza alla lista UL
//container.find("li").css("width" , pictWidth);
container.css("width" , pictWidth);
container.css("height" , pictHeight);
container.each(function(i) {
/trunk/wikini/maj_wikini/actions/galerie/presentation/squelettes/gal_liste.tpl.html
29,7 → 29,7
<div id="<?=$id;?>" class="galerie">
<ul>
<?php foreach ($images as $image) : ?>
<li>
<li style="width:<?=$css['largeur'];?>px;">
<a href="<?=$image['url_img'];?>" rel="lightbox" title="<?=$image['fichier_nom'];?>">
<img src="<?=$image['url_img_mini'];?>" alt="<?=$image['fichier_nom'];?>"/>
</a>
/trunk/wikini/maj_wikini/actions/galerie/presentation/squelettes/gal_liste_ss_inclusion.tpl.html
New file
0,0 → 1,38
<!-- GALLERIE - DEBUT -->
<?php if ($erreur) : ?>
 
<p class="pap_erreur"><?=$erreur;?></p>
 
<?php else : ?>
<script type="text/javascript">
// Galerie : SliderViewer
jQuery(function(){
// Nous cachons les images si le javascript est activé!
jQuery("div#<?=$id;?>").removeClass("galerie");
jQuery("div#<?=$id;?>").addClass("svw");
});
$(window).bind("load", function() {
$("div#<?=$id;?>").slideView({
easeFunc: "easeInOutSine",
easeTime: 500,
toolTip: false
});
});
// Galerie : LightBox
$(function() {
$('div#<?=$id;?> a').lightBox();
});
</script>
<div id="<?=$id;?>" class="galerie">
<ul>
<?php foreach ($images as $image) : ?>
<li style="width:<?=$css['largeur'];?>px;">
<a href="<?=$image['url_img'];?>" rel="lightbox" title="<?=$image['fichier_nom'];?>">
<img src="<?=$image['url_img_mini'];?>" alt="<?=$image['fichier_nom'];?>"/>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<!-- GALLERIE - FIN -->
/trunk/wikini/maj_wikini/actions/galerie/presentation/styles/jquery.lightbox-0.4.css
New file
0,0 → 1,101
/**
* jQuery lightBox plugin
* This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
* and adapted to me for use like a plugin from jQuery.
* @name jquery-lightbox-0.4.css
* @author Leandro Vieira Pinho - http://leandrovieira.com
* @version 0.4
* @date November 17, 2007
* @category jQuery plugin
* @copyright (c) 2007 Leandro Vieira Pinho (leandrovieira.com)
* @license CC Attribution-No Derivative Works 2.5 Brazil - http://creativecommons.org/licenses/by-nd/2.5/br/deed.en_US
* @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
*/
#jquery-overlay {
position: absolute;
top: 0;
left: 0;
z-index: 90;
width: 100%;
height: 500px;
}
#jquery-lightbox {
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 100;
text-align: center;
line-height: 0;
}
#jquery-lightbox a img { border: none; }
#lightbox-container-image-box {
position: relative;
background-color: #fff;
width: 250px;
height: 250px;
margin: 0 auto;
}
#lightbox-container-image { padding: 10px; }
#lightbox-loading {
position: absolute;
top: 40%;
left: 0%;
height: 25%;
width: 100%;
text-align: center;
line-height: 0;
}
#lightbox-nav {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 10;
}
#lightbox-container-image-box > #lightbox-nav { left: 0; }
#lightbox-nav a { outline: none;}
#lightbox-nav-btnPrev, #lightbox-nav-btnNext {
width: 49%;
height: 100%;
zoom: 1;
display: block;
}
#lightbox-nav-btnPrev {
left: 0;
float: left;
}
#lightbox-nav-btnNext {
right: 0;
float: right;
}
#lightbox-container-image-data-box {
font: 10px Verdana, Helvetica, sans-serif;
background-color: #fff;
margin: 0 auto;
line-height: 1.4em;
overflow: auto;
width: 100%;
padding: 0 10px 0;
}
#lightbox-container-image-data {
padding: 0 10px;
color: #666;
}
#lightbox-container-image-data #lightbox-image-details {
width: 70%;
float: left;
text-align: left;
}
#lightbox-image-details-caption { font-weight: bold; }
#lightbox-image-details-currentNumber {
display: block;
clear: left;
padding-bottom: 1.0em;
}
#lightbox-secNav-btnClose {
width: 66px;
float: right;
padding-bottom: 0.7em;
}
/trunk/wikini/maj_wikini/actions/galerie/presentation/styles/jquery.galerie-0.1.css
24,9 → 24,15
.stripViewer {
position: relative;
overflow: hidden;
border: 5px solid #444;
margin: 0 0 1px 0;}
.stripViewer li a img {border:none;}
border-style: solid;
border-bottom-color: #333333;
border-right-color: #555555;
border-left-color: #BBBBBB;
border-top-color: #DDDDDD;
margin: 5px 10px;}
.stripViewer li a img {
border:none;
margin:0 auto;}
.stripViewer ul { /* this is your UL of images */
margin: 0;
padding: 0;
48,6 → 54,7
.stripTransmitter ul li{
width: 20px;
float:left;
padding:0;
margin: 0 1px 1px 0;}
.stripTransmitter a{
font: bold 10px Verdana, Arial;
56,7 → 63,8
background: #444;
color: #fff;
text-decoration: none;
display: block;}
display: block;
border:none;}
.stripTransmitter a:hover, a.current{
background: #fff;
color: #444;}
101,7 → 109,9
text-align: center;
line-height: 0;
}
#jquery-lightbox a img { border: none; }
#jquery-lightbox a img {
margin:0 auto;
border: none; }
#lightbox-container-image-box {
position: relative;
background-color: #fff;
109,7 → 119,8
height: 250px;
margin: 0 auto;
}
#lightbox-container-image { padding: 10px; }
#lightbox-container-image {
padding:0;}
#lightbox-loading {
position: absolute;
top: 40%;
/trunk/wikini/maj_wikini/actions/galerie/presentation/styles/jquery.sliderviewer.css
New file
0,0 → 1,71
/*Gallerie CSS en cas d'abscence de JS*/
.galerie {
background-color: #444;
padding: 10px;
width:190px;
height:190px;
overflow: auto;
white-space:nowrap;}
.galerie ul {
list-style: none;
padding:0;
margin:0;}
.galerie ul li {display: inline;}
.galerie ul img {
border: 5px solid #3e3e3e;}
.galerie ul a:hover img {
border: 5px solid #fff;
color: #fff;}
 
/* jQuery SlideViewer plugin*/
/*core classes*/
.stripViewer {
position: relative;
overflow: hidden;
border: 5px solid #ff0000;
margin: 0 0 1px 0;}
.stripViewer li a img {border:none;}
.stripViewer ul { /* this is your UL of images */
margin: 0;
padding: 0;
position: relative;
left: 0;
top: 0;
width: 1%;
list-style-type: none;}
.stripViewer ul li {
float:left;}
.stripTransmitter {
overflow: auto;
width: 1%;}
.stripTransmitter ul {
margin: 0;
padding: 0;
position: relative;
list-style-type: none;}
.stripTransmitter ul li{
width: 20px;
float:left;
margin: 0 1px 1px 0;}
.stripTransmitter a{
font: bold 10px Verdana, Arial;
text-align: center;
line-height: 22px;
background: #ff0000;
color: #fff;
text-decoration: none;
display: block;}
.stripTransmitter a:hover, a.current{
background: #fff;
color: #ff0000;}
/*tooltips formatting*/
#tooltip {
background: #fff;
color: #000;
opacity: 0.85;
border: 5px solid #dedede;}
#tooltip h3 {
font: normal 10px Verdana;
margin: 0;
padding: 6px 2px;
border: 0;}
/trunk/wikini/maj_wikini/actions/galerie/galerie.php
New file
0,0 → 1,155
<?php
/*vim: set expandtab tabstop=4 shiftwidth=4: */
// +------------------------------------------------------------------------------------------------------+
// | PHP version 5.1 |
// +------------------------------------------------------------------------------------------------------+
// | Copyright (C) 1999-2006 Tela Botanica (accueil@tela-botanica.org) |
// +------------------------------------------------------------------------------------------------------+
// | This file is part of wikini. |
// | |
// | wikini is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | |
// | wikini is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | |
// | You should have received a copy of the GNU General Public License |
// | along with Foobar; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id$
/**
* wikini - galerie.php
*
* Description :
*
*@package wikini
//Auteur original :
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 1999-2007
*@version $Revision$ $Date$
// +------------------------------------------------------------------------------------------------------+
*/
 
// +------------------------------------------------------------------------------------------------------+
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
// Définition de constantes
define('DS', DIRECTORY_SEPARATOR);
/** Constante "dynamique" stockant le chemin absolue de base de l'application recherche de plante.*/
define('GAL_CHEMIN_APPLI', dirname(realpath(__FILE__)).DS);
/** Constante "dynamique" stockant le chemin relatif de base de l'application recherche de plante.*/
define('GAL_CHEMIN_APPLI_RELATIF', str_replace($_SERVER['DOCUMENT_ROOT'], '', GAL_CHEMIN_APPLI));
 
// Initialisation des variables
$sortie = '';
$GLOBALS['_GALLERIE_']['erreur'] = '';
 
// Inclusion du fichier de config de l'action
require_once GAL_CHEMIN_APPLI.'configuration'.DS.'gal_config.inc.php';
 
//+----------------------------------------------------------------------------------------------------------------+
// Récupération des paramêtres et gestion des erreurs de paramètrage
if (!$this->GetParameter('dossier')) {
$options['dossier'] = null;
$GLOBALS['_GALERIE_']['erreur'] = "Applette GALERIE : le paramètre 'dossier' est obligatoire !";
} else {
$options['dossier'] = $this->GetParameter('dossier');
}
if (!$this->GetParameter('id')) {
$options['id'] = microtime();
//$GLOBALS['_GALERIE_']['erreur'] = "Applette GALERIE : le paramètre 'id' est obligatoire !";
} else {
$options['id'] = $this->GetParameter('id');
}
if (!$this->GetParameter('largeur')) {
$options['largeur'] = 160;
} else {
$options['largeur'] = $this->GetParameter('largeur');
}
if (!$this->GetParameter('hauteur')) {
$options['hauteur'] = 160;
} else {
$options['hauteur'] = $this->GetParameter('hauteur');
}
if (!isset($options['qualite'])) {
$options['qualite'] = 70;
}
if (!isset($options['img_largeur'])) {
$options['img_largeur'] = 800;
}
if (!isset($options['img_hauteur'])) {
$options['img_hauteur'] = 600;
}
if (!isset($options['img_qualite'])) {
$options['img_qualite'] = 70;
}
 
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
//+----------------------------------------------------------------------------------------------------------------+
// Récupération des données
$noimage = 0;
$GLOBALS['_GALERIE_']['id'] = $options['id'];
$GLOBALS['_GALERIE_']['dossier'] = GAL_CHEMIN_RACINE.$options['dossier'];
if (is_dir($GLOBALS['_GALERIE_']['dossier'])) {
if ($dh = opendir($GLOBALS['_GALERIE_']['dossier'])) {
while (($f = readdir($dh)) !== false) {
if((substr(strtolower($f),-3) == 'jpg') || (substr(strtolower($f),-3) == 'gif') || (substr(strtolower($f),-3) == 'png')) {
$noimage++;
$images[] = array('filename' => $f, 'hauteur' => $h, 'largeur' => $w);
array_multisort($images, SORT_ASC, SORT_REGULAR);
}
}
closedir($dh);
}
} else {
$GLOBALS['_GALERIE_']['erreur'] = "Applette GALERIE : le dossier d'images est introuvable à : ".$GLOBALS['_GALERIE_']['dossier'];
}
if($noimage) {
$GLOBALS['_GALERIE_']['css']['chemin'] = GAL_CHEMIN_STYLES_RELATIF;
$GLOBALS['_GALERIE_']['css']['largeur'] = $options['largeur'];
$GLOBALS['_GALERIE_']['script']['chemin'] = GAL_CHEMIN_SCRIPTS_RELATIF;
$GLOBALS['_GALERIE_']['images'] = array();
foreach($images as $image) {
if ($image['filename'] != '') {
$aso_img['fichier_nom'] = $image['filename'];
$aso_img['url_img'] = 'http://'.$_SERVER['HTTP_HOST'].GAL_CHEMIN_SCRIPTS_RELATIF.'showthumb.php?img='.urlencode(GAL_CHEMIN_RACINE.$options['dossier'].DS.$image['filename']).'&amp;width='.$options['img_largeur'].'&amp;height='.$options['img_hauteur'].'&amp;quality='.$options['img_qualite'];
$aso_img['url_img_mini'] = 'http://'.$_SERVER['HTTP_HOST'].GAL_CHEMIN_SCRIPTS_RELATIF.'showthumb.php?img='.urlencode(GAL_CHEMIN_RACINE.$options['dossier'].DS.$image['filename']).'&amp;width='.$options['img_largeur'].'&amp;height='.$options['img_hauteur'].'&amp;quality='.$options['qualite'];
$GLOBALS['_GALERIE_']['images'][] = $aso_img;
}
}
}
 
//+----------------------------------------------------------------------------------------------------------------+
// Gestion des squelettes
// Extrait les variables et les ajoutes à l'espace de noms local
extract($GLOBALS['_GALERIE_']);
// Démarre le buffer
ob_start();
// Inclusion du fichier
include GAL_CHEMIN_SQUELETTE.GAL_SQUELETTE_LISTE;
// Récupérer le contenu du buffer
$sortie = ob_get_contents();
// Arrête et détruit le buffer
ob_end_clean();
 
//+----------------------------------------------------------------------------------------------------------------+
// Sortie
echo $sortie;
 
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log$
*
* +-- Fin du code ----------------------------------------------------------------------------------------+
*/
?>
/trunk/wikini/maj_wikini/actions/galerie/index.htm
New file
0,0 → 1,78
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery lightBox plugin</title>
 
<link rel="stylesheet" type="text/css" href="../style-projects-jquery.css" />
<!-- Arquivos utilizados pelo jQuery lightBox plugin -->
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/jquery.lightbox-0.4.pack.js"></script>
<link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.4.css" media="screen" />
<!-- / fim dos arquivos utilizados pelo jQuery lightBox plugin -->
<!-- Ativando o jQuery lightBox plugin -->
<script type="text/javascript">
$(function() {
$('#gallery a').lightBox();
});
</script>
<style type="text/css">
/* jQuery lightBox plugin - Gallery style */
#gallery {
background-color: #444;
padding: 10px;
width: 520px;
}
#gallery ul { list-style: none; }
#gallery ul li { display: inline; }
#gallery ul img {
border: 5px solid #3e3e3e;
border-width: 5px 5px 20px;
}
#gallery ul a:hover img {
border: 5px solid #fff;
border-width: 5px 5px 20px;
color: #fff;
}
#gallery ul a:hover { color: #fff; }
</style>
</head>
 
<body>
 
<h2 id="example">Example</h2>
<p>Click in the image and see the <strong>jQuery lightBox plugin</strong> in action.</p>
<div id="gallery">
<ul>
<li>
<a href="photos/image1.jpg" title="Utilize a flexibilidade dos seletores da jQuery e crie um grupo de imagens como desejar. $('#gallery').lightBox();">
<img src="photos/thumb_image1.jpg" width="72" height="72" alt="" />
</a>
</li>
<li>
<a href="photos/image2.jpg" title="Utilize a flexibilidade dos seletores da jQuery e crie um grupo de imagens como desejar. $('#gallery a').lightBox();">
<img src="photos/thumb_image2.jpg" width="72" height="72" alt="" />
</a>
</li>
<li>
<a href="photos/image3.jpg" title="Utilize a flexibilidade dos seletores da jQuery e crie um grupo de imagens como desejar. $('#gallery a').lightBox();">
<img src="photos/thumb_image3.jpg" width="72" height="72" alt="" />
</a>
</li>
<li>
<a href="photos/image4.jpg" title="Utilize a flexibilidade dos seletores da jQuery e crie um grupo de imagens como desejar. $('#gallery a').lightBox();">
<img src="photos/thumb_image4.jpg" width="72" height="72" alt="" />
</a>
</li>
<li>
<a href="photos/image5.jpg" title="Utilize a flexibilidade dos seletores da jQuery e crie um grupo de imagens como desejar. $('#gallery a').lightBox();">
<img src="photos/thumb_image5.jpg" width="72" height="72" alt="" />
</a>
</li>
</ul>
</div>
 
</body>
</html>
/trunk/wikini/maj_wikini/actions/galerie.php
90,7 → 90,9
if (!isset($options['img_qualite'])) {
$options['img_qualite'] = 70;
}
 
if (!isset($options['squelette'])) {
$options['squelette'] = GAL_SQUELETTE_LISTE;
}
// +------------------------------------------------------------------------------------------------------+
// | CORPS du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
116,14 → 118,14
if($noimage) {
$GLOBALS['_GALERIE_']['css']['chemin'] = GAL_CHEMIN_STYLES_RELATIF;
$GLOBALS['_GALERIE_']['css']['largeur'] = $options['largeur']+10;
$GLOBALS['_GALERIE_']['css']['largeur'] = $options['largeur'];
$GLOBALS['_GALERIE_']['script']['chemin'] = GAL_CHEMIN_SCRIPTS_RELATIF;
$GLOBALS['_GALERIE_']['images'] = array();
foreach($images as $image) {
if ($image['filename'] != '') {
$aso_img['fichier_nom'] = $image['filename'];
$aso_img['url_img'] = 'http://'.$_SERVER['HTTP_HOST'].GAL_CHEMIN_SCRIPTS_RELATIF.'showthumb.php?img='.urlencode(GAL_CHEMIN_RACINE.$options['dossier'].DS.$image['filename']).'&amp;width='.$options['img_largeur'].'&amp;height='.$options['img_hauteur'].'&amp;quality='.$options['img_qualite'];
$aso_img['url_img_mini'] = 'http://'.$_SERVER['HTTP_HOST'].GAL_CHEMIN_SCRIPTS_RELATIF.'showthumb.php?img='.urlencode(GAL_CHEMIN_RACINE.$options['dossier'].DS.$image['filename']).'&amp;width='.$options['largeur'].'&amp;height='.$options['hauteur'].'&amp;quality='.$options['qualite'];
$aso_img['url_img'] = 'http://'.$_SERVER['HTTP_HOST'].GAL_CHEMIN_SCRIPTS_RELATIF.'showthumb.php?img='.urlencode(GAL_CHEMIN_RACINE.$options['dossier'].DS.$image['filename']).'&amp;width='.$options['img_largeur'].'&amp;height='.$options['img_hauteur'].'&amp;quality='.$options['img_qualite'].'&amp;centrage=0';
$aso_img['url_img_mini'] = 'http://'.$_SERVER['HTTP_HOST'].GAL_CHEMIN_SCRIPTS_RELATIF.'showthumb.php?img='.urlencode(GAL_CHEMIN_RACINE.$options['dossier'].DS.$image['filename']).'&amp;width='.$options['largeur'].'&amp;height='.$options['hauteur'].'&amp;quality='.$options['qualite'].'&amp;centrage=1';
$GLOBALS['_GALERIE_']['images'][] = $aso_img;
}
}
136,7 → 138,7
// Démarre le buffer
ob_start();
// Inclusion du fichier
include GAL_CHEMIN_SQUELETTE.GAL_SQUELETTE_LISTE;
include GAL_CHEMIN_SQUELETTE.$options['squelette'];
// Récupérer le contenu du buffer
$sortie = ob_get_contents();
// Arrête et détruit le buffer