Changeset 6953
- Timestamp:
- Sep 17, 2010, 10:23:58 AM (14 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/js/Affiche_script.js
r6936 r6953 13 13 Type_Img = "embed"; 14 14 } else if (jQuery("#pamoorama").length) { 15 15 16 16 Type_Img = "pamoorama"; 17 17 } else if (jQuery("#theImage").find("img").length > 0) { … … 42 42 var Image = jQuery(Images).get(0); 43 43 44 if (!Image) return;45 var TheImg = jQuery(Image);44 var TheImg = jQuery("#pamoorama").get(0); 45 if (!TheImg) return; 46 46 break 47 47 } … … 121 121 jQuery("#theImage").width("100%"); 122 122 jQuery("#theImage").height("auto"); 123 jQuery(TheImg).height(Image_height + "px");124 jQuery(TheImg).width(Imgage_Width + "px");125 123 126 if (Type_Img = "pamoorama") {127 124 128 return;129 jQuery("#pamoorama_inner").css("zoom", "1");130 jQuery("#pamoorama_inner").css("height", Image_height + "px");131 jQuery("#pamoorama_inner").css("width", Imgage_Width + "px");132 125 133 jQuery("#pamoorama_outter").css("zoom", "1"); 126 if (Type_Img == "pamoorama") { 127 h1 = jQuery("#pamoorama").height(); 128 jQuery("#pamoorama").css("overflow", "hidden"); 129 jQuery("#pamoorama").css(jQuery(window).width() + "px"); 130 134 131 jQuery("#pamoorama_outter").css("height", Image_height + "px"); 135 jQuery("#pamoorama_outter").css("width", Imgage_Width + "px"); 132 jQuery("#pamoorama_outter").css("width", jQuery(window).width() + "px"); 133 /* 134 jQuery(TheImg).css(Image_height + "px"); 135 jQuery(TheImg).css(jQuery(window).width() + "px"); 136 */ 137 zoom = Image_height / img_height; 138 139 jQuery("#pamoorama_inner").css("zoom", zoom); 140 136 141 137 142 138 143 } else { 139 144 jQuery(TheImg).height(Image_height + "px"); 145 jQuery(TheImg).width(Imgage_Width + "px"); 140 146 141 147 } -
extensions/Autosize/main.inc.php
r6936 r6953 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.0. 44 Version: 1.0.5 5 5 Description: Ajuste l'affichage des photos en fonction de la hauteur de la fenetre de navigation 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=448 … … 16 16 ); 17 17 18 19 //add_event_handler('render_element_content', 'cl_autosize_affiche',EVENT_HANDLER_PRIORITY_NEUTRAL+1); 20 //add_event_handler('loc_end_picture', 'cl_autosize_affiche',EVENT_HANDLER_PRIORITY_NEUTRAL); 21 //add_event_handler('loc_begin_picture', 'cl_autosize_affiche',EVENT_HANDLER_PRIORITY_NEUTRAL); 22 add_event_handler('loc_end_picture', 'cl_autosize_affiche',EVENT_HANDLER_PRIORITY_NEUTRAL); 23 18 add_event_handler('loc_end_picture', 'cl_autosize_affiche',EVENT_HANDLER_PRIORITY_NEUTRAL+10); 24 19 function cl_autosize_affiche() 25 20 { 26 global $user, $picture, $template; 27 global $content, $element_info; 28 $my_path = dirname(__FILE__).'/'; 29 30 21 global $user, $picture, $template,$page; 22 global $content, $element_info; 31 23 global $infos_message,$erreur_message; 32 24 global $conf,$lang ; 25 if ( $page['body_id']=='thePicturePage' ) { 26 if ( isset($picture['current'])){ 27 $my_path = dirname(__FILE__).'/'; 33 28 $autosize_parametres = cl_autosize_Get_Options(); 34 include (AUTOSIZE_PATH."include/affiche.php");29 include (AUTOSIZE_PATH."include/affiche.php"); 35 30 36 $template->set_filenames(37 array('default_content'=> $my_path.'template/picture.tpl')31 $template->set_filenames( 32 array('autosize_content'=> $my_path.'template/autosize.tpl') 38 33 ); 39 return $template->parse( 'default_content', true); 34 35 return $template->parse( 'autosize_content', false); 36 } 37 } 40 38 } 41 39 … … 50 48 return $menu; 51 49 } 52 53 54 50 //=================================================================== 55 51 function cl_autosize_aff_infos_plus() 56 52 {
Note: See TracChangeset
for help on using the changeset viewer.