Index: /extensions/Autosize/autosize.inc.php
===================================================================
--- /extensions/Autosize/autosize.inc.php (revision 17307)
+++ /extensions/Autosize/autosize.inc.php (revision 17308)
@@ -28,15 +28,14 @@
{
global $user,$page,$template,$cl_plugin;
-
-
// header ('X-UA-Compatible: n=7') ;
// header ('X-UA-Compatible: IE=Edge') ;
- if(isset($page['body_id']) && $page['body_id'] == 'theAdminPage' ) return ;
-
- if ('kardon' == $user['theme'] and isset($_GET['slideshow'])) return ;
-
+ if(isset($page['body_id']) && $page['body_id'] == 'theAdminPage' ) return ;
$ma_page=isset($page['body_id'])?$page['body_id']:"" ;
if ($ma_page=='thePiwiShackControllerPage') return ;
- $file =AUTOSIZE_PATH_ABS.'template/header.tpl' ;
+ if (!isset($template->files['pamooramics_content'])) return ;
+ if ('kardon' == $user['theme'] and isset($_GET['slideshow'])) return ;
+ $has_pamoorama=isset($template->files['pamooramics_content']);
+
+ $file =AUTOSIZE_PATH_ABS.'template/header.tpl' ;
$template->set_filenames(array('autosize_init_header'=> $file ));
$template->set_filenames(array('autosize_init'=>AUTOSIZE_PATH_ABS. "template/conflit.tpl" ) );
@@ -50,16 +49,14 @@
$template->assign(
array(
- 'autosize_parametres' => $autosize_parametres ,
- 'cl_plugins' => $cl_plugin ,
- 'cl_version' => $cl_plugin['version'] ,
- 'name' => $cl_plugin['name'] ,
- 'pamoorama' => isset($PAMOORAMICS_PATH)?"true":"false",
- 'theme' => $theme ,
- 'DEBUG_autosize' => $DEBUG_autosize ,
- 'AUTOSIZE_PATH' => str_replace("../","",AUTOSIZE_PATH) ,
- 'AUTOSIZE_PATH_ABS' => AUTOSIZE_PATH_ABS,
- 'Version_pwg' => PHPWG_VERSION ,
- 'loading' => AUTOSIZE_PATH . 'images/loading.gif'
- )
+ 'autosize_parametres' => $autosize_parametres ,
+ 'cl_plugins' => $cl_plugin ,
+ 'cl_version' => $cl_plugin['version'] ,
+ 'name' => $cl_plugin['name'] ,
+ 'pamoorama' => $has_pamoorama,
+ 'theme' => $theme ,
+ 'DEBUG_autosize' => $DEBUG_autosize ,
+ 'AUTOSIZE_PATH' => str_replace("../","",AUTOSIZE_PATH) ,
+ 'AUTOSIZE_PATH_ABS' => AUTOSIZE_PATH_ABS,
+ 'Version_pwg' => PHPWG_VERSION )
);
$template->concat('cl_conflit_init', $template->parse('autosize_init_header', true));
@@ -73,7 +70,5 @@
{
global $template,$user,$conf,$picture ,$page, $cl_plugin,$known_script ;
-
global $template,$user,$conf,$picture ,$page, $cl_plugin ;
-
if ('kardon' == $user['theme'] and isset($_GET['slideshow'])) return ;
if (!isset($PAMOORAMICS_PATH)) return ;
@@ -84,25 +79,16 @@
$DEBUG_autosize = isset($conf['cl_debug_conflit']) ? $conf['cl_debug_conflit'] : $DEBUG_autosize ;
//=====================================================================
-
-
- $ma_page=isset($page['body_id'])?$page['body_id']:"" ;
- $theme=$user['theme'];
- if ($ma_page=='thePiwiShackControllerPage') return ;
-
-
-$img_width=isset($picture['current']['width'])?$picture['current']['width']:480;
-$img_height=isset($picture['current']['height'])?$picture['current']['height']:320;
-
-$img_scaled_width=isset($picture['current']['scaled_width'])?$picture['current']['scaled_width']:480;
-$img_scaled_height=isset($picture['current']['scaled_height'])?$picture['current']['scaled_height']:320;
-
-
-
-
-$src_img_h=isset($_POST['src_img_h'])?$_POST['src_img_h']: $img_width ;
-$src_img_w= isset($_POST['src_img_w'])?$_POST['src_img_w']:$img_height ;
+ $ma_page=isset($page['body_id'])?$page['body_id']:"" ;
+ $theme=$user['theme'];
+ if ($ma_page=='thePiwiShackControllerPage') return ;
+ $img_width=isset($picture['current']['width'])?$picture['current']['width']:480;
+ $img_height=isset($picture['current']['height'])?$picture['current']['height']:320;
+ $img_scaled_width=isset($picture['current']['scaled_width'])?$picture['current']['scaled_width']:480;
+ $img_scaled_height=isset($picture['current']['scaled_height'])?$picture['current']['scaled_height']:320;
+ $src_img_h=isset($_POST['src_img_h'])?$_POST['src_img_h']: $img_width ;
+ $src_img_w= isset($_POST['src_img_w'])?$_POST['src_img_w']:$img_height ;
if(isset($_COOKIE['img_w'])){
-$src_img_w=$_COOKIE['img_w'];
-$src_img_h=$_COOKIE['img_h'];
+ $src_img_w=$_COOKIE['img_w'];
+ $src_img_h=$_COOKIE['img_h'];
}
@@ -139,9 +125,26 @@
var cookie_path ='". cookie_path() ."'
";
-
-
$template->append('footer_elements',$autoscript);
return ;
}// function cl_autosize_script_2
+ /*************************************
+ * cl_autosize_script_3()
+ **************************************/
+ static public function cl_autosize_script_3()
+ {
+ global $template;
+
+
+ $has_pamoorama=isset($template->files['pamooramics_content']);
+ if (!$has_pamoorama) return ;
+
+ $autoscript="
TEST
+ ";
+ $template->append('footer_elements',$autoscript);
+ return ;
+ }// function cl_autosize_script_3
//================================================================
@@ -227,5 +230,7 @@
$template->set_filenames(array('autosize_init_header'=> $file ));
$theme=$user['theme'];
- $deriv_type = pwg_get_session_var('picture_deriv', IMG_LARGE);
+ $deriv_type = pwg_get_session_var('picture_deriv', IMG_LARGE);
+ $defined_types = array_keys(ImageStdParams::get_defined_type_map());
+
if($autosize_parametres->check_icon_v == 'on'){
$template->assign('cl_autosize_button',
Index: /extensions/Autosize/css/autosize.css
===================================================================
--- /extensions/Autosize/css/autosize.css (revision 17307)
+++ /extensions/Autosize/css/autosize.css (revision 17308)
@@ -1,16 +1,20 @@
-
+ #bp_img_cla,#icon_gmaps,#bp_cla{
+
+ height:26px}
+ .actionButtons{
+ overflow:hidden;
+ height:30px}
#theImage {
-/* opacity: 0.1;
- filter: alpha(opacity:10);
- */
-
+
}
body {
}
+#bp_cla {
+ vertical-align: middle;
+ text-align: center;
+}
#the_page {
- /* background-color: #FF0000;
- margin-top: -4px;
-position:static ;*/
+
}
@@ -24,68 +28,54 @@
}
-#imageHeaderBar {background-color: transparent;
- /*
- margin-top: -4px;
-position:static ;*/
+#imageHeaderBar {
+
}
-#navThumbNext, #navThumbPrev{ /*height:200px;*/
+#navThumbNext, #navThumbPrev{
}
-/**/
+
#theImageAndInfos, #theImageAndTitle {
-/* background-color: #FF0000; */
+
}
#content {
- /* background-color: transparent;*/
-
+
}
-#theImage { /*
- background-image: url('../images/quadrille_100.gif');
- margin: 5px;
- border: 10px solid #0000F0;
- padding: 20px;
- */
- /* background-color: transparent;*/
+#theImage {
+
}
-
-.licencetag,.imageComment{
+.imageComment{
}
+.licencetag {
+
+}
#theMainImage {
-/*
- margin: 15px;
- border: 15px solid #f0f0ff;
- padding:15px;
-
- background-color: #0000FF; */
+
}
#imageInfos{
overflow:hidden ;
-/*
-margin : 0px;
- border: 0px solid #00f0f0;
- padding: 10px;*/
+
}
#imageInfoBar {
-/*
-margin : 20px;
- border: 20px solid #00f0f0;
- padding: 20px;
- background-color: #00FF00;
- opacity:0.3 ;*/
}
#thePicturePage{
-/* background-color: #FF0000;
- border: 5px solid #FFfF00;*/
+
+}
+#menubar{
+
+
}
-
+#debug {
+ background-color: #FFFFCC;
+ color: #003300;
+}
#Debug0 {
align: center;
Index: /extensions/Autosize/include/affiche.php
===================================================================
--- /extensions/Autosize/include/affiche.php (revision 17307)
+++ /extensions/Autosize/include/affiche.php (revision 17308)
@@ -18,6 +18,6 @@
if (isset($_COOKIE['picture_deriv']))
{
- if (isset($_COOKIE['img_w']))
- $cookies = '"'.$_COOKIE['img_w']." x ". $_COOKIE['img_h'] .'"';
+ if (isset($_COOKIE['theImageWidth']))
+ $cookies = '"'.$_COOKIE['theImageWidth']." x ". $_COOKIE['theImageHeight'] .'"';
if ( array_key_exists($_COOKIE['picture_deriv'], ImageStdParams::get_defined_type_map()) )
@@ -53,7 +53,5 @@
$src= $derivative->src_image ;
- }
-
-
+ }
$img_width=isset($imgScaledWH)?$imgSizeWH[0]:"480";
@@ -98,5 +96,19 @@
$options[$value] = $type_size;
}
-//======================================================
+//===================
+$value=0;
+$liste_type="";
+foreach ($img_all as $img_select){
+ $imgSizeWH = $img_select->get_size();
+ $img_type = $img_select->get_type();
+ $img_url = $img_select->get_url();
+
+ $liste_type .= $img_type.",".$img_url.",".$imgSizeWH[0] .",".$imgSizeWH[1]."|" ;
+ if(strtolower($img_type)=="original") break ;
+
+
+}
+
+//===================================
$template->assign(
@@ -105,4 +117,5 @@
'cookies' => $cookies ,
'deriv_type' =>$deriv_type ,
+ 'liste_type' => $liste_type ,
'webmaster_type' => array(
'OPTIONS' => $options,
Index: /extensions/Autosize/js/Affiche_script.js
===================================================================
--- /extensions/Autosize/js/Affiche_script.js (revision 17307)
+++ /extensions/Autosize/js/Affiche_script.js (revision 17308)
@@ -2,15 +2,363 @@
// problème avec GMaps+diaporama:
// corriger gmaps_pip.class.inc.php ajouter ligne 90 if ( !isset($_GET['slideshow']))
-//==============================================================
-
-(function (jQuery) {
+//==============================================================
jQuery.Affiche_script = { version: '1.0' };
-
- var theMainImage_Id = "#theMainImage";
- var Zone_image;
/********************************************
* document ready
********************************************/
jQuery(document).ready(function (jQuery) {
+ var Type_Img;
+ var theImg;
+ /******************************************
+ * Save_cookies
+ ******************************************/
+ Save_cookies = function (parametres) {
+ if (parametres.typeSave) document.cookie = 'picture_deriv=' + parametres.typeSave + ';path="' + "/" + '" ';
+ if (parametres.typeSave) jQuery.cookie('picture_deriv', parametres.typeSave, { path: "/" });
+ if (parametres.pictureMap) jQuery.cookie('picture_map', parametres.pictureMap, { path: "/" });
+ if (parametres.imgSrc) jQuery.cookie('imgSrc', parametres.imgSrc, { path: "/" });
+ if (parametres.theMainImageHeight) jQuery.cookie('theMainImageHeight', parametres.theMainImageHeight, { path: "/" });
+ if (parametres.theMainImageWidth) jQuery.cookie('theMainImageWidth', parametres.theMainImageWidth, { path: "/" });
+ if (parametres.theImageHeight) jQuery.cookie('theImageHeight', parametres.theImageHeight, { path: "/" });
+ if (parametres.theImageWidth) jQuery.cookie('theImageWidth', parametres.theImageWidth, { path: "/" });
+ if (parametres.windowHeight) jQuery.cookie('windowHeight', parametres.windowHeight, { path: "/" });
+ if (parametres.windowWidth) jQuery.cookie('windowWidth', parametres.WindowWidth, { path: "/" });
+ }
+ //____________________ Save_cookies _____________________________
+ Get_cookies = function () {
+ parametres = {
+ typeSave: jQuery.cookie('picture_deriv'),
+ pictureMap: jQuery.cookie('picture_map'),
+ imgSrc: jQuery.cookie('imgSrc'),
+
+ theMainImageHeight: jQuery.cookie('theMainImageHeight'),
+ theMainImageWidth: jQuery.cookie('theMainImageWidth'),
+
+ theImageHeight: jQuery.cookie('theImageHeight'),
+ theImageWidth: jQuery.cookie('theImageWidth'),
+ windowHeight: jQuery.cookie('windowHeight'),
+ windowWidth: jQuery.cookie('windowWidth')
+ }
+ return parametres;
+ }
+ //____________________ Get_cookies _____________________________
+
+
+
+ /*************************************************
+ * Recupère le Type d'mage
+ *************************************************/
+ Get_type_img = function (e) {
+ //====== détection du type d'images ======
+ if (jQuery("#charlie").length > 0) {
+ Type_Img = "charlie";
+ } else if (jQuery("#Panorama").length) {
+ Type_Img = "panorama";
+ } else if (jQuery("#pamoorama").length) {
+ Type_Img = "pamoorama";
+ } else if (jQuery("#map").length) {
+ Type_Img = "map";
+ } else if (jQuery("#Panorama").length) {
+ Type_Img = "panorama";
+ } else if ((jQuery("#theImage" + " iframe").length + jQuery("#theImage" + " object").length + jQuery("#theImage" + " embed").length) > 0) {
+
+ if (jQuery("#theImage" + " object").length > 0) {
+
+ type_src = "object";
+
+ } else if (jQuery("#theImage" + " embed").length > 0) {
+
+ type_src = "embed";
+
+ } else {
+
+ type_src = "iframe";
+ }
+ nbf = jQuery("#theImage" + " " + type_src).length;
+ frm1 = jQuery("#theImage" + " " + type_src).get(0);
+ Type_Img = "charlie";
+
+ //'fb - xfbml - like - button
+
+ objs = jQuery("#theImage" + " div").get(0);
+ if (jQuery(objs).length > 0) {
+ id_0 = jQuery(objs).attr("id");
+ if (id_0 == "") {
+ jQuery(objs).attr("id", "charlie");
+ } else {
+ if (nbf > 1) {
+ jQuery(frm1).attr("id", "charlie");
+ } else {
+ Type_Img = "img";
+ }
+ }
+ } else {
+ jQuery(frm1).attr("id", "charlie");
+ }
+
+
+ } else if (jQuery("#theImage").find("img").length > 0) {
+ Type_Img = "img";
+ } else if (jQuery("#theImage" + "Box").find("img").length > 0) {
+ Type_Img = "img";
+ Parent = Parent + "Box";
+ } else if (jQuery("img").length > 0) {
+ Type_Img = "img_autre";
+ return;
+ } else {
+ return;
+ }
+ }
+ //____________________ Get_type_img _____________________________
+
+ //====================================
+ // set_cl
+ //====================================
+ set_cl = function (Valid) {
+ if (typeof Valid == "undefined") Valid = options.useMap.match(RegExp("Autosize", "gi")) || false;
+ if (typeof options.cl_visible == "undefined") return;
+ if (typeof src1 == "undefined") return;
+
+ if (options.cl_visible) src = src1;
+ else src = src2;
+
+ if (options.cl_visible) {
+ src_info = src3;
+ src_infos_1 = src3;
+ } else {
+ src_info = src4;
+ src_infos_1 = src5;
+ }
+
+ if ((typeof Zone_image != "undefined") && typeof Zone_image.image != "undefined" && Valid) {
+ Zone_image.zoom = (Zone_image.image.height / Zone_image.image_init.height);
+ zoom_cl = parseInt(100 * Zone_image.zoom);
+ jQuery('#zoom ').val(zoom_cl);
+
+ zoom_cl = jQuery('#zoom ').val();
+
+ jQuery('#bp_cla').attr('alt', src_info);
+ jQuery('#bp_cla').attr('title', src_info);
+ jQuery('#bp_cla').attr('Stitle', src_info);
+ jQuery('#bp_cla').attr('Stip', zoom_cl + "%");
+ r = { width: jQuery("#theMainImage").width(), height: jQuery("#theMainImage").height(),
+ rap: jQuery("#theMainImage").width() / jQuery("#theMainImage").height(),
+ rap_init: Zone_image.image_init.rapport
+ }
+
+
+ jQuery('#bp_cla span').text(zoom_cl + "% ");
+ color_back = jQuery('#imageToolBar').css("backgroundColor");
+ if (color_back.match(new RegExp("rgb", "gi"))) {
+ color_back = color_back.split("(")[1].split(")")[0].split(",");
+ color_back = "rgb(" + Math.abs(255 - color_back[0]) + ","
+ + Math.abs(255 - color_back[1]) + ","
+ + Math.abs(255 - color_back[2]) + ")";
+ }
+ else if (color_back.match(new RegExp("#", "gi")))
+ color_back = Math.abs("#65536" - color_back);
+ else
+ color_back = jQuery('body').css("color");
+ jQuery('#bp_cla span').css({ color: color_back, aling: "center" });
+ jQuery('#auto_details').text(" (" + Zone_image.image.width + " x " + Zone_image.image.height + ")");
+
+ //===============================================
+ } else {
+ src = src6;
+ jQuery('#auto_details').text("");
+ }
+ bp_scr = jQuery('#bp_img_cla');
+ if (bp_scr.length > 0) {
+ src_enc = bp_scr.attr("src");
+ if (!src_enc.match(src)) {
+ bp_scr.get(0).src = src;
+ jQuery('#bp_img_cla').attr('alt', src_info);
+ jQuery('#bp_img_cla').attr('title', src_info);
+ }
+ }
+
+ }
+ //____________________ set_cl _____________________________
+
+ /********************************
+ * Set__bgo
+ *********************************/
+ Set_llbgo = function (Force) {
+ if (Type_Img == "pamoorama") {
+
+ }
+ if (Force)
+ if (typeof LlgboFr_Resize == "function") {
+ LlgboFr_Resize();
+ }
+ if (Type_Img == "pamoorama") {
+ return;
+ }
+ nom_map = theImg.useMap.replace("#", "");
+ maps = jQuery("map[name='" + nom_map + "']");
+ if (maps.length == 0) return;
+ // nom_map = maps[0].name;
+ maps = jQuery("map[name='" + nom_map + "'] area");
+ nb_zone = maps.length;
+ Largeur_zone = (Zone_image.image.width / nb_zone);
+ Hauteur_zone = (Zone_image.image.height);
+ init_zone = 0;
+ j = 0;
+ maps.each(function (e) {
+ init_zone = Largeur_zone * j;
+ rel = jQuery(this).attr("rel");
+ title = jQuery(this).attr("title");
+ alt = jQuery(this).attr("alt");
+ H = Hauteur_zone;
+ if (rel == "up") {
+ H = Hauteur_zone / 4;
+ }
+ coord = { x0: init_zone, y0: 0, x1: Math.ceil(init_zone + Largeur_zone), y1: Hauteur_zone };
+ jQuery(this).attr({ coords: "'" + coord.x0 + "," + coord.y0 + "," + coord.x1 + "," + coord.y1 + "'" });
+ j++;
+ });
+
+ return;
+ }
+ //__________ Set_llbgo _______________
+
+ /********************************************
+ * window LOAD
+ ********************************************/
+ jQuery(window).load(function () {
+ href = location.href;
+ var aff_ok = false;
+ if (DEBUG_autosize == "true") {
+ for (var i = 0; i < 10; i++) {
+ jQuery('#adddebugs').click();
+ }
+ jQuery(jQuery('.debug').get(i - 1)).click();
+ }
+ //=======================================================================
+ infos_theMainImage = jQuery(theMainImage_id).infos(true);
+ infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general
+
+ if (infos_theMainImage.width == 0) {
+ if (Type_Img == "pamoorama") {
+ infos_theMainImage = jQuery("#pamoorama").infos(true);
+ theMainImage_id = "#pamoorama";
+
+ } else {
+ infos_theMainImage = jQuery("#theImage img").infos();
+ }
+ if (infos_theMainImage.id == "")
+ jQuery("#theImage img").attr("id", "theMainImage");
+ infos_theMainImage = jQuery(theMainImage_id).infos();
+ }
+
+
+ if (options.theme.match(RegExp("simple", "gi"))) {
+ jQuery(theMainImage_id).css({ maxWidth: "none" });
+
+ theImageAndInfos_id = "#content";
+ infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general
+ infos_theImage = jQuery(theImage_id).infos(true); // conteneur
+ infos_theImage.height = infos_window.height - infos_theImage.top;
+ jQuery(theImage_id).height(infos_theImage.height);
+
+ } else {
+ infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general
+ if (infos_theImageAndInfos.visible == false)
+ theImageAndInfos_id = "#imageContainer";
+ }
+
+
+ imageInfos_id = "#imageInfos";
+ content_id = "#content";
+ infos_content = jQuery(content_id).infos(true); // conteneur
+ infos_theImage = jQuery(theImage_id).infos(true); // conteneur
+ infos_imageInfos = jQuery(imageInfos_id).infos(true); // information
+ infos_theMainImage = jQuery(theMainImage_id).infos(true); // Image
+ if (infos_theMainImage.visible == false) {
+
+ }
+ jQuery("#loading").show(0);
+
+ if (options.check_desc_v) {
+ infos_Licence = jQuery(".licencetag").infos(true);
+ infos_imageComment = jQuery(imageComment_id).infos(true);
+ h01 = (infos_Licence.general.height);
+ h02 = (infos_imageComment.general.height);
+ options.marge_basse += Math.max(h01, h02);
+ }
+
+ infos_theMainImage = jQuery(theMainImage_id).infos(true);
+ infos_theImage = jQuery(theImage_id).infos(true);
+
+ Zone_image = { image_init: {
+ width: infos_theMainImage.width,
+ height: infos_theMainImage.height,
+ rapport: infos_theMainImage.width / infos_theMainImage.height
+ },
+ image: {
+ width: infos_theImage.general.width,
+ height: infos_window.height - infos_theImage.top - options.marge_basse,
+ rapport: infos_theMainImage.width / infos_theMainImage.height
+ },
+ container: {
+ width: infos_theImage.general.width,
+ height: infos_window.height - (infos_theImage.top)
+ }
+ }
+ if (Type_Img == "pamoorama") {
+ jQuery(theMainImage_id).width(Zone_image.container.width);
+ }
+
+ /***********************************************************
+ * RESIZE (une fois document chargé)
+ ***********************************************************/
+ jQuery(window).resize(function (event, ui) {
+ infos_theImage = jQuery(theImage_id).infos(true);
+ infos_window = jQuery(window).infos();
+ infos_body = jQuery("body").infos();
+ infos_content = jQuery(content_id).infos();
+
+ infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general
+ Zone_image.container = { height: infos_window.height - (infos_theImage.top),
+ width: infos_theImage.width
+ };
+
+ if (options.theme.match(RegExp("simple", "gi"))) {
+ jQuery(theMainImage_id).css({ maxWidth: "none" });
+ Zone_image.container.height = infos_window.height - infos_theImage.top - infos_content.general.marges.height - (infos_theImage.general.marges.height);
+ //jQuery("#menubar").css("margin-right", "0");
+ infos_menubar = jQuery("#menubar").infos(true);
+ if (infos_menubar.visible == true) {
+ Zone_image.container.width -= infos_menubar.right;
+ }
+ }
+
+ jQuery(theImage_id).height(Zone_image.container.height + 2);
+ jQuery("#loading").hide(fade_in);
+ if (DEBUG_autosize == "no") return;
+ Autosize_resize(true, options);
+
+ });
+ //_____________ widow.resize _______________
+
+ type_src = "div";
+ old_window = { width: 0, height: 0 };
+ List_autosize = new Array();
+ nu_img = 0;
+ tempo = 0;
+
+
+ infos_llgbo = jQuery(llgbo_id).infos();
+ infos_llgboh2 = jQuery("#llgboh2").infos();
+ marges_llgbo = 0;
+ //==========================================================================================
+ jQuery("#loading").show(0);
+ if (DEBUG_autosize != "no")
+ init_gen();
+ jQuery(window).resize();
+ jQuery(window).resize();
+ });
+ //__________________window.onload_________________
+
/********************************************
* window unLOAD
@@ -20,21 +368,19 @@
try {
- if (typeof theMainImage_Id != "undefined") {
-
+ if (typeof theMainImage_id != "undefined") {
+ infos_window = jQuery(window).infos(true);
+ infos_theImage = jQuery("#" + infos_theImage.id).infos(true);
+ infos_theMainImage = jQuery("#" + theMainImage.id).infos(true);
useMap = options.useMap;
- pictureMap = jQuery.cookie('picture_map');
- typeSave = jQuery.cookie('picture_deriv');
-
- old_img = jQuery.cookie('img');
- old_window_height = jQuery.cookie('window_height');
- old_window_width = jQuery.cookie('window_width');
- old_img_h = jQuery.cookie('img_h');
- old_img_w = jQuery.cookie('img_w');
-
- set_cookies({
- window_height: infos_window.height,
- window_width: infos_window.width,
- img_h: infos_theMainImage.height,
- img_w: infos_theMainImage.width
+
+ Save_cookies({
+ pictureMap: cookies.pictureMap,
+ typeSave: cookies.typeSave,
+ windowHeight: infos_window.height,
+ windowWidth: infos_window.width,
+ theImageHeight: infos_theImage.height,
+ theImageWidth: infos_theImage.width,
+ theMainImageHeight: infos_theMainImage.height,
+ theMainImageWidth: infos_theMainImage.width
});
@@ -44,10 +390,16 @@
}
- }); //unload
-
+ });
+ //_________ unload ___________
+
+
+
+ //===================
+ // options
+ //===================
//=========================================================
- messages = "This frame uses the W3C box model: " + jQuery.support.boxModel + "";
- messages += "This frame uses the html5Clone: " + jQuery.support.html5Clone + "";
+ /*messages = "This frame uses the W3C box model: " + jQuery.support.boxModel + "";
+ messages += "This frame uses the html5Clone: " + jQuery.support.html5Clone + "";*/
// jQuery("p").html(messages);
if (typeof (options) == "undefined") {
@@ -64,4 +416,11 @@
options = jQuery.extend(defaults, options);
+
+ options.liste_type = options.liste_type.split("|");
+ options.liste_type.pop();
+ for (i = 0; i < options.liste_type.length; i++) {
+ options.liste_type[i] = options.liste_type[i].split(",");
+ }
+
jQuery("#form_autosize_picture").addClass("Autosize_margin");
//===== marges suplémentaires en fonction theme ===
@@ -71,16 +430,15 @@
options.marge_droite = jQuery(".Autosize_margin").Get_Val_int(jQuery(".Autosize_margin").css("right"));
fade_in = options.fade_in || 0;
-
-
-
- if (options.check_desc_v) {
- infos_Licence = jQuery(".licencetag").infos({ pos_absolute: true });
- infos_imageComment = jQuery(".imageComment").infos({ pos_absolute: true });
- options.marge_basse += infos_imageComment.general.height;
- }
-
-
+ imageComment_id = ".imageComment";
+ if (options.theme.match(RegExp("simple", "gi"))) {
+ jQuery("#theImage p").addClass("imageComment");
+ }
+ if (options.theme.match(RegExp("mont", "gi"))) {
+ jQuery("#content").css({ marginLeft: 'auto' }); //monblanc
+ }
DEBUG_autosize = options.DEBUG_autosize;
+
+
Get_type_img();
@@ -88,72 +446,40 @@
// VARIABLES
//===================
-
- type_src = "div";
- old_window = { width: 0, height: 0 };
- List_autosize = new Array();
- nu_img = 0;
- tempo = 0;
+ var cookies = Get_cookies();
+ var Zone_image;
+ var theMainImage_id = "#theMainImage";
+ var theImage_id = "#theImage";
+ var theImageAndInfos_id = "#theImageAndInfos";
+ var infos_window = jQuery(window).infos();
+ var infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general
+ var infos_content;
+ var infos_body;
+ var infos_the_page = jQuery("#the_page").infos(true);
var nopano;
- var cookies = Get_cookies();
- var theme = options.theme;
-
- var Type_Img = "";
-
var llgbo_id = "#llgbo0";
- var infos_llgbo = jQuery(llgbo_id).infos();
- var infos_llgboh2 = jQuery("#llgboh2").infos();
var marges_llgbo = 0;
-Zone_image = {
- width_init: options.img_width,
- height_init: options.img_height,
- rapport_init: options.img_width / options.img_height
- };
-
- var theImageAndInfos_id = "#theImageAndInfos";
-
- if (options.theme.match(RegExp("simple", "gi"))) {
- theImageAndInfos_id = "#content";
- jQuery(theMainImage_Id).attr("position", "static");
-
- } else {
- infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general
- if (infos_theImageAndInfos.visible == false)
- theImageAndInfos_id = "#imageContainer";
- }
-
- theImage_id = "#theImage";
- imageInfos_id = "#imageInfos";
- theMainImage_Id = "#theMainImage";
-
- infos_theImage = jQuery(theImage_id).infos({ pos_absolute: true }); // conteneur
- infos_imageInfos = jQuery(imageInfos_id).infos({ pos_absolute: true }); // information
- infos_theMainImage = jQuery(theMainImage_Id).infos({ pos_absolute: true }); // Image
- /************************************
- *
- *************************************/
-
- infos_theImage = jQuery(theImage_id).infos({ pos_absolute: true }); // conteneur
- infos_imageInfos = jQuery(imageInfos_id).infos({ pos_absolute: true }); // information
- infos_theMainImage = jQuery(theMainImage_Id).infos({ pos_absolute: true }); // Image
-
- infos_theImageAndInfos = jQuery(theImageAndInfos_id).infos(); // Cadre general
- var infos_theImage = jQuery("#theImage").infos(); // Container
- var infos_imageInfos = jQuery("#imageInfos").infos(); // Informations
-
- var infos_the_page = jQuery("#the_page").infos();
- var infos_content = jQuery("#content").infos();
- var infos_titrePage = jQuery("#titrePage").infos();
- var infos_imageInfoBar = jQuery("#imageInfoBar").infos();
- var infos_theHeader = jQuery("#theHeader").infos();
- var infos_imageToolBar = jQuery("#imageToolBar").infos();
- var infos_imageHeaderBar = jQuery("#imageHeaderBar").infos();
- var infos_body = jQuery("body").infos();
-
-
- var Type_Img = "";
-
+ var type_size = cookies.typeSave; // xxx
+ var useMap = cookies.pictureMap; // #mapxxx
+ var user_status = options.user_status;
+ var type_size_maxi = eval("options." + user_status + "_type"); //limite taille
+
+
+
+ if (DEBUG_autosize == "no") return;
//=============================================================
// REPONSE ACTION
//=============================================================
+ jQuery("#theMainImage," + theMainImage_id + ",.preload, .next1 , ").load(function (e) {
+ if (this.complete) {
+ jQuery("#loading").hide(1000);
+ }
+ //_________ theMainImage ___________
+
+ if (typeof theMainImage_id != "undefined")
+ if (init_img(this))
+ nu_img = 0;
+ });
+
+
jQuery("#reset").click(function () {
location.reload();
@@ -184,16 +510,4 @@
mouseLocation.x = evt.clientX;
mouseLocation.y = evt.clientY;
- affiche_debug({
- Debug1: Debug_info(1, "x:" + mouseLocation.x + " y: " + mouseLocation.y, "position:"),
- Debug2: Debug_info(2, "pos_top:" + options.pos_top + " marge_right: " + options.marge_right, "marges:"),
-
- Debug5: Debug_info(5, "X:" + infos_theMainImage.left +
- "Y:" + infos_theMainImage.top +
- "W:" + infos_theMainImage.exterieur.width +
- "H:" + infos_theMainImage.exterieur.height
- , infos_theMainImage.id)
- });
-
-
}
@@ -232,6 +546,4 @@
// REPONSE TRIGGER
//===========================================================
-
-
jQuery('#ret_autosize').live('ON', function (e) {
if (nu_img == "") nu_img = 8;
@@ -242,6 +554,6 @@
//==========================================================
jQuery("map area").mouseover(function (e) {
+ nok = theImg.useMap;
hok = this;
-
});
@@ -291,5 +603,5 @@
id = this.id;
- theImage_init();
+ Select_Image(); //+calcul
});
@@ -301,15 +613,4 @@
});
- jQuery("#theMainImage,.preload, .next1 , ").load(function (e) {
- if (this.complete) {
- theMainImage_id = "#" + this.id;
- jQuery(theMainImage_id).show(1000);
- }
-
- if (typeof theMainImage_id != "undefined")
- if (init_img(this))
- setTimeout(function () { Autosize_resize(true) }, 5);
- nu_img = 0;
- });
//=================================================================
@@ -325,9 +626,11 @@
jQuery(jQuery('.debug').get(1)).trigger('ON');
if (typeof Bandeau_bas == "undefined" || Bandeau_bas.width == 0) {
- Bandeau_bas = infos_Description_f("#theImage");
- Bandeau = Bandeau_bas.top;
- }
- });
- // jQuery("#theImage").trigger("OK");
+
+ }
+ });
+
+ //===============================================
+ // jQuery("#theImage").trigger("Start_right");
+ //===============================================
jQuery("#theImage").live('Start_right', function (e) {
if (typeof Zone_image == "undefined") return
@@ -341,8 +644,5 @@
// 200=window.myPamoorama.imageWidth
// frame = Zone_image.container.width
- if (Zone_image.container)
- nw = (200 * Zone_image.container.width) / window.myPamoorama.imageWidth;
- else
- nw = (200 * infos_content.width) / window.myPamoorama.imageWidth;
+ nw = (200 * Zone_image.container.width) / window.myPamoorama.imageWidth;
jQuery("#pamoorama_frame").width(nw);
@@ -350,9 +650,11 @@
});
-
+ //===============================================
+ // jQuery("#theImage").trigger("Start_left");
+ //===============================================
jQuery("#theImage").live('Start_left', function (e) {
if (typeof Zone_image == "undefined") return
- if (nu_img == "") nu_img = 7;
- jQuery(jQuery('.debug').get(nu_img)).trigger('ON');
+ jQuery("#theImage").show(0);
+ window.myPamoorama.autoSlideFx.to = 0;
test_w = window.myPamoorama.autoSlideFx.to;
test_w = window.myPamoorama.autoScrollFx.to;
@@ -360,12 +662,4 @@
jQuery("#pamoorama_thumb img").width(200);
jQuery("#pamoorama_thumb img").height(nf);
- if (typeof Zone_image.container != "undefined") return;
- try {
- nw = (200 * Zone_image.container.width) / window.myPamoorama.imageWidth;
- jQuery("#pamoorama_frame").width(nw);
- } catch (e) {
-
- }
-
});
@@ -409,5 +703,6 @@
jQuery("#menuSwitcher,#infoSwitcher").click(function (e) {
- setTimeout(function () { Autosize_resize(true) }, 10);
+ setTimeout(function () { jQuery(window).resize() }, 10);
+ setTimeout(function () { jQuery(window).resize() }, 12);
nu_img = 0;
});
@@ -444,5 +739,5 @@
//====================================================
jQuery("#derivativeSwitchBox a").click(function () {
- var theImg = document.getElementById(theMainImage_Id.replace("#", ""));
+ theImg = document.getElementById(theMainImage_id.replace("#", ""));
if (theImg) {
pathnames = jQuery(this).attr("href").split(":");
@@ -455,6 +750,6 @@
}
- infos_theMainImage = jQuery(theMainImage_Id).infos();
- infos_theImage = jQuery("#theImage").infos();
+ infos_theMainImage = jQuery(theMainImage_id).infos();
+
theImg.removeAttribute("width");
theImg.removeAttribute("height");
@@ -466,6 +761,6 @@
init_img(theImg);
wx = parseInt(nw[0]);
- wh = parseInt(wx / rapport);
- //jQuery("#theImage").css("height", wh + "px");
+ wh = parseInt(wx / Zone_image.image_init.rapport);
+
jQuery(theImg).width(wx);
jQuery(theImg).height(wh);
@@ -499,4 +794,5 @@
});
+ //____________________ set_llgbo _____________________________
//====================================
@@ -507,5 +803,5 @@
img_finale = img_init;
- rapport = parseInt(img_init.width) / parseInt(img_init.height);
+
useMap = infos_theMainImage.useMap; // #mapmedium
@@ -520,107 +816,67 @@
old_img_w = cookies.imgWidth;
if (infos_theMainImage.visible == true) {
- var theImg = document.getElementById(theMainImage_Id.replace("#", ""));
+ theImg = document.getElementById(theMainImage_id.replace("#", ""));
theImg.useMap = useMap;
}
-
- } // Autosize_init
- //===========================================================================
+ fade_in = parseInt(options.fade_in || 0);
+
+ }
+ //____________________ Autosize_init _____________________
+
+ /***************************
+ * Autosize_resize
+ ***************************/
Autosize_resize = function (force, parametres) {
- fade_in = parseInt(fade_in || 1000);
-
+ theImg = document.getElementById(theMainImage_id.replace("#", ""));
+ if (theImg) {
+ theImg.removeAttribute("width");
+ theImg.removeAttribute("height");
+ }
if (Get_dimensions(force, parametres)) {
- jQuery(theMainImage_Id).height(Zone_image.image.height);
- jQuery(theMainImage_Id).width(Zone_image.image.width);
- jQuery("#theImageAndInfos").css({ height: "auto" });
+
+ jQuery(theImageAndInfos_id).css({ height: "auto" });
if (Type_Img == "pamoorama") {
- jQuery("#theImage").css({ height: "auto" });
-
+ Set_Pamoorama({ width: Zone_image.container.width - 5, height: Zone_image.image.height });
+ if (nopano)
+ if (window.myPamoorama.options.autoscrollOnLoad) {
+ window.myPamoorama.startAnimRight();
+ }
} else {
- jQuery("#theImage").css({ height: Zone_image.container.height });
- jQuery("#theImage").width(Zone_image.container.height);
- }
- jQuery("#theImage").width(Zone_image.container.width);
-
-
- Set_Pamoorama();
+
+ jQuery(theMainImage_id).height(Zone_image.image.height);
+ jQuery(theMainImage_id).width(Zone_image.image.width);
+ }
+
set_cl(true);
} else {
- Set_Pamoorama();
+
+ Set_Pamoorama({ width: Zone_image.container.width, height: Zone_image.image.height });
set_cl(false);
}
- jQuery(theMainImage_Id).show(fade_in);
+
Set_llbgo(true);
return true;
-
- //_____________________________________________________
- }; // Autosize
-
-
-
-
-
- /********************************************
- * window LOAD
- ********************************************/
- jQuery(window).load(function () {
- href = location.href;
- var aff_ok = false;
- if (DEBUG_autosize == "true") {
- for (var i = 0; i < 10; i++) {
- jQuery('#adddebugs').click();
- }
- jQuery(jQuery('.debug').get(i - 1)).click();
- }
-
- Autosize_init();
-
-
- /*
- Bandeau_bas = infos_Description_f("#theImage");
- if (typeof Bandeau_bas != "undefined") Bandeau = Bandeau_bas.top;
- else Bandeau = 0;
- */
-
- Wait_pamoorama();
-
- if (!theImage_init()) {
- Wait_Affichage();
- Autosize_resize(true, options);
- Set_llbgo(true);
-
- } else {
- set_cl(options.useMap.match(RegExp("Autosize", "gi")));
- Set_llbgo();
- }
- setTimeout(function () { Autosize_resize(true) }, 100);
-
-
-
- //=================================================================================
- }); // window.onload
- /***********************************************************
- * RESIZE
- ***********************************************************/
- jQuery(window).resize(
- function (event, ui) {
- Wait_Affichage();
- List_autosize_resize(event, ui);
- Autosize_resize(true, options);
-
-
- });
+ };
+ //_________________Autosize ____________________________________
+
+
+
+
+
+
+
+
/*****************
- * changeImgSrc1
+ * changeImgSrc
******************/
changeImgSrc = function (url, typeSave, useMap) {
- var theImg = document.getElementById(theMainImage_Id.replace("#", ""));
+ theImg = document.getElementById(theMainImage_id.replace("#", ""));
if (theImg) {
theImg.removeAttribute("width");
theImg.removeAttribute("height");
// theImg.useMap = "#map" + useMap;
-
jQuery('#derivativeSwitchBox .switchCheck').css('visibility', 'hidden');
jQuery('#derivativeChecked' + useMap.replace("#", "")).css('visibility', 'visible');
@@ -631,15 +887,12 @@
pictureMap = "#map" + typeSave;
}
- theImg.src = url; // charge Image
theImg.useMap = pictureMap;
+ if (theImg.src.match(RegExp(url, "gi"))) {
+ jQuery("#loading").hide(0);
+ } else {
+ jQuery("#loading").show(0);
+ }
+ theImg.src = url; // charge Image
//===================================================
-
-
- infos_theMainImage = jQuery(theMainImage_Id).infos();
- Zone_image.width_init = infos_theMainImage.width;
- Zone_image.height_init = infos_theMainImage.height;
- Zone_image.zoom = (infos_theMainImage.width / infos_theMainImage.height);
- infos_theMainImage.useMap = theImg.useMap;
-
Save_cookies({
typeSave: typeSave,
@@ -648,9 +901,8 @@
});
cookies = Get_cookies();
-
- }
-
-
- } //changeImgSrc1
+ }
+ }
+ //__________________ changeImgSrc ______________________
+
/************************************
*
@@ -659,11 +911,29 @@
if (Type_Img != "pamoorama") return;
- jQuery("#loading").attr("id", "theMainImage");
+ // jQuery("#loading").attr("id", "theMainImage");
+ tempo = 0;
Wait_pamoorama_st = false;
while (Wait_pamoorama_st == false) {
Wait_pamoorama_st = Wait_pamoorama_time();
- }
- }
+ jQuery.noop();
+ }
+ tempo = 0;
+
+ Wait_pamoorama_st = false;
+ while (Wait_pamoorama_st == false) {
+ Wait_pamoorama_st = Wait_pamoorama_time();
+ jQuery.noop()
+ }
+
+ if (nopano)
+ if (window.myPamoorama.options.autoscrollOnLoad) {
+ window.myPamoorama.startAnimRight();
+ jQuery.noop()
+ }
+
+ }
+ //__________________ Wait_pamoorama ______________________
+
Wait_pamoorama_time = function () {
@@ -673,6 +943,7 @@
mypanorama = window.myPamoorama;
if (!mypanorama) {
+ jQuery("#loading").show(5000);
tempo = tempo + 1;
- if (tempo > 2000) return true;
+ if (tempo > 5000) return true;
nopano = false;
setTimeout("Wait_pamoorama_time()", 500);
@@ -694,17 +965,24 @@
nopano = true;
-
+ jQuery("#pamoorama").show(1000);
return true;
}
- } // Wait_pamoorama
- //====================================================================================
+ }
+ //__________________ Wait_pamoorama time______________________
+
+ /**********************
+ *
+ ***********************/
Wait_Affichage = function () {
Wait_Affichage_st = false;
while (Wait_Affichage_st == false) {
+ jQuery.noop();
Wait_Affichage_st = Wait_Affichage_time();
}
}
- //==========================================
+ //__________________ Wait_Affichage ______________________
+
+
Wait_Affichage_time = function () {
if (typeof fade_in == "undefined") fade_in = 1000;
@@ -722,12 +1000,12 @@
if (typeof stb != "undefined")
stb.stop().fadeTo(3500, 0);
- if (typeof theMainImage_Id == "undefined") return true;
-
- if (theMainImage_Id.selector) {
- theMainImage_Id = theMainImage_Id.selector;
- }
- if (theMainImage_Id == null) return;
-
- if (jQuery(theMainImage_Id).length == 0) {
+ if (typeof theMainImage_id == "undefined") return true;
+
+ if (theMainImage_id.selector) {
+ theMainImage_id = theMainImage_id.selector;
+ }
+ if (theMainImage_id == null) return;
+
+ if (jQuery(theMainImage_id).length == 0) {
if (jQuery("#pamoorama_inner").length > 0) {
return true;
@@ -741,27 +1019,24 @@
} else {
- img_h = jQuery(theMainImage_Id).height();
- img_w = jQuery(theMainImage_Id).width();
+ img_h = jQuery(theMainImage_id).height();
+ img_w = jQuery(theMainImage_id).width();
jQuery("#src_img_h").val(img_h);
jQuery("#src_img_w").val(img_w);
jQuery("#ret_autosize").val(infos_theMainImage.src);
- if (typeof Window_Affichage == "undefined") return;
- jQuery("#window_height").val(Window_Affichage.height);
- jQuery("#window_width").val(Window_Affichage.width);
+ if (typeof infos_theImage == "undefined") return;
+
jQuery("#ret_autosize").trigger('ON', {
width: img_w,
height: img_h,
- theImage: theMainImage_Id,
+ theImage: theMainImage_id,
src_img: infos_theMainImage.src,
- window_height: Window_Affichage.height,
- window_width: Window_Affichage.width
+ window_height: infos_theImage.height,
+ window_width: infos_theImage.width
});
}
return true;
- } // Wait_affichage
-
-
-
+ }
+ //______________ Wait_affichage ______
@@ -770,5 +1045,4 @@
**********************/
init_img = function (theImg) {
-
name_src = theImg.src;
img_init = { width: jQuery(theImg).width(), height: jQuery(theImg).height() }
@@ -780,313 +1054,25 @@
img_init.rapport = img_init.width / img_init.height;
- Zone_image.height_init = img_init.height;
- Zone_image.width_init = img_init.width;
- if (typeof Zone_image.image == "undefined") Zone_image.image = { height: Zone_image.height_init, width: Zone_image.width_init }; ;
- Zone_image.zoom = Zone_image.image.height / Zone_image.height_init;
- Zone_image.rapport = img_init.rapport;
+
+ if (typeof Zone_image.image == "undefined") Zone_image.image = { height: Zone_image.image_init.height, width: Zone_image.image_init.width }; ;
+
+ Zone_image.image_init.height = img_init.height;
+ Zone_image.image_init.width = img_init.width;
+ Zone_image.zoom = Zone_image.image_init.height / img_init.height;
+ Zone_image.image_init.rapport = img_init.rapport;
nu_img = 0;
- if (typeof Zone_image.src == "undefined") return false;
+ if (typeof Zone_image.src == "undefined") {
+ Zone_image.src = name_src;
+ return false;
+ }
stx = name_src.match(Zone_image.src);
sty = infos_theMainImage.src;
return stx;
}
-
-
- /*****************************************************
- * recherche la plus grande image (hauteur ou largeur)
- *****************************************************/
- Get_Img_Maxi = function (myobj) {
- var w00 = 0;
- var myImg = null;
-
- img = jQuery(theMainImage_Id);
- if (img != null) {
- return;
-
- }
- img = jQuery(myobj);
-
- img = jQuery('img[alt]');
-
- jQuery(myobj).each(function (i) {
- w0 = img_reelle.width;
- h0 = img_reelle.height;
- if (h0 > w0) w0 = h0;
- if (w0 > w00) {
- if (!this.src.match(RegExp(".png", "gi")))
- if (!this.src.match(RegExp(thumbnail, "g"))) {
- myImg = this;
- jQuery(myImg).addClass("Image");
- w00 = w0;
- }
-
- }
- });
- return myImg;
- } // Get_Img_Maxi
-
-
- /*************************************************************
- *
- **************************************************************/
- infos_entete = function () {
- infos_imageToolBar = jQuery("#imageToolBar").infos();
- if (typeof (marge_top) != "undefined") return;
-
- optiontop = 0;
- infos_imageInfoBar = jQuery("#imageInfoBar").infos();
-
- infos_thePicturePage = jQuery("#thePicturePage").infos();
- infos_theImage = jQuery("#theImage").infos();
- if (theme.match(RegExp("stripped", "gi"))) {
- infos_theImageAndTitle = jQuery("#theImageAndTitle").infos();
- infos_theImageBox = jQuery("#theImageBox").infos();
- optiontop = (marges_llgbo / 2) + infos_theImageAndTitle.margin.top;
- }
-
-
-
- marge_top = Math.ceil(infos_the_page.top +
- infos_the_page.borderwidth.top +
- infos_theImage.borderwidth.top +
- infos_thePicturePage.margin.top
- );
-
- img_top = Math.ceil(infos_theImage.top +
- infos_theImage.padding.top +
- infos_theImage.borderwidth.top +
- infos_thePicturePage.margin.top + optiontop);
- result = infos_imageToolBar;
- // result.width = "20%";
- // result.left = "40%";
- result.marge_top = marge_top;
- result.img_top = img_top;
- //=== Afficher le titre de l'image sur le cadre ===
-
-
- if (infos_llgboh2.top > 0) {
- result.img_top = infos_llgboh2.top;
-
- }
- else if (marges_llgbo > 0) {
- result.img_top -= (8);
- }
- return result;
- } // infos_entete
-
- /*************************************************
- * Récupère les informations sur la description.
- *
- *************************************************/
- infos_Description_f = function () {
- // jQuery("#theImage").css({ display: "block" });
-
- //=============== CHARLIE ==============================
- if (jQuery("#charlie").length > 0) {
- jQuery("#charlie").css({
- paddingTop: "0px",
- marginTop: "0px",
- paddingBottom: "0px",
- marginBottom: "0px"
- });
-
- }
-
- // Bandeau_t = infos_entete();
- // Bandeau = Bandeau_t.img_top;
- infos_theImgContainer = jQuery("#" + "theImgContainer").infos();
- infos_description = jQuery("#" + "description").infos();
- //=============================================================================
-
-
-
- if (theme.match(RegExp("luciano", "g"))) {
-
-
-
-
- } else if (Type_Img == "map") {
-
- infos_map = jQuery("#mapPicture").infos();
- marge_left = infos_map.width;
-
- jQuery("#map").css({ left: marge_left + "px", padding: "0px",
- marginLeft: "0px",
- marginRight: "4px",
- marginTop: "0px",
- marginBottom: "0px",
- position: "relative"
- });
-
- theMainImage_Id = "#map";
- infos_theMainImage = jQuery(theMainImage_Id).infos();
-
-
- } else if (jQuery("#charlie").length > 0) {
- infos_charlie = jQuery("#charlie").infos();
- obj_charlie = jQuery("object");
- try {
- tp = obj_charlie.attr();
- } catch (e) {
- tp = obj_charlie.prop();
- }
-
- if (tp != undefined) {
- if (obj_charlie.length > 0)
- tp = jQuery("object").attr("type") || jQuery("object").prop("type");
- else
- tp = jQuery("embed").attr("type") || jQuery("embed").prop("type");
- }
-
- if (tp == 'application/x-shockwave-flash') {
- jQuery("#charlie").css({
- paddingTop: "0px",
- marginTop: "0px",
- paddingBottom: "30px",
- marginBottom: "0px"
- });
- } else {
-
- }
-
- var MainImage = jQuery(theMainImage_Id);
-
- if (MainImage.length == 0) {
- theMainImage_Id = "#charlie";
- infos_theMainImage = jQuery(theMainImage_Id).infos();
- } else {
-
- infos_theMainImage = jQuery(theMainImage_Id).infos();
-
- }
-
-
- } else if (jQuery("#theImage" + " embed").length > 0) {
- if (jQuery(theMainImage_Id).lenght == 0) {
- theMainImage_Id = "#theImage" + " embed";
- infos_theMainImage = jQuery(theMainImage_Id).infos();
- jQuery("#theImage" + " embed").width({ width: infos_theMainImage.width + "px", height: infos_theMainImage.height + "px" });
- } else {
-
- infos_theMainImage = jQuery(theMainImage_Id).infos();
- Type_Img == "charlie"
- if (infos_theMainImage.width == 0) {
-
- infos_theMainImage = jQuery(theMainImage_Id).infos();
-
- }
- }
-
- } else if (Type_Img == "pamoorama") {
- if (!nopano) {
- Wait_pamoorama();
-
- }
- infos_theMainImage = jQuery(theMainImage_Id).infos();
- infos_footer = jQuery("#pamoorama_footer").infos();
- infos_theMainImage.height += parseInt(infos_theMainImage.height) + parseInt(infos_footer.height);
-
- } else {
- if (jQuery(theMainImage_Id).length == 0) {
- theMainImage_Id = "#theImage" + " img[alt]";
- } else {
-
- }
-
-
- if (!theMainImage_Id)
- theMainImage_Id = "#theImage"; // sans img ??
-
-
- }
- //=====================================================================================
- infos_theMainImage = jQuery(theMainImage_Id).infos();
-
- switch (infos_theMainImage.position) {
- case "relative":
- break;
- case "static":
- break;
- case "absolute":
- break;
- case "":
- break;
- default:
- break;
- }
-
- infos_description.marge = {
- bottom: infos_theMainImage.padding.bottom + infos_theMainImage.margin.bottom + infos_theMainImage.borderwidth.bottom,
- top: infos_theMainImage.padding.top + infos_theMainImage.borderwidth.top + infos_theMainImage.margin.top
- }
-
- if (infos_llgbo.height > 0) infos_theMainImage = infos_llgbo; // format de l'image+largeur du cadre
-
- if (theme.match(RegExp("luciano", "g"))) {
-
- infos_theImgContainer = jQuery(theImageAndInfos_id).infos();
- infos_description.bottom = jQuery("#imageInfo").infos().top;
- infos_description.top = infos_theImgContainer.bottom;
- infos_slidshowToolBar = jQuery("#slidshowToolBar").infos();
-
- if (infos_slidshowToolBar.height > 0) {
- correction = (infos_slidshowToolBar.height);
- infos_description.top = infos_theMainImage.bottom;
- infos_description.bottom = jQuery("#copyright").infos().top;
- }
-
- //=========================================================
- } else if (theme.match(RegExp("stripped", "gi"))) {
- //options.imageAutosize
- //options.imageMargin
-
- infos_content = jQuery("#content").infos();
- if (options.imageAutosizeTitle == false) {
- infos_description.top = infos_theImageBox.bottom;
-
- infos_description.bottom = infos_HeaderBar.margin.top + infos_description.top +
- infos_description.borderwidth.top +
- infos_description.borderwidth.bottom +
- options.imageAutosizeMargin * 2 +
- (marges_llgbo / 2) + 4;
-
- } else {
-
-
- infos_description.top = infos_theImageBox.bottom -
- infos_content.top +
- options.imageAutosizeMargin * 2 +
- (marges_llgbo / 2)
- ;
- infos_description.bottom = jQuery("#tabZone").infos().top +
- infos_theImageAndTitle.margin.top;
- if (msie == true) infos_description.bottom -= 4;
- };
- check_desc_v = true;
-
- } else {
- if (theme.match(RegExp("sobre", "gi"))) {
- infos_description.marge.top = -2;
- }
- infos_description.bottom = infos_theImage.bottom; //482
- infos_description.top = infos_theMainImage.height + infos_theImage.top; //410+62
- // infos_description.bottom -= infos_theMainImage.top;
- }
- //
-
- infos_description.height = infos_description.bottom - infos_description.top;
-
- if (options.check_desc_v == false) {
- infos_description.height = 0;
- }
-
- Debug_pos();
-
- //options.cl_visible=false ;
- return infos_description;
- } //infos_Description_f
+ //___________ init_img _______
//=======================================================================================
Debug_info = function (index, infos, Nom_str) {
+
if (DEBUG_autosize == "true") {
if (typeof infos == "undefined") return;
@@ -1115,4 +1101,5 @@
}
return myDebug;
+
} else {
if (typeof old_messages == "undefined") {
@@ -1147,7 +1134,6 @@
}
}
+ return myDebug;
}
-
- return myDebug;
}
}
@@ -1169,6 +1155,4 @@
affiche_debug({
- Debug1: Debug_info(1, Bandeau_t, "Bandeau_t"),
- Debug4: Debug_info(4, infos_description, "infos_description"),
Debug5: Debug_info(5, infos_theMainImage, "infos_theMainImage")
});
@@ -1187,4 +1171,6 @@
return;
}
+ //___________ affiche_debug ____
+
//===========================================
//
@@ -1201,29 +1187,26 @@
p0.left += 35;
}
- jQuery("#map").width(Zone_image.container.width - p0.left);
- jQuery("#map").css({ position: "absolute", height: Zone_image.container.height + "px" });
- }
-
- jQuery("map [name='mapAutosize'] area").mouseover(function (e) {
+ jQuery("#map").width(Zone_image.image.width);
+ jQuery("#map").css({ height: Zone_image.image.height + "px" });
+
+ return true;
+ }
+
+ jQuery("map [name='#Autosize'] area").mouseover(function (e) {
return;
});
+ //___ Set_Map ___
+
//=====================================
//
//=====================================
- theImage_init = function () {
- if (jQuery("#derivativeSwitchBox").length > 0) {
- var px = jQuery(".derivativeSizeDetails ");
- i = 0;
- n = 0;
- var pt = new Array();
- jQuery("#derivativeSwitchBox a").each(function (i) {
- href_path = jQuery(this).attr("href");
- if (href_path.match(RegExp("auto", "gi"))) return true;
- pt[i] = href_path.split("'");
- });
+ Select_Image = function () {
+ var pt = options.liste_type;
+ if (pt.length > 0) {
+ Save_container = Zone_image.container;
//===== calcul Image ===
Calcul_Image();
- tw = Zone_image.image.width;
- th = Zone_image.image.height;
+ tw = Zone_image.image.width; // valeur maxi
+ th = Zone_image.image.height; // valeur maxi
n = 0;
maxi_size = { w: tw, h: th, idx: -1 };
@@ -1232,11 +1215,11 @@
size_encours = { w: tw, h: th };
- jQuery(".derivativeSizeDetails").each(function (i) {
- vn = jQuery(this).text().replace("(", "").replace(")", "").split("x");
- size_derive = { w: parseInt(vn[0]), h: parseInt(vn[1]) };
+ jQuery(pt).each(function (i) {
+ vn = this;
+ size_derive = { w: parseInt(vn[2]), h: parseInt(vn[3]) };
if (size_derive.h > size_encours.h) {
if (maxi_size.idx < 0) {
maxi_size = size_derive;
- maxi_size.idx = n;
+ maxi_size.idx = n + 1;
}
}
@@ -1248,4 +1231,6 @@
n++;
});
+
+
// n = n - 1 ;
n = maxi_size.idx;
@@ -1253,20 +1238,30 @@
if (n > pt.length - 1) n = pt.length - 1; // format le plus grand
if (n < 0) n = pt.length - 1; // format le plus grand
+
imgSrc = pt[n][1];
- last_map = pt[n][5];
+ last_map = pt[n][0];
+ // if (Type_Img == "pamoorama") return;
+ if (typeof Zone_image.src == "undefined") Zone_image.src = " ";
status = imgSrc.match(RegExp(Zone_image.src, "gi"));
status1 = (imgSrc.toString() == Zone_image.src.toString());
+
if (status1 == true) return;
- theImg = document.getElementById(theMainImage_Id.replace("#", ""));
+ theImg = document.getElementById(theMainImage_id.replace("#", ""));
href_path = "javascript:changeImgSrc('" + imgSrc + "', '" + last_map + "', '" + "Autosize" + "')";
jQuery("#linkAutosize").attr("href", href_path);
- if (theImg.useMap.match(RegExp("map", "gi"))) return true;
- if (theImg.src.match(RegExp(imgSrc, "gi"))) return true;
- changeImgSrc(imgSrc, last_map, "#Autosize");
- Zone_image.zoom = Zone_image.image.height / Zone_image.height_init;
+ if (theImg.tagName != "IMG") {
+ theImg.useMap = "#Autosize";
+ imgSrc_i = jQuery(theImg).css("backgroundImage");
+ imgSrc_j = jQuery(theImg).css("background-image");
+
+ } else {
+ if (theImg.useMap.match(RegExp("map", "gi"))) return;
+ if (theImg.src.match(RegExp(imgSrc, "gi"))) return;
+ changeImgSrc(imgSrc, last_map, "#Autosize");
+ }
return true;
- var theImg = document.getElementById(theMainImage_Id.replace("#", ""));
+ theImg = document.getElementById(theMainImage_id.replace("#", ""));
if (init_img(theImg)) {
@@ -1288,17 +1283,13 @@
* correction pamoorama
*************************************************/
- Set_Pamoorama = function () {
- myPamoorama = window.myPamoorama;
+ Set_Pamoorama = function (Format) {
if (Type_Img == "pamoorama") {
-
+ if (!Format) return;
+
+ myPamoorama = window.myPamoorama;
if (!nopano) {
- //theMainImage_Id = "#pamoorama";
nopano = false;
Wait_pamoorama();
- infos_theMainImage = jQuery(theMainImage_Id).infos();
- //theMainImage_Id = "#pamoorama";
- }
-
-
+ }
if (typeof myPamoorama == "undefined") {
return;
@@ -1306,21 +1297,14 @@
//=========================================================
if (!nopano) {
- //theMainImage_Id = "#pamoorama";
nopano = false;
Wait_pamoorama();
- infos_theMainImage = jQuery(theMainImage_Id).infos();
- //theMainImage_Id = "#pamoorama";
- }
-
-
-
- infos_pamoorama = jQuery("#pamoorama").infos();
- infos_pamoorama_outter = jQuery("#pamoorama_outter").infos();
- infos_pamoorama_inner = jQuery("#pamoorama_inner").infos();
- infos_pamoorama_footer = jQuery("#pamoorama_footer").infos();
- infos_pamoorama_frame = jQuery("#pamoorama_frame").infos();
- infos_frame = jQuery(myPamoorama.frame).infos();
-
-
+ }
+
+ jQuery("#pamoorama").show(1000);
+ jQuery("#loading").hide(1000);
+
+ Wait_pamoorama();
+ window.myPamoorama.stopAnim();
+ infos_theMainImage = jQuery("#pamoorama").infos(true);
//====================================================
jQuery("#pamoorama").css({
@@ -1329,19 +1313,37 @@
// height: Zone_Affichage.height + "px" , sinon déclenchement panorama sur la hauteur;
});
-
+ //============================================================
+ infos_pamoorama = jQuery("#pamoorama").infos(true);
+ infos_pamoorama_outter = jQuery("#pamoorama_outter").infos();
+ infos_pamoorama_inner = jQuery("#pamoorama_inner").infos();
+ infos_pamoorama_footer = jQuery("#pamoorama_footer").infos();
+ infos_pamoorama_frame = jQuery("#pamoorama_frame").infos();
+
+ infos_frame = jQuery(myPamoorama.frame).infos();
marges_w = infos_pamoorama.general.marges.width;
-
marges_h = infos_pamoorama.general.marges.height;
marges_h += infos_pamoorama_footer.general.height;
-
jQuery("#pamoorama").css({
width: ""
});
- outter_height = Zone_image.container.height - marges_h;
- Zoom_pano = outter_height / Zone_image.height_init;
-
- new_image = { height: Math.ceil(Zone_image.height_init * Zoom_pano),
- width: Math.ceil(Zone_image.width_init * Zoom_pano)
+
+ outter_width = Format.width;
+ pos = jQuery("#theImage").offset();
+ pos.top = infos_pamoorama.top;
+ pos.left = infos_pamoorama.left;
+ outter_height = Format.height - marges_h;
+ /*
+ jQuery("#theMainImage").width(outter_width);
+ jQuery("#theMainImage").height(outter_height);
+ jQuery("#theMainImage").css({ left: pos.left, top: pos.top, margin: "auto", border: "solid 1px red"
+
+ });
+
+ */
+
+ Zoom_pano = outter_height / Format.height;
+ new_image = { height: Math.ceil(Format.height * Zoom_pano),
+ width: Math.ceil(Format * Zoom_pano)
}
@@ -1354,5 +1356,5 @@
//---------- test largeur image
- new_width = Zone_image.container.width;
+ new_width = Format.width;
if (new_width > new_image.width) {
new_width = new_image.width;
@@ -1377,8 +1379,8 @@
//============= Mise à l'echelle ==================
jQuery("#pamoorama_footer").css({
- width: Zone_image.container.width + "px"
+ width: Format.width + "px"
});
- window.myPamoorama.options.width = Math.ceil(Zone_image.container.width);
+ window.myPamoorama.options.width = Math.ceil(Format.width);
//==================================================================
new_max_left = new_image.width - outter_width;
@@ -1399,18 +1401,18 @@
// frame = Zone_image.container.width
- nw = (window.myPamoorama.image.width * Zone_image.container.width) / window.myPamoorama.imageWidth;
+ nw = (window.myPamoorama.image.width * Format.width) / window.myPamoorama.imageWidth;
jQuery("#pamoorama_frame").width(nw);
jQuery("#pamoorama").css({
width: outter_width, height: "auto"
});
- //infos_theMainImage.width;
- // infos_theMainImage.height;
-
- jQuery("#theMainImage").width(infos_pamoorama_outter.width);
- jQuery("#theMainImage").height(infos_pamoorama_outter.height);
- jQuery("#theMainImage").css({ margin: "auto"
-
+ // jQuery("#theImage").trigger("Start_right");
+ jQuery("#theImage").height(Zone_image.container.height + 1);
+
+ jQuery("#theImage").css({
+ height: Zone_image.container.height
});
+
+ return true
} // test img
} // Set_Pamoorama
@@ -1428,27 +1430,8 @@
//====================================
Calcul_Image = function () {
- // theImageAndInfos(jaune) -> theImage(vert) -> [llgbo] -> theMainImage
- // + infos_imageInfos(red)
- infos_window = jQuery(window).infos();
- infos_body = jQuery("body").infos(); // thePicturePage
- infos_the_page = jQuery("#the_page").infos();
- // theHeader
- //
- infos_menubar = jQuery("#menubar").infos();
- infos_menubar_dl = jQuery("#menubar dl").infos();
- infos_content = jQuery("#content").infos();
- // imageHeaderBar
- // imageToolBar imageInfoBar
- infos_imageInfoBar = jQuery("#imageInfoBar").infos();
- infos_imageToolBar = jQuery("#imageToolBar").infos();
- //theImageAndTitle
- infos_theImageAndInfos = jQuery("#theImageAndInfos").infos();
- if (infos_theImageAndInfos.width == 0)
- infos_theImageAndInfos = jQuery("#theImageAndTitle").infos();
/****************************************/
- infos_theImage = jQuery(theImage_id).infos({ pos_absolute: true }); // conteneur
- infos_imageInfos = jQuery(imageInfos_id).infos({ pos_absolute: true }); // information
- infos_theMainImage = jQuery(theMainImage_Id).infos({ pos_absolute: true }); // Image
+ infos_imageInfos = jQuery(imageInfos_id).infos(true); // information
+ infos_theMainImage = jQuery(theMainImage_id).infos(true); // Image
// commentContent
// copyright
@@ -1459,6 +1442,6 @@
container = {
- height: infos_window.height - pos_top,
- width: infos_content.width
+ height: Zone_image.container.height,
+ width: Zone_image.container.width
}
marge_left = options.marge_left;
@@ -1468,5 +1451,5 @@
//==========================================================
- if (theme.match(RegExp("stripped", "gi"))) {
+ if (options.theme.match(RegExp("stripped", "gi"))) {
infos_the_page.margin.left = 20; //taille fleche
infos_the_page.margin.right = 20;
@@ -1474,5 +1457,5 @@
- if (theme.match(RegExp("elegant", "gi"))) {
+ if (options.theme.match(RegExp("elegant", "gi"))) {
jQuery("#imageInfos").css({ position: "absolute", right: 0, top: 0
@@ -1481,5 +1464,5 @@
// marge_right += infos_content.general.marges.right;
if (infos_imageInfos.visible == true) {
- marge_right += infos_imageInfos.general.width; ;
+ // marge_right += infos_imageInfos.general.width; ;
} else {
@@ -1487,35 +1470,26 @@
}
-
-
- } else if (theme.match(RegExp("stripped", "gi"))) {
-
- } else if (theme.match(RegExp("simple", "gi"))) {
- if (infos_imageInfoBar.visible == true) {
- marge_right += infos_imageInfoBar.general.width;
-
- } else {
- marge_right += 0;
-
- }
- marge_left += 2;
-
- } else if (theme.match(RegExp("OS", "gi"))) {
-
- } else if (theme.match(RegExp("pur", "gi"))) {
+ marge_right += 1;
+ marge_left += 1;
+
+ } else if (options.theme.match(RegExp("stripped", "gi"))) {
+
+ } else if (options.theme.match(RegExp("simple", "gi"))) {
+
+
+
+ } else if (options.theme.match(RegExp("OS", "gi"))) {
+
+ } else if (options.theme.match(RegExp("pur", "gi"))) {
marge_right += 0;
// marge_right += 25;
+ } else if (options.theme.match(RegExp("mont", "gi"))) {
+ marge_right += 0;
+
+ // marge_right += 25;
+
} else {
- // jQuery("#menuSwitcher").hide();
-
- margeLeft = infos_content.margin.left;
- if (infos_menubar_dl.visible == true) {
- margeLeft += infos_body.general.marges.width + infos_menubar.general.width;
- }
- else
-
- margeLeft += infos_thePicturePage.general.marges.width;
- // container.width -= margeLeft;
+
@@ -1526,21 +1500,14 @@
//========== Format Image ==============
retrait_img.height = Math.ceil(options.marges_llgbo || 0)
- + Math.ceil(infos_theMainImage.exterieur.height - infos_theMainImage.height);
+ + Math.ceil(infos_theMainImage.general.marges.height);
+ retrait_img.height += 2;
//===============================================================
- retrait_img.width = Math.ceil(infos_theMainImage.exterieur.width - infos_theMainImage.width); // borderwidth+padding
+ retrait_img.width = Math.ceil(infos_theMainImage.general.marges.width); // borderwidth+padding
retrait_img.width += Math.ceil(options.marges_llgbo || 0);
- retrait_img.width += 0;
+ retrait_img.width += 2;
//================== Limite Format Image =====================
container.height_interne = container.height - marge_top - marge_bottom;
container.width_interne = container.width - marge_left - marge_right;
-
- rapport = Zone_image.rapport_init;
- if (Type_Img == "pamoorama") {
- container.height_interne -= (marge_bottom + marge_top);
- }
- if (options.marges_llgbo > 0) {
- // container.height_interne - = (marge_bottom);
- }
image_max = {
height: container.height_interne - retrait_img.height,
@@ -1552,11 +1519,14 @@
height_theMainImage = Math.ceil(image_max.height);
width_theMainImage = Math.ceil(image_max.width);
+
if (Type_Img == "pamoorama") {
} else {
- height_theMainImage = Math.ceil(width_theMainImage / rapport);
+
+ height_theMainImage = Math.ceil(width_theMainImage / Zone_image.image_init.rapport);
+
if (height_theMainImage > container.height_interne) {
image_max.height = container.height_interne;
- image_max.width = image_max.height * rapport;
+ image_max.width = image_max.height * Zone_image.image_init.rapport;
width_theMainImage = Math.ceil(image_max.width);
height_theMainImage = Math.ceil(image_max.height);
@@ -1564,5 +1534,5 @@
if (width_theMainImage > container.width_interne) {
image_max.width = container.width_interne;
- image_max.height = image_max.height / rapport;
+ image_max.height = image_max.width / Zone_image.image_init.rapport;
width_theMainImage = Math.ceil(image_max.width);
height_theMainImage = Math.ceil(image_max.height);
@@ -1573,23 +1543,6 @@
}
- height_theMainImage = Math.ceil(width_theMainImage / rapport);
- }
- //=================================================
-
-
- container.height = height_theMainImage + marge_bottom + marge_top;
- bottom = jQuery("#imageInfos").absoluteAll({ pos_absolute: true }).Bottom;
- ps = infos_imageInfos.left;
- ps1 = infos_theImage.left;
- if (ps > infos_theImage.right)
- container.height = Math.max(container.height, infos_imageInfos.general.bottom);
-
- container.width = infos_content.width - marge_right - marge_left;
-
- affiche_debug({
- Debug3: Debug_info(3, "H:" + container.height + " img:" + height_theMainImage + " if " + infos_imageInfos.general.bottom, " ext:")
- });
-
-
+
+ }
//================================================================
Zone_image.image = {
@@ -1598,29 +1551,25 @@
};
- Zone_image.container = {
- width: container.width,
- height: container.height
-
- };
+
//=================================================================
- Zone_image.src = jQuery(theMainImage_Id).attr("src");
- Zone_image.zoom = Zone_image.image.height / Zone_image.height_init;
+ Zone_image.marges = { width: marge_left + marge_right + retrait_img.width,
+ height: marge_top + marge_bottom + retrait_img.height
+
+ }
+ Zone_image.src = jQuery(theMainImage_id).attr("src");
+ Zone_image.zoom = Zone_image.image.height / Zone_image.image_init.height;
}
/*********************************************
- * Calcul l es dimensions.
+ * Calcul les dimensions.
*********************************************/
Get_dimensions = function (force, parametres) {
- if (theImage_init()) {
- infos_theMainImage = jQuery(theMainImage_Id).infos();
+ if (Select_Image()) { //+calcul
+ infos_theMainImage = jQuery(theMainImage_id).infos();
Zone_image.src = infos_theMainImage.src;
}
- infos_widow = jQuery(window).infos();
- infos_body = jQuery("body").infos();
- var winwidth = infos_body.width;
- var winheight = infos_body.height;
-
-
- if (typeof rapport == "undefined") return;
+
+
+ if (typeof Zone_image.image_init.rapport == "undefined") return;
if (force && force == true) old_window.width = 0;
@@ -1632,5 +1581,5 @@
- if (typeof useMap == "") useMap = "#Autosize";
+ if (typeof useMap == "") useMap = "Autosize";
if (options.useMap) {
// useMap = options.useMap;
@@ -1658,50 +1607,35 @@
}
- //=================================================================
Calcul_Image();
+ jQuery("#loading").hide();
img_finale = { width: Zone_image.image.width, height: Zone_image.image.height };
- //=================================================================
- old_window = jQuery(window).infos();
-
+ r1 = Zone_image.image.width / Zone_image.image.height;
//=================================================================
switch (Type_Img) {
case "map":
- Set_Map(true);
+ if (Set_Map(true)) return false;
break
case "panorama":
- if (!theMainImage_Id) {
- theMainImage_Id = theMainImage_id;
- if (theMainImage_Id.length > 0)
- return;
- theMainImage_Id = jQuery().Get_Img_Maxi("#Panorama img[alt]");
-
- if (theMainImage_Id.length > 0)
- theMainImage_Id = theMainImage_Id[0];
- else
- theMainImage_Id = jQuery().Get_Img_Maxi("#Panorama img[alt]");
+ if (!theMainImage_id) {
+
}
- infos_theImage = jQuery(theMainImage_Id).infos();
+ infos_theImage = jQuery(theMainImage_id).infos();
infos_the_page = jQuery("#the_page").infos();
- jQuery("#theImage").height(infos_theImage.height);
img_finale.height = infos_theImage.height;
break
case "img":
- if (!theMainImage_Id) return;
- if (theme.match(RegExp("luciano", "g"))) {
-
- }
-
- infos_the_page = jQuery("#the_page").infos();
+
+
break
case "img_autre":
- if (!theMainImage_Id) {
+ if (!theMainImage_id) {
if (DEBUG_autosize == "true") alert("The_MainImage=null");
return;
}
- infos_theImage = jQuery(theMainImage_Id).infos();
+
infos_the_page = jQuery("#the_page").infos();
@@ -1714,5 +1648,5 @@
if (infos_theMainImage.width == 0)
infos_theMainImage = jQuery("#the_page").infos();
- infos_theImage = infos_theMainImage;
+
infos_the_page = jQuery("#the_page").infos();
Bandeau_bas.height = Bandeau_bas.top;
@@ -1735,5 +1669,5 @@
case "charlie":
img_reelle = { height: img_height, width: img_width };
- infos_theMainImage = jQuery(theMainImage_Id).infos(); ;
+ infos_theMainImage = jQuery(theMainImage_id).infos(); ;
infos_the_page = jQuery("#the_page").infos();
if (rapport < 0) {
@@ -1749,6 +1683,5 @@
/*
- infos_theImage = jQuery("#pamoorama_outter").infos();
- infos_theImage.height = infos_theImage.height;
+
infos_the_page = jQuery("#the_page").infos();
*/
@@ -1760,508 +1693,48 @@
//================= Vérification Taille image minimun autorisée ========
- MinWidth = jQuery(theMainImage_Id).css("minWidth");
- if (MinWidth == "0px")
- MinWidth = options.mini_width;
- MinHeight = jQuery(theMainImage_Id).css("minHeight");
- if (MinHeight == "0px")
- MinHeight = options.mini_height;
-
- MaxWidth = jQuery(theMainImage_Id).css("maxWidth");
- if (MaxWidth == "0px")
- MaxWidth = winwidth;
- MaxHeight = jQuery(theMainImage_Id).css("maxHeight");
- if (MaxHeight == "0px")
- MaxHeight = winheight;
-
- //=============== Vérification taille minimale autorizée ======================
- var miniWidth = jQuery(theMainImage_Id).Get_Val_int(MinWidth, options.mini_width);
- var miniHeight = jQuery(theMainImage_Id).Get_Val_int(MinHeight, options.mini_height);
- if (winwidth < options.mini_width2) mini_width2 = winwidth;
-
- var miniWidth2 = jQuery(theMainImage_Id).Get_Val_int(MinWidth, options.mini_width2);
- var miniHeight2 = jQuery(theMainImage_Id).Get_Val_int(MinHeight, options.mini_height2);
-
-
- var maxWidth = jQuery(theMainImage_Id).Get_Val_int(MaxWidth, winwidth, "0");
- maxHeight = jQuery(theMainImage_Id).Get_Val_int(MaxHeight, winheight, "0");
-
- mini_width = parseInt(miniWidth);
- mini_height = parseInt(miniHeight);
- img_reelle.width = parseInt(img_reelle.width);
- if (img_reelle.width < mini_width)
- return;
- img_reelle.height = parseInt(img_reelle.height);
- if (img_reelle.height < parseInt(mini_height))
- return;
-
-
-
+ if ((Zone_image.image.height < options.mini_height) || (Zone_image.image.width < options.mini_width)) {
+ Zone_image.image.width = Math.ceil(Zone_image.width_init);
+ Zone_image.image.height = Math.ceil(Zone_image.image.width / Zone_image.image_init.rapport);
+ }
//=================================================
- if (Zone_image.image.height < options.mini_height2)
- Zone_image.image.height = options.mini_height2;
- if (Zone_image.image.width < options.mini_width2)
- Zone_image.image.width = options.mini_width2;
+ if (Zone_image.image.height < options.mini_height2) {
+ Zone_image.image.height = parseInt(options.mini_height2);
+ Zone_image.image.width = Math.ceil(Zone_image.image.height * Zone_image.image_init.rapport);
+ }
+ if (Zone_image.image.width < options.mini_width2) {
+ Zone_image.image.width = parseInt(options.mini_width2);
+ Zone_image.image.height = Math.ceil(Zone_image.image.width / Zone_image.image_init.rapport);
+ }
//==================================================
- // Image_width largeur à atteindre
+ // ImageWidthidth largeur à atteindre
// Calcul du rapport d'agrandissement
if (Type_Img != "pamoorama") {
echelle_max = parseFloat(options.echelle_max, '3');
if (Zone_image.zoom > 1) {
- theImage_init();
+ Select_Image(); //+calcul
}
if (Zone_image.zoom > echelle_max) {
Zone_image.zoom = echelle_max;
Zone_image.image.width = parseInt(Zone_image.width_init * Zone_image.zoom);
- if (rapport > 0)
- Zone_image.image.height = parseInt(Zone_image.width_init / rapport);
- }
- }
+ if (Zone_image.image_init.rapport > 0)
+ Zone_image.image.height = parseInt(Zone_image.width_init / Zone_image.image_init.rapport);
+ }
+ }
+ mxi = Math.ceil(Zone_image.image.height + Zone_image.marges.height);
+
+ Zone_image.container.height = Math.max(Zone_image.container.height, mxi);
img_finale = { width: Zone_image.image.width, height: Zone_image.image.height };
return true;
-
-
-
-
-
-
-
- //===================================================
-
- img_finale.height = Image_height;
- img_finale.width = Image_width;
- if (theme.match(RegExp("stripped", "gi"))) {
- img_finale.width -= (llgboframe.top * 2);
- if (rapport > 0) img_finale.height = (img_finale.width / rapport);
- else img_finale.height -= (llgboframe.top * 2);
-
- }
- zoom = echelle;
- if (typeof (llgboframe) != "undefined" && llgboframe.height > 0) {
- //=============LLGBO2 ===========================
- t1 = llgboframe;
- if (!theMainImage_Id.src) {
- theMainImage_Id = jQuery(llgbo_id).find("img").get(0)
- if (!theMainImage_Id.src) {
- theMainImage_Id = jQuery("#theImage").find("div").get(0)
- }
- }
- if (theMainImage_Id.src) {
- wingbo = img_finale.width;
- heightgbo = img_finale.height;
- if (Type_Img == "panorama") {
- heightgbo = infos_theImage.height;
- img_finale.height = infos_theImage.height;
- }
-
-
-
-
- // jQuery("#theImage").height(heightgbo + marges_llgbo / 2);
- }
- }
-
- //================ Zone affichage =========================
-
- // jQuery("#theImage").css("top", "0px");
- jQuery("#standard").css("top", 0 + "px");
- jQuery("#comments").css("top", 0 + "px");
- //========== Image Remise à l'échelle =======================
-
- img_finale.height = parseInt(img_finale.height);
- img_finale.width = parseInt(img_finale.width);
- //=========================================================================
- //=== cadre = theImage
- if (theme.match(RegExp("simple", "gi"))) {
- jQuery("#theImage").width(Zone_Affichage.width); //centrer simple black
- jQuery("#theImage").css({ width: Zone_Affichage.width + "px",
- marginLeft: "auto"
- });
-
- } else if (theme.match(RegExp("sobre", "gi")) || theme.match(RegExp("hr_", "gi")) || theme.match(RegExp("Mont", "gi"))) {
- jQuery("#theImage").css({ width: "auto", marginLeft: "auto" });
- } else if (theme.match(RegExp("saruka", "gi"))) {
-
- jQuery("#theImage").css({ width: Zone_Affichage.width + "px" });
- } else if (theme.match(RegExp("elegant", "gi"))) {
-
- // jQuery("#theImage").css("width", "auto");
- jQuery("#theImage").css({ height: Zone_Affichage.height + "px", width: "auto" }); //conteneur
-
- } else {
- jQuery("#theImage").css("width", "auto");
-
- }
- // ;
-
- if (Type_Img == "panorama" || Type_Img == "pamoorama") {
- img_finale.height = infos_theImage.height;
- Zone_Affichage.height = img_finale.height;
-
- }
-
- if (typeof (gmaps) != "undefined") {
- Gmap_ = gmaps.maps[0];
- if (Gmap_.sizeMode == 'A') {
- jQuery("#iGMapsIcon").css({ width: old_window.width * 0.8 + "px", height: old_window.height * 0.8 + "px" });
-
- }
- }
- //============= flv,mov,mpg ok
- /* wmv nok
- * avi nok
- //===========================================
- */
- if (Type_Img == "charlie") {
- t1 = jQuery("#charlie").infos();
-
- /**/
-
- pdf = 0;
- jQuery("#charlie div").each(function (i) {
-
-
- p1 = jQuery(this).infos();
- pdf += p1.padding.right + p1.padding.left;
- });
- img_finale.width -= pdf;
-
- jQuery("#charlie").css({
- width: img_finale.width + pdf + "px",
- height: img_finale.height + "px",
- marginLeft: "auto"
- });
-
-
- if (MainImage.length > 0) {
- img_finale.height = parseInt(img_finale.width / rapport);
- img_finale.height -= 30;
- img_finale.width = rapport * img_finale.height;
-
-
- MainImage.width(img_finale.width);
- MainImage.height(img_finale.height);
- jQuery("#embedplayer").width(300);
- jQuery("#embedplayer").height(15);
- } else {
- jQuery("#player").css("width", img_finale.width + "px");
- jQuery("#player").css("height", img_finale.height + "px");
-
- jQuery("#embedplayer").css("width", img_finale.width + "px");
- jQuery("#embedplayer").css("height", img_finale.height + "px");
-
- jQuery("embed").css({ width: img_finale.width + "px",
- height: img_finale.height + "px"
- });
- jQuery("object").css({ width: img_finale.width + "px",
- height: img_finale.height + "px"
- });
- jQuery("video").css({ width: img_finale.width + "px",
- height: img_finale.height + "px"
- });
-
-
-
- jQuery("video").height(img_finale.height);
- jQuery("video").width(img_finale.width);
-
- jQuery("object").width(img_finale.width);
- jQuery("object").height(img_finale.height);
- //jQuery("#theImage").height(img_finale.height + Bandeau_bas.height); //??
-
- jQuery(theMainImage_Id).height(img_finale.height);
- jQuery("#theImage").css("height", "auto");
- }
-
-
- } else if (Type_Img == "embed") {
-
- if (MainImage.length > 0) {
- img_finale.height = parseInt(img_finale.width / rapport);
- img_finale.height -= 30;
- img_finale.width = rapport * img_finale.height;
-
-
- MainImage.width(img_finale.width);
- MainImage.height(img_finale.height);
- jQuery("#embedplayer").width(300);
- jQuery("#embedplayer").height(15);
- } else {
- jQuery("#theImage").css("height", "auto");
- jQuery("embed").css("height", img_finale.height);
- jQuery("object").css({ height: img_finale.height + "px" });
-
- jQuery("object").width(img_finale.width);
- jQuery("object").height(img_finale.height);
- }
-
- } else if (Type_Img == "panorama") {
- if (typeof asp_options != "undefined")
- n = asp_options;
- n1 = jQuery("#Panorama div").width();
- jQuery(".panorama-viewport").css("margin", "auto");
- n = infos_imageToolBar;
-
-
- } else if (Type_Img == "pamoorama") {
- Set_Pamoorama();
-
-
-
-
- } else if (theMainImage_Id != null && theMainImage_Id.src) {
- //--- background ?? ---
- jQuery(theMainImage_Id).height(img_finale.height);
- jQuery(theMainImage_Id).width(img_finale.width);
- jQuery(theMainImage_Id).css({ height: img_finale.height + "px ",
- width: img_finale.width + "px "
- });
-
-
- } else {
- //===map ? luciano ===
- // jQuery(theMainImage_Id).css({ height: img_finale.height + "px ", width: img_finale.width + "px });
- // jQuery(theMainImage_Id).height(img_finale.height );
- // jQuery(theMainImage_Id).width(img_finale.width );
- // jQuery(theMainImage_Id).attr({ width: img_finale.width });
- h = img_finale.height;
- h = Zone_Affichage.height - Zone_Affichage.borderwidth.top - Zone_Affichage.borderwidth.bottom;
- h -= (infos_theImage.borderwidth.bottom + infos_theImage.borderwidth.top);
-
- jQuery(theMainImage_Id).attr({ height: h - 3 }); //image
- if (theme.match(RegExp("elegant", "gi"))) {
- return true;
-
- }
- if (theme.match(RegExp("luciano", "g"))) {
- imgl = 180;
- l = Zone_Affichage.left;
-
- jQuery(".imageNumber").css({ left: l + "px"
-
- });
- jQuery("#theImage" + " #theImg IMG").css({ height: img_finale.height + "px ",
- width: (img_finale.width - imgl) + "px ", marginTop: "0px"
- })
- }
-
- }
-
- var theImg = document.getElementById(theMainImage_Id.replace("#", ""));
- if (theImg) {
- theImg.removeAttribute("width");
- theImg.removeAttribute("height");
- jQuery(theMainImage_Id).css("width", img_finale.width + "px");
- }
-
- jQuery("#navThumbPrev").css({ overflow: "hidden" });
- jQuery("#navThumbNext").css({ overflow: "hidden" });
- n = typeof inittoolbar;
- if (Type_Img == "map") {
- jQuery("#navThumbNext").css({ display: 'none' });
- jQuery("#navThumbPrev").css({ display: 'none' });
- jQuery("#theImage").css({ marginTop: infos_imageToolBar.height + "px", marginLeft: "0px",
- width: winwidth + "px",
- height: winheight + "px"
- });
- //mapPicture
- }
- try {
- if (theme.match(RegExp("gally", "gi"))) {
- if (typeof inittoolbar == "function") {
- if (typeof (currentTab) == "undefined") inittoolbar();
- else initializeImageMode("resize");
- } else {
- tp = gallyPP.getImageProp();
- if (typeof (GallyPP) == "function")
- gallyPP = new GallyPP();
-
- iph = jQuery("#imageHeaderBar").infos();
- jQuery("#imageToolBar").css({ top: iph.bottom + "px", position: "absolute" });
- jQuery("#theImage").width(winwidth);
- }
- //===========================================================================
- if (jQuery("#navThumbPrev").length > 0) {
- jQuery("#navThumbPrevContainer").css({ left: "0px"
- });
- }
- if (jQuery("#navThumbNext").length > 0) {
- jQuery("#navThumbNextContainer").css({ left: "0px"
- });
- }
- //=============================================================================
- if (!theme.match(RegExp("lapis", "gi"))) {
- if (typeof initializeImageMode == "function") {
- initializeImageMode("resize");
- }
-
- }
-
- } else if (theme.match(RegExp("simple", "g"))) {
-
- jQuery("#imageToolBar").css({ position: "static" });
-
- infos_imageInfoBar = jQuery("#imageInfoBar").infos();
- if (infos_imageInfoBar.bottom < infos_theMainImage.bottom) {
- // jQuery("#imageInfoBar").height(infos_theMainImage.bottom);
- }
-
- } else {
-
- // jQuery("#imageToolBar").css("position", "static");
- }
- } catch (e) {
-
- }
- zoom = img_finale.height / img_height;
- h0 = jQuery("#content").height();
- if (h0 == null) {
- h0 = winheight - Zone_Affichage.top;
- }
- h1 = (h0 - img_finale.height) / 2;
- // jQuery("#theImage").css({ marginTop: h1 + "px" });
-
- zoom = parseInt(zoom * 100);
- jQuery('#zoom ').val(zoom);
-
-
-
- // --- réglage de la hauteur de page en fonction du copyright-----------
- infos_copyright = jQuery("#copyright").infos();
-
- if (theme.match(RegExp("stripped", "gi"))) {
- var TitleBox = jQuery("#imageTitleContainer");
- if (TitleBox.length != 0) TitleBox.css("width", img_finale.width + "px");
- } else {
-
- }
-
-
- /*
- if (!theme.match(RegExp("luciano", "gi"))) {
- jQuery("#linkNext").css({ height: "80px", width: "200px", overflow: "hidden" });
- jQuery("#linkPrev").css({ height: "80px", width: "200px", overflow: "hidden" });
- jQuery(".navThumb img").css({ height: "80px", width: "", overflow: "hidden" });
- }
- */
- infos_frame = jQuery("#theImage").infos();
- if (theme.match(RegExp("stripped", "gi"))) {
- /*
- infos_theImageBox = jQuery("#theImageAndTitle").infos();
- p1 = jQuery(".randomButtons").infos();
- p2 = jQuery("#imageHeaderBar").infos();
- p3 = infos_content.top;
- p1 = options.imageAutosizeTitle;
-
- jQuery("#theImage").width("width", infos_theImageBox.width + "px");
- //jQuery("#theImageAndTitle").css("position", "relative");
- jQuery("#content").css({ position: "relative", top: "10px", marginTop: "0px",
- paddingTop: "0px", textAalign: "center", marginLeft: "auto"
- });
-
- jQuery("#theImageAndTitle").css({ position: "relative", top: "0px", marginTop: "0px",
- paddingTop: "0px", marginLeft: "auto"
- }); */
- t1 = infos_theImageBox.top;
- l1 = infos_theImageBox.left;
- // infos_theImageBox = jQuery("#theImage").infos();
-
- } else {
-
- t1 = infos_frame.top;
- l1 = infos_frame.left;
- infos_theImageBox = jQuery("#theImage").infos(); //theImage
- }
- infos_theImageBox.margin.margin = infos_frame.margin.margin;
- infos_theImageBox.top = t1;
- infos_theImageBox.left = l1;
- // infos_theImageBox.position = "absolute";
-
- Window_Affichage = infos_theImageBox;
- if (DEBUG_autosize == "_true") {
- // jQuery("#theImage").css("border", "solid green");
-
- jQuery("#Debug5").css({ background: "red",
- position: "absolute",
- border: "green solid 2px",
- textAlign: align_auto,
- margin: "auto",
- top: Window_Affichage.top + "px",
- left: Window_Affichage.left + "px",
- width: Window_Affichage.width + "px",
- height: Window_Affichage.height + "px"
- }); //red
- jQuery("#Debug4").css({ top: infos_frame.bottom - infos_description.height + "px" }); //green
- }
-
- //Wait_Affichage();
-
- return true;
- } // Get_dimensions
-
-
- var infos_theMainImage = jQuery(theMainImage_Id).infos(); // Image
-
- if (infos_theMainImage.width == 0) {
- if (Type_Img == "pamoorama") {
- infos_theMainImage.id = "#theMainImage";
-
- } else {
- infos_theMainImage = jQuery("#theImage img").infos();
-
- }
- if (infos_theMainImage.id == "")
- jQuery("#theImage img").attr("id", "theMainImage");
- infos_theMainImage = jQuery(theMainImage_Id).infos();
- }
-
-
-
-
- var type_size = cookies.typeSave; // xxx
- var useMap = cookies.pictureMap; // #mapxxx
-
- var user_status = options.user_status;
- var type_size_maxi = eval("options." + user_status + "_type"); //limite taille
-
+ }
+ //________________ Get_dimensions ___________________
+
+
+ /*****************************
+ * init_gen
+ *****************************/
init_gen = function (e) {
-
- //============= Gestion Maps ================
- nom_map = "Autosize";
- a_up = jQuery("map[name='" + nom_map + "'] area[rel=up]");
- a_prev = jQuery("map[name='" + nom_map + "'] area[rel=prev]");
- a_next = jQuery("map[name='" + nom_map + "'] area[rel=next]");
-
- new_html = '';
- jQuery("#theImage map:last").after(new_html);
+ theImg = document.getElementById(theMainImage_id.replace("#", ""));
//==================================================
marges_llgbo = 0;
@@ -2290,5 +1763,5 @@
infos_llgbo.top = pAll.Top;
infos_llgbo.bottom = pAll.Bottom;
- pAll = jQuery(theMainImage_Id).absoluteAll({ pos_absolute: true });
+ pAll = jQuery(theMainImage_id).absoluteAll({ pos_absolute: true });
pos_top = pAll.Top; ;
pos_bottom = pAll.Bottom; ;
@@ -2301,14 +1774,9 @@
pos_top = infos_theImageAndInfos.top;
-
options.pos_top = pos_top;
-
options.marge_left = infos_theImage.general.marges.left + Math.ceil(options.marge_gauche);
options.marge_right = infos_theImage.general.marges.right + Math.ceil(options.marge_droite);
options.marge_top += infos_theImage.general.marges.top + infos_content.general.marges.top + Math.ceil(options.marge_haute);
options.marge_bottom = Math.ceil(options.marge_basse); // +infos_content.general.marges.bottom; ;
-
- old_window = { width: 0, height: 0 };
-
//=================== Gestion liste photos size ============================
@@ -2353,7 +1821,4 @@
last_map = pt[us][5]; // taille selectionné.
href_path = "javascript:changeImgSrc('" + imgSrc + "', '" + last_map + "', '" + "Autosize" + "')";
-
-
-
new_html = '
✔ ';
new_html += '';
@@ -2369,7 +1834,4 @@
useMap = last_map;
}
-
-
-
typeSave = cookies.typeSave; //picturederiv xxx
@@ -2387,344 +1849,41 @@
last_map = type_size_maxi;
href_path = "";
-
- }
- affiche_debug({
- Debug1: Debug_info(1, href_path, "href_path:"),
- Debug4: Debug_info(4, "img:" + imgSrc + " last_map: " + last_map + " maxi:" + type_size_maxi, "Init:")
- });
-
-
- }; //init_gen
- init_gen();
-
-
- }); // ready
-
- //===============================================================
- // Fonctions générales
- //===============================================================
- /******************************************
- *
- ******************************************/
- Save_cookies = function (parametres) {
- if (parametres.typeSave) document.cookie = 'picture_deriv=' + parametres.typeSave + ';path="' + "/" + '" ';
- if (parametres.typeSave) jQuery.cookie('picture_deriv', parametres.typeSave, { path: "/" });
- if (parametres.pictureMap) jQuery.cookie('picture_map', parametres.pictureMap, { path: "/" });
- if (parametres.imgSrc) jQuery.cookie('img', parametres.imgSrc, { path: "/" });
-
- if (parametres.imgHeight) jQuery.cookie('img_h', infos_theMainImage.height, { path: "/" });
- if (parametres.imgWidth) jQuery.cookie('img_w', infos_theMainImage.width, { path: "/" });
- if (parametres.windowHeight) jQuery.cookie('window_height', Window_Affichage.height, { path: "/" });
- if (parametres.windowWidth) jQuery.cookie('window_width', Window_Affichage.width, { path: "/" });
- }
-
- Get_cookies = function () {
- parametres = {
- typeSave: jQuery.cookie('picture_deriv'),
- pictureMap: jQuery.cookie('picture_map'),
- imgSrc: jQuery.cookie('img'),
-
- imgHeight: jQuery.cookie('img_h'),
- imgWidth: jQuery.cookie('img_w'),
- windowHeight: jQuery.cookie('window_height'),
- windowWidth: jQuery.cookie('window_width')
- }
- return parametres;
- }
-
-
- /*************************************************
- * Recuoère le Type d'mage
- *************************************************/
- Get_type_img = function (e) {
- //====== détection du type d'images ======
- if (jQuery("#charlie").length > 0) {
- Type_Img = "charlie";
- } else if (jQuery("#Panorama").length) {
- Type_Img = "panorama";
- } else if (jQuery("#pamoorama").length) {
- Type_Img = "pamoorama";
- } else if (jQuery("#map").length) {
- Type_Img = "map";
- } else if (jQuery("#Panorama").length) {
- Type_Img = "panorama";
- } else if ((jQuery("#theImage" + " iframe").length + jQuery("#theImage" + " object").length + jQuery("#theImage" + " embed").length) > 0) {
-
- if (jQuery("#theImage" + " object").length > 0) {
-
- type_src = "object";
-
- } else if (jQuery("#theImage" + " embed").length > 0) {
-
- type_src = "embed";
-
+ }
+ };
+ //_______________________ init_gen _______________________
+
+ //============= Gestion Maps ================
+ nom_map = "Autosize";
+ a_up = jQuery("map[name='" + nom_map + "'] area[rel=up]");
+ a_prev = jQuery("map[name='" + nom_map + "'] area[rel=prev]");
+ a_next = jQuery("map[name='" + nom_map + "'] area[rel=next]");
+ new_html = '';
+ jQuery("#theImage map:last").after(new_html);
+
+ }); // ready
+
Index: /extensions/Autosize/js/autosize.cookie.js
===================================================================
--- /extensions/Autosize/js/autosize.cookie.js (revision 17307)
+++ /extensions/Autosize/js/autosize.cookie.js (revision 17308)
@@ -154,10 +154,12 @@
jQuery("document").ready(function (jQuery) {
+ return;
+
// side-menu show/hide
-
-
- var sidemenu = jQuery.cookie('picture-menu');
+
+
+ var sidemenu = jQuery.cookie('picture-menu') || jQuery.cookie('side-menu');
var menubar = jQuery("#menubar");
-return;
+ // return;
if (menubar.length == 1) {
@@ -165,5 +167,5 @@
// if cookie says the menu is hiding, keep it hidden!
- if (sidemenu == 'visible') {
+ if (sidemenu == 'visible' || sidemenu == 'showing') {
showMenu(0);
} else {
Index: /extensions/Autosize/js/autosize.dimensions.js
===================================================================
--- /extensions/Autosize/js/autosize.dimensions.js (revision 17307)
+++ /extensions/Autosize/js/autosize.dimensions.js (revision 17308)
@@ -80,5 +80,5 @@
m[name]['Bottom'] = pos.top + size.height;
} else {
-
+
if (name == 'Left' || name == 'Top') {
m[name] = name == 'Left' ? pos.left : (pos.top);
@@ -102,9 +102,14 @@
infos: function (Arguments) {
- if (!Arguments) {
- Arguments = { pos_absolute: false, pos_externe: false };
-
- }
- Args = { pos_absolute: Arguments.pos_absolute || false, pos_externe: Arguments.pos_externe || false };
+ if (Arguments) {
+ if (Arguments == true) {
+ Args = { pos_absolute: true || false, pos_externe: Arguments.pos_externe || false };
+ } else {
+ Args = { pos_absolute: Arguments.pos_absolute || false, pos_externe: Arguments.pos_externe || false };
+ }
+ } else {
+ Args = { pos_absolute: false, pos_externe: false };
+ }
+
var width = 0, height = 0;
Index: /extensions/Autosize/js/conflit.js
===================================================================
--- /extensions/Autosize/js/conflit.js (revision 17307)
+++ /extensions/Autosize/js/conflit.js (revision 17308)
@@ -263,5 +263,6 @@
return new_element;
}
- //=========================================================
+ //=========================================================
+
}); // fin extend
@@ -486,11 +487,12 @@
}
//====================================
-
-librairies = new Array;
-
+function Ajout_Ajax() {
+ if (typeof $.ajax != "function")
+ $.ajax = function (args) {
+ return jQuery.ajax(args);
+ }
+}
+
function save_framework(page) {
- // theGategoryPage,theRegisterPage
- // thePicturePage
- // si admin.php page = "",theIdentificationPage
try {
Conflit = { version: cl_version, name: cl_plugin };
@@ -500,5 +502,7 @@
if (jQuery('#browser').length > 0) {
jQuery('#browser').val(browser.browser);
- }
+ }
+ Ajout_Ajax();
+
if (typeof (Parent) == "undefined")
Parent = "#theImage";
@@ -546,13 +550,4 @@
})(jQuery);
-
+
//--------------------------------------------------------------
-//=== ajout des fonctions jQuery ===
- if (typeof MooTools == "undefined" && typeof Prototype == "undefined") {
- // $ = jQuery.noConflict();
- // jQuery.extend($, jQuery);
- } else {
-
-
- /* */
- }
Index: /extensions/Autosize/main.inc.php
===================================================================
--- /extensions/Autosize/main.inc.php (revision 17307)
+++ /extensions/Autosize/main.inc.php (revision 17308)
@@ -33,13 +33,12 @@
$autosize_controler = new autosize_controler();
add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin') );
-
-add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script_1'), EVENT_HANDLER_PRIORITY_NEUTRAL+21 );
+ add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_script_1'), EVENT_HANDLER_PRIORITY_NEUTRAL );
add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), EVENT_HANDLER_PRIORITY_NEUTRAL+21 );
-add_event_handler('loc_end_page_tail',array(&$autosize_controler, 'cl_autosize_script_2'), EVENT_HANDLER_PRIORITY_NEUTRAL );
+add_event_handler('loc_end_page_tail',array(&$autosize_controler, 'cl_autosize_script_3'), EVENT_HANDLER_PRIORITY_NEUTRAL-1);
-//add_event_handler('loc_after_page_header', array(&$autosize_controler, 'autosize_calcContent'), EVENT_HANDLER_PRIORITY_NEUTRAL-1, 20 );
+
add_event_handler('render_element_content', array(&$autosize_controler, 'autosize_calcContent'),40,2);
Index: /extensions/Autosize/template/autosize.tpl
===================================================================
--- /extensions/Autosize/template/autosize.tpl (revision 17307)
+++ /extensions/Autosize/template/autosize.tpl (revision 17308)
@@ -7,4 +7,6 @@
cookies :{$cookies} ,
deriv_type :'{$deriv_type}' ,
+ liste_type:'{$liste_type}' ,
+
type_size:'{$deriv_type}' ,
DEBUG_autosize:'{$DEBUG_autosize}',
Index: /extensions/Autosize/template/conflit.tpl
===================================================================
--- /extensions/Autosize/template/conflit.tpl (revision 17307)
+++ /extensions/Autosize/template/conflit.tpl (revision 17308)
@@ -1,3 +1,4 @@
{html_head}
+
+
+
{/html_head}
Index: /extensions/Autosize/template/header.tpl
===================================================================
--- /extensions/Autosize/template/header.tpl (revision 17307)
+++ /extensions/Autosize/template/header.tpl (revision 17308)
@@ -1,9 +1,7 @@
{if not empty($pamoorama)}
-
-
-{combine_script id="conflit_script0" load="header" path = $AUTOSIZE_PATH|@cat:"js/conflit_2.js" require="jquery" }
-{combine_script id="conflit_script" path = $AUTOSIZE_PATH|@cat:"js/conflit.js" require="jquery" }
-{combine_script id="conflit_script2" load="async" path = $AUTOSIZE_PATH|@cat:"js/conflit_2.js" require="jquery" }
+{combine_script id="conflit_script" load="header" path = $AUTOSIZE_PATH|@cat:"js/conflit.js" require="jquery" }
+{combine_script id="conflit_script0" load="header" path = $AUTOSIZE_PATH|@cat:"js/conflit_2.js" require="jquery" }
{combine_script id="autosize.dimensions" path = $AUTOSIZE_PATH|@cat:"js/autosize.dimensions.js" require="jquery"}
+{combine_script id="conflit_script1" load="footer" path = $AUTOSIZE_PATH|@cat:"js/conflit_2.js" require="jquery" }
{else}
Index: /extensions/Autosize/template/picture_1.tpl
===================================================================
--- /extensions/Autosize/template/picture_1.tpl (revision 17307)
+++ /extensions/Autosize/template/picture_1.tpl (revision 17308)
@@ -1,4 +1,4 @@
{combine_script id="Affiche_script" path= $AUTOSIZE_PATH|@cat:"js/Affiche_script.js" require='jquery,autosize.dimensions' }
{if $theme != "elegant"}
-{combine_script id="autosize.cookie" path = $AUTOSIZE_PATH|@cat:"js/autosize.cookie.js" require="jquery,Affiche_script" }{/if}
+{combine_script id="autosize.cookie" path = $AUTOSIZE_PATH|@cat:"js/autosize.cookie.js" require="jquery" }{/if}
{combine_script id="autosize.dimensions" path = $AUTOSIZE_PATH|@cat:"js/autosize.dimensions.js" require="jquery"}