Changeset 6983
- Timestamp:
- Sep 21, 2010, 10:20:42 AM (14 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/admin/template/admin.tpl
r6978 r6983 1 1 {html_head} 2 <script type="text/javascript"> 3 var img_width={$IMG_WIDTH } 4 var img_height={ $IMG_HEIGHT } 5 var marge_basse={ $MARGE_BASSE } 6 var echelle_max={ $ECHELLE_MAX } 7 var mini_width={ $MINI_WIDTH } 8 var mini_height={ $MINI_HEIGHT } 9 var webmaster_width={$webmaster_width } 10 var webmaster_height={ $webmaster_height } 11 var admin_width={ $admin_width } 12 var admin_height={ $admin_height } 13 var generic_width={ $generic_width } 14 var generic_height={ $generic_height } 15 var guest_width={ $guest_width } 16 var guest_height={ $guest_height } 17 var normal_width={ $normal_width } 18 var normal_height={ $normal_height } 19 var user_status={ $user_status } 2 <script type="text/javascript"> 3 var theme = '{$theme}'; 4 var img_width = '{$IMG_WIDTH }'; 5 var img_height = '{ $IMG_HEIGHT }'; 6 var marge_basse = '{ $MARGE_BASSE }'; 7 var echelle_max = '{ $ECHELLE_MAX }'; 8 var mini_width = '{ $MINI_WIDTH }'; 9 var mini_height = '{ $MINI_HEIGHT }'; 20 10 11 var webmaster_width = '{$webmaster_width }'; 12 var webmaster_height = '{ $webmaster_height }'; 13 var admin_width = '{ $admin_width }'; 14 var admin_height = '{ $admin_height }'; 15 var generic_width = '{ $generic_width }'; 16 var generic_height = '{ $generic_height }'; 17 var guest_width = '{ $guest_width }'; 18 var guest_height = '{$guest_height}'; 19 var normal_width = '{$normal_width}'; 20 var normal_height = '{$normal_height}'; 21 var user_status = '{$user_status}'; 22 var user_status = '{$user_status}'; 23 var check_auto_w = '{$check_auto_w}'; 21 24 </script> 22 25 {known_script id="jquery" src="themes/default/js/jquery.packed.js"} -
extensions/Autosize/js/Affiche_script.js
r6978 r6983 1 jQuery.noConflict(); 1 2 if (!theme.match(RegExp("gally", "g"))) 3 jQuery.noConflict(); 4 5 2 6 jQuery(document).ready( 3 4 5 7 function (jQuery) { 6 8 function Marge_haute(myObj, ajoute_h) { … … 30 32 if (Image.length > 0) { 31 33 Type_Img = "embed"; 34 } else if (jQuery("#map").length) { 35 36 Type_Img = "map"; 37 38 32 39 } else if (jQuery("#pamoorama").length) { 33 40 … … 44 51 //================================================================= 45 52 switch (Type_Img) { 53 case "map": 54 var Image = jQuery("#map"); 55 var TheImg = jQuery("#map").get(0); 56 position = jQuery("#map").position(); 57 58 img_height = jQuery(window).height() - position.top; 59 img_width = jQuery(window).width() - position.left; 60 break 46 61 case "img": 47 62 var Image = jQuery("#theImage").find("img"); … … 78 93 if (!sel0) return; 79 94 type_pos = jQuery(TheImg).css("position"); //static 80 if (jQuery(TheImg).css("position") == "relative") { 95 if (sel0.top == 0) { 96 sel0.top = 0; 81 97 sel0.top += Marge_haute("#theHeader", true); 82 98 sel0.top += Marge_haute("#imageHeaderBar", true); … … 97 113 H0 = parseInt(img_height); 98 114 if (H0 < parseInt(mini_height)) return; 99 100 var rapport = (W0 / H0); 115 if (Type_Img != "map") 116 var rapport = (W0 / H0); 117 else 118 var rapport = -1; 119 101 120 //========================================================================== 102 121 var Licence = jQuery("#theImage").find(".licencetag"); … … 149 168 } 150 169 151 var Image_Width = parseInt(Image_height * rapport); 152 170 if (rapport > 0) 171 var Image_Width = parseInt(Image_height * rapport); 172 else 173 var Image_Width = parseInt(W0); 153 174 //=============================================================== 154 175 twidth = jQuery("#imageHeaderBar").width(); … … 158 179 var winwidth = jQuery(window).width(); 159 180 var width_user = eval(user_status + "_width"); 160 181 align_auto = "center"; 161 182 if (check_auto_w == 'checked="checked"') { 162 183 if (Type_Img != "pamoorama") { … … 176 197 } 177 198 Image_Width = parseInt(W0 * echelle_w); 178 199 179 200 align_auto = "left"; 180 201 } else { 181 202 182 203 align_auto = "center"; 183 204 } … … 218 239 if (jQuery("#theImg").css("textAlign")) 219 240 jQuery("#theImg").css("textAlign", align_auto); 220 241 221 242 jQuery(TheImg).height(Image_height + "px"); 222 243 jQuery(TheImg).width(Image_Width + "px"); … … 239 260 240 261 jQuery(window).resize(); 241 262 263 242 264 }); 243 265 -
extensions/Autosize/main.inc.php
r6978 r6983 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.0.7 4 Version: 1.0.7192 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 -
extensions/Autosize/template/autosize.tpl
r6978 r6983 5 5 {*jQuery is always available by default*} 6 6 <script type="text/javascript"> 7 //test 7 var theme = '{$theme}'; 8 8 var img_width='{$IMG_WIDTH }'; 9 9 var img_height='{ $IMG_HEIGHT }';
Note: See TracChangeset
for help on using the changeset viewer.