Changeset 7375
- Timestamp:
- Oct 24, 2010, 2:57:11 PM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r7354 r7375 114 114 * conflit ============================================= 115 115 */ 116 static public function cl_autosize_script($pictures) 117 { $my_path = dirname(__FILE__).'/'; 118 global $template,$user,$conf ; 116 static public function cl_autosize_script() 117 { 118 global $template,$user,$conf ; 119 120 121 $my_path = dirname(__FILE__).'/'; 119 122 $template->set_filenames( 120 123 array('autosize_cl_init'=> $my_path.'template/cl_conflit.tpl') … … 128 131 ); 129 132 130 $template->parse( 'autosize_cl_init', false); 131 132 return $pictures; 133 return $template->parse( 'autosize_cl_init', false); 134 133 135 134 136 }// function cl_autosize_script -
extensions/Autosize/js/Affiche_script.js
r7369 r7375 27 27 var old_w = 0; 28 28 29 var llgboframe = jQuery("#gbo div:first"); 30 var marges_llgbo = 0; 31 if (llgboframe.length > 0) { 32 33 marges_llgbo = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").innerWidth(); 34 } 35 29 36 30 37 //========================================================= … … 208 215 info_description.bottom = info_description.top = 1; 209 216 210 var llgboframe = jQuery("#gbo div:first");211 var marges_llgbo = 0;212 if (llgboframe.length > 0) {213 214 marges_llgbo = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").innerWidth();215 }216 217 if (theme.match(RegExp("gally", "g"))) { 217 marges_llgbo = 0;218 marges_llgbo = 0; 218 219 } 219 220 … … 716 717 else 717 718 widthmin = parseInt(width_user); 718 719 var marges = 0; 719 720 widthmin -= Get_Val_int(info_img.borderwidth.left); 720 721 widthmin -= Get_Val_int(info_img.borderwidth.right); 721 722 if (jQuery("#gbo") && jQuery("#gbo div:first").length > 0) { 722 723 llgboframe = jQuery("#gbo div:first"); 723 marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last"). outerWidth();724 marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").innerWidth(); 724 725 } 725 widthmin -= 2*marges;726 widthmin -= 2 * marges; 726 727 if (Image_width > widthmin) { 727 728 // Image_width largeur à atteindre … … 761 762 _width = maxWidth; 762 763 } else { 763 _width = Image_width - (marges /2);764 _width = Image_width - (marges / 2); 764 765 } 765 766 766 767 768 769 770 771 767 jQuery("#gbo").outerWidth(_width); 768 jQuery("#gbo").css("width", (_width) + "px"); 769 jQuery("#gbo").css("height", (Image_height) + "px"); 770 jQuery("#gbo").outerHeight(Image_height); 771 Image_width = jQuery("#gbo div:last").innerWidth(); 772 Image_height = parseInt(Image_width / rapport); 772 773 773 774 } else { … … 818 819 } 819 820 820 821 821 822 jQuery(Cadre).width(zone_affichage.width); 822 823 //============================================================== … … 947 948 948 949 } // function 949 ); // ready950 ); // ready 950 951 /* 951 952 * -
extensions/Autosize/main.inc.php
r7355 r7375 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.2. 54 Version: 1.2.6 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 … … 15 15 $autosize_controler = new autosize_controler(); 16 16 17 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 95 ); 17 18 add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin') ); 18 19 //add_event_handler('loc_begin_page_header', array(&$autosize_controler,'cl_autosize_script'),20 ); 20 //add_event_handler('loc_begin_picture', array(&$autosize_controler,'cl_autosize_script'),20 ); 21 add_event_handler('loc_begin_page_tail', array(&$autosize_controler,'cl_autosize_script'),100 ); 22 23 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 95 ); 24 //add_event_handler('amd_jpegMD_loaded', array(&$autosize_controler, 'cl_autosize_affiche'),45); 25 //add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 100 ); 19 add_event_handler('load_profile_in_template', array(&$autosize_controler,'cl_autosize_script'),50 ); 26 20 27 21 ?>
Note: See TracChangeset
for help on using the changeset viewer.