Changeset 7394
- Timestamp:
- Oct 26, 2010, 9:01:00 AM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/admin/template/admin.tpl
r7353 r7394 84 84 <td style="visibility:visible">{'cl_autosize_width'|@translate} 85 85 <input type="checkbox" name="check_auto_w" value="on" {$check_auto_w} /></td> 86 <td style="visibility:visible">{'cl_autosize_enabled'|@translate} 87 </td> 88 86 89 <tr> 87 90 <td>{'user_status_webmaster'|@translate}</td> 88 91 <td><input name="webmaster_height" id="Text7" type="text" value ="{$webmaster_height}" /></td> 89 <td style="visibility:{$visible_w}"><input name="webmaster_width" id="Text8" type="text" value ="{$webmaster_width}" /></td> 92 <td style="visibility:{$visible_w}"><input name="webmaster_width" id="webmaster_width" type="text" value ="{$webmaster_width}" /></td> 93 <td ><input name="webmaster_enabled" id="webmaster_enabled" type="checkbox" value ="on" {$webmaster_enabled} /></td> 90 94 </tr> 91 95 <tr> … … 93 97 <td><input name="admin_height" id="admin_height" type="text" value ="{$admin_height}" /></td> 94 98 <td style="visibility:{$visible_w}"><input name="admin_width" id="admin_width" type="text" value ="{$admin_width}" /></td> 99 <td ><input name="admin_enabled" id="admin_enabled" type="checkbox" value ="on" {$admin_enabled} /></td> 95 100 </tr> 96 101 <tr> 97 102 <td>{'user_status_generic'|@translate}</td> 98 103 <td><input name="generic_height" id="Text1" type="text" value ="{$generic_height}" /></td> 99 <td style="visibility:{$visible_w}"><input name="generic_width" id="Text2" type="text" value ="{$generic_width}" /></td> 104 <td style="visibility:{$visible_w}"><input name="generic_width" id="generic_width" type="text" value ="{$generic_width}" /></td> 105 <td ><input name="generic_enabled" id="generic_enabled" type="checkbox" value ="on" {$generic_enabled} /></td> 100 106 </tr> 101 107 <tr> 102 108 <td>{'user_status_guest'|@translate}</td> 103 109 <td><input name="guest_height" id="Text3" type="text" value ="{$guest_height}" /></td> 104 <td style="visibility:{$visible_w}"><input name="guest_width" id="Text4" type="text" value ="{$guest_width}" /></td> 110 <td style="visibility:{$visible_w}"><input name="guest_width" id="guest_width" type="text" value ="{$guest_width}" /></td> 111 <td ><input name="guest_enabled" id="guest_enabled" type="checkbox" value ="on" {$guest_enabled} /></td> 105 112 </tr> 106 113 <tr> 107 114 <td>{'user_status_normal'|@translate}</td> 108 115 <td><input name="normal_height" id="Text5" type="text" value ="{$normal_height}" /></td> 109 <td style="visibility:{$visible_w}"><input name="normal_width" id="Text6" type="text" value ="{$normal_width}" /></td> 116 <td style="visibility:{$visible_w}"><input name="normal_width" id="normal_width" type="text" value ="{$normal_width}" /></td> 117 <td ><input name="normal_enabled" id="normal_enabled" type="checkbox" value ="on" {$normal_enabled} /></td> 110 118 </tr> 111 119 -
extensions/Autosize/autosize.inc.php
r7375 r7394 195 195 function cl_autosize_Get_Options() 196 196 { 197 global $conf,$autosize_parametres; 198 199 $autosize_parametres = unserialize($conf['cl_autosize']); 200 $autosize_parametres = cl_autosize_Set_Options(); 201 return $autosize_parametres; 197 global $conf,$autosize_parametres; 198 $autosize_parametres = unserialize($conf['cl_autosize']); 199 $autosize_parametres = cl_autosize_Set_Options(); 200 return $autosize_parametres; 202 201 } 203 202 /* … … 206 205 function cl_autosize_Set_Options() 207 206 { 207 208 208 global $autosize_parametres; 209 209 //============================================================================= … … 235 235 $autosize_parametres->check_icon_v = isset($_POST['check_icon_v']) ? $_POST['check_icon_v'] : "off" ; 236 236 $autosize_parametres->check_auto_w = isset($_POST['check_auto_w']) ? $_POST['check_auto_w'] : "off" ; 237 238 $autosize_parametres->webmaster_enabled = isset($_POST['webmaster_enabled']) ? $_POST['webmaster_enabled'] : "off" ; 239 $autosize_parametres->admin_enabled = isset($_POST['admin_enabled']) ? $_POST['admin_enabled'] : "off" ; 240 $autosize_parametres->generic_enabled = isset($_POST['generic_enabled']) ? $_POST['generic_enabled'] : "off" ; 241 $autosize_parametres->guest_enabled = isset($_POST['guest_enabled']) ? $_POST['guest_enabled'] : "off" ; 242 $autosize_parametres->normal_enabled = isset($_POST['normal_enabled']) ? $_POST['normal_enabled'] : "off" ; 243 237 244 }else{ 238 245 $autosize_parametres->check_desc_v = isset($_POST['check_desc_v']) ? $_POST['check_desc_v'] : ( ( isset($autosize_parametres->check_desc_v) ) ? $autosize_parametres->check_desc_v : 'off') ; 239 246 $autosize_parametres->check_icon_v = isset($_POST['check_icon_v']) ? $_POST['check_icon_v'] : ( ( isset($autosize_parametres->check_icon_v) ) ? $autosize_parametres->check_icon_v : 'off') ; 240 247 $autosize_parametres->check_auto_w = isset($_POST['check_auto_w']) ? $_POST['check_auto_w'] : ( ( isset($autosize_parametres->check_auto_w) ) ? $autosize_parametres->check_auto_w : 'off') ; 248 249 250 $autosize_parametres->webmaster_enabled = isset($_POST['webmaster_enabled']) ? $_POST['webmaster_enabled'] : ( ( isset($autosize_parametres->webmaster_enabled) ) ? $autosize_parametres->webmaster_enabled : 'on') ; 251 $autosize_parametres->admin_enabled = isset($_POST['admin_enabled ']) ? $_POST['admin_enabled '] : ( ( isset($autosize_parametres->admin_enabled ) ) ? $autosize_parametres->admin_enabled : 'on') ; 252 $autosize_parametres->generic_enabled = isset($_POST['generic_enabled']) ? $_POST['generic_enabled'] : ( ( isset($autosize_parametres->generic_enabled) ) ? $autosize_parametres->generic_enabled : 'on') ; 253 $autosize_parametres->guest_enabled = isset($_POST['guest_enabled']) ? $_POST['guest_enabled'] : ( ( isset($autosize_parametres->guest_enabled) ) ? $autosize_parametres->guest_enabled : 'on') ; 254 $autosize_parametres->normal_enabled = isset($_POST['normal_enabled']) ? $_POST['normal_enabled'] : ( ( isset($autosize_parametres->normal_enabled) ) ? $autosize_parametres->normal_enabled : 'on') ; 255 256 241 257 } 242 243 258 244 259 return $autosize_parametres; -
extensions/Autosize/include/affiche.php
r7353 r7394 23 23 'MARGE_BASSE' => $autosize_parametres->marge_basse, 24 24 'ECHELLE_MAX' => $autosize_parametres->echelle_max, 25 25 26 'check_auto_w' => ($autosize_parametres->check_auto_w == 'on') ? 'checked="checked"' : '' , 26 27 'check_icon_v' => ($autosize_parametres->check_icon_v == 'on') ? 'checked="checked"' : '' , 27 28 'check_desc_v' => ($autosize_parametres->check_desc_v == 'on') ? 'checked="checked"' : '' , 29 28 30 'webmaster_width' => $autosize_parametres->webmaster_width, 29 31 'webmaster_height' => $autosize_parametres->webmaster_height, 32 'webmaster_enabled' => ($autosize_parametres->webmaster_enabled == 'on') ? 'checked="checked"' : '' , 33 30 34 'admin_width' => $autosize_parametres->admin_width, 31 35 'admin_height' => $autosize_parametres->admin_height, 36 'admin_enabled' => ($autosize_parametres->admin_enabled == 'on') ? 'checked="checked"' : '' , 37 32 38 'generic_width' => $autosize_parametres->generic_width, 33 39 'generic_height' => $autosize_parametres->generic_height, 40 'generic_enabled' => ($autosize_parametres->generic_enabled == 'on') ? 'checked="checked"' : '' , 41 34 42 'guest_width' => $autosize_parametres->guest_width, 35 43 'guest_height' => $autosize_parametres->guest_height, 44 'guest_enabled' => ($autosize_parametres->guest_enabled == 'on') ? 'checked="checked"' : '' , 45 36 46 'normal_width' => $autosize_parametres->normal_width, 37 47 'normal_height' => $autosize_parametres->normal_height, 48 'normal_enabled' => ($autosize_parametres->normal_enabled == 'on') ? 'checked="checked"' : '' , 49 38 50 'user_status' => get_user_status($user_status) 39 51 -
extensions/Autosize/js/Affiche_script.js
r7375 r7394 33 33 marges_llgbo = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").innerWidth(); 34 34 } 35 35 36 36 37 37 //========================================================= … … 89 89 */ 90 90 function Info_entete(Parent) { 91 92 var Info_the_page = jQuery("#the_page").info();93 var info_theHeader = jQuery("#theHeader").info();94 91 var info_imageToolBar = jQuery("#imageToolBar").info(); 92 if (info_imageToolBar.position == "absolute") { 93 jQuery("#imageToolBar").css("position", "relative"); 94 jQuery("#imageToolBar").css("top", 0 + "px"); 95 } 95 96 var info_theImage = jQuery("#theImage").info(); 96 var info_image = jQuery("#theImage img").info(); 97 /* Squelette 98 //montblanc info_theImage.top 121 99 // imageToolBar.margin top:10 padding bottom:10 100 //<body> thePicturePage 101 // <div> the_page 102 // <div> theHeader 103 // <div> imageHeaderBar 104 // <div> imageToolBar 105 // <div> theImage 106 // <img> ?? 107 // <p> 108 // <br> 109 // <p> 110 // <span class="licencetag" style="text-align: left;"> 111 // 112 // image top gallycuise :154 113 // 114 //<body> thePicturePage 115 // <div> the_page 116 // <div> theHeader 117 // <div> theHeaderAlt 118 // <div> content 119 // theImageHigh 120 // <div> imageHeaderBar 121 // <div> imageToolBar 122 // <div> theImage 123 // theImgContainer 124 // <img> ?? 125 // <p> 126 // <br> 127 // <p> 128 // <span class="licencetag" style="text-align: left;"> 129 // theTabsContainer 130 // copyright 131 */ 132 97 98 if (info_theImage.position == "relative") { 99 //--- passage absolute ==> static ===/ 100 jQuery("#theImage").css("position", "static"); 101 info_theImage = jQuery("#theImage").info(); 102 103 } 133 104 if (info_theImage.position == "absolute") { 134 var Bandeau = info_theImage.top - 135 (Info_the_page.top + 136 Get_Val_int(Info_the_page.borderwidth.top) + 137 Get_Val_int(info_theImage.borderwidth.top)); 138 139 Bandeau = info_theImage.top; 140 } else { 141 var Bandeau = info_theImage.top + 142 Get_Val_int(info_imageToolBar.margin.bottom) + 143 Get_Val_int(info_imageToolBar.margin.top) + 144 Info_the_page.top + 145 Get_Val_int(Info_the_page.borderwidth.top) + 146 Get_Val_int(info_theImage.borderwidth.top); 147 } 148 149 var Bandeau_t = Info_the_page.top + 150 Get_Val_int(Info_the_page.borderwidth.top) + 151 Get_Val_int(info_theImage.borderwidth.top); 152 153 return { marge_top: Bandeau_t, img_top: Bandeau }; 105 //--- passage absolute ==> static ===/ 106 jQuery("#theImage").css("position", "static"); 107 info_theImage = jQuery("#theImage").info(); 108 109 } 110 111 marge_top = Info_the_page.top + 112 Info_the_page.borderwidth.top + 113 info_theImage.borderwidth.top; 114 115 img_top = info_theImage.top + info_theImage.borderwidth.top ; 116 return { marge_top: marge_top, img_top: img_top }; 154 117 155 118 } … … 159 122 */ 160 123 function Info_description(Parent) { 161 162 //jQuery("#theImage br").remove(); 163 // jQuery("#theImage br").css("lineHeight", "2px"); 164 var inter_ligne = Get_Val_int(jQuery("#" + Parent + " p").css("lineHeight")); 165 var info_description = jQuery("#" + Parent + " ").info(); 166 jQuery("#" + Parent).css({ marginLeft: "auto", marginRight: "auto" }); 167 var Description = jQuery("#" + Parent + " >*"); 168 169 jQuery(Description).each( 170 171 function (i) { 172 t = jQuery(this).text(); 173 t = jQuery.trim(t); 174 pr = jQuery(this).parent().get(0).id; 175 n = this.nodeName; 176 infos = jQuery(this).info(); 177 178 if (t == "") { 179 if (this.nodeName == "IMG") { 180 info_description.top = infos.bottom - Get_Val_int(infos.margin.top) + inter_ligne; 181 info_description.bottom = infos.bottom + Get_Val_int(infos.margin.bottom); 182 } 183 else if (this.nodeName == "P" || this.nodeName == "BR") { 184 jQuery(this).remove(); 185 } else { 186 // jQuery(this).css("border", "solid 3px GREEN"); 187 info_description.top = infos.bottom - Get_Val_int(infos.margin.top); 188 info_description.bottom = infos.bottom + Get_Val_int(infos.margin.bottom); 189 } 190 } else { 191 192 jQuery(this).css("border", "solid 1px transparent"); 193 info_description.bottom = infos.bottom + Get_Val_int(infos.margin.bottom); 194 } 195 196 197 198 199 }); 124 jQuery("#" + Parent + " p").css({ padding: "0px", margin: "0px " 125 }); 126 // jQuery("#" + Parent + " p:not(:contains(' ')) ").remove(); 127 var inter_ligne = jQuery("#" + Parent + " p").css("lineHeight"); 128 129 jQuery("#" + Parent).css({ padding: "0px", 130 marginLeft: "auto", 131 marginRight: "auto", 132 marginTop: "0px", 133 marginBottom: "0px" 134 }); 135 136 var info_description = { top: 0, bottom: 0, height: 0 }; 137 //============================================================================= 138 info_img = jQuery("#" + Parent + " img").info(); 139 info_description.top = info_img.bottom; 140 //============================================================================= 141 info_gbo = jQuery("#gbo").info(); 142 if (info_description.top < info_gbo.bottom) 143 info_description.top = info_gbo.bottom; 144 //============================================================================= 145 146 info_desc = jQuery("#" + Parent + " p:last").info(); 147 info_description.bottom = info_desc.bottom; 148 200 149 info_licencetag = jQuery(".licencetag").info(); 150 151 201 152 if (info_licencetag.bottom > info_description.bottom) { 202 153 jQuery(".licencetag").css("border", "solid 2px transparent"); … … 204 155 205 156 } 157 //============================================================================= 206 158 207 159 if (info_description.top < 1) … … 209 161 210 162 211 var Info_the_page = jQuery("#the_page").info();212 var Bandeau_t = Info_entete(Parent);213 214 163 if (info_description.bottom < info_description.top) 215 164 info_description.bottom = info_description.top = 1; 216 165 217 if (theme.match(RegExp("gally", "g"))) { 218 marges_llgbo = 0; 219 } 220 221 info_description.top += Bandeau_t.marge_top - marges_llgbo; 222 // info_description.bottom 739 ; 223 // info_description.height 277 ; 224 // info_description.top 465 225 info_description.height = marges_llgbo + (info_description.bottom + Info_the_page.top) - info_description.top; 166 info_description.height = info_description.bottom - info_description.top ; 226 167 227 168 if (check_desc_v != 'checked="checked"') { … … 231 172 return info_description; 232 173 233 }234 /*235 * Get_val_int236 * params: element,valeur maxi237 * return: valeur entiere238 */239 function Get_Val_int(myObj, Maxi_val, Mini_val) {240 var val = 0;241 var reg1 = new RegExp("%", "g")242 Maxi_val = parseInt(Maxi_val || "0");243 244 /*245 - numérique suivie de px ou % ou pt ou em,246 - thin, bordure mince,247 - medium, bordure moyenne (valeur par défaut),248 - thick, bordure épaisse,249 - inherit, hérite de son parent (css2).250 */251 252 if (!myObj) {253 return Maxi_val;254 }255 if (typeof (myObj) == "string") {256 if (myObj == "none") return Maxi_val;257 if (myObj == "auto") return Maxi_val;258 if (Mini_val)259 if (myObj < Mini_val) return Maxi_val;260 switch (myObj) {261 case 'thin':262 return 1;263 break;264 case 'medium':265 return 2;266 break;267 case 'thick':268 return 4;269 break;270 case 'inherit':271 272 273 break;274 275 default:276 277 278 break;279 }280 281 282 283 284 285 if (myObj.match(reg1)) val = myObj * Maxi_val / 100;286 val = parseInt(myObj);287 288 } else289 val = parseInt(myObj);290 291 292 if (typeof (val) == "NaN") return Maxi_val;293 return val;294 174 } 295 175 … … 323 203 var img_reelle = { height: img_height, width: img_width }; 324 204 var img_finale = { height: 0, width: 0 }; 325 var zone_affichage = { height: 0, width: 0 };205 var Zone_Affichage = { height: 0, width: 0 }; 326 206 327 207 //============================================================ … … 330 210 var Zone_Affichage = jQuery("#theImage").info(); 331 211 332 var Bandeau = Info_entete("theImage").img_top; 333 334 var Bandeau_bas = Info_description("theImage"); 212 var Bandeau = 0; 213 var Bandeau_t = Info_entete("theImage") 214 Bandeau = Bandeau_t.img_top; 215 216 217 var Bandeau_bas = 0; 218 Bandeau_bas = Info_description("theImage"); 219 335 220 336 221 //=================================================================== … … 345 230 if (typeof (event) == 'undefined') return; 346 231 if (!cl_visible) return; 232 if (eval(user_status + "_enabled") == "") return; 233 var chk = eval(user_status + "_enabled"); 234 /* jQuery("#Debug").text(jQuery("#Debug").text() + user_status); 235 236 jQuery("#Debug").hide(); 237 jQuery("#Debug1").hide(); 238 jQuery("#Debug2").hide(); 239 240 jQuery("#Debug").css({ position: "absolute", width: "200px", border: "solid 1px green", top: Bandeau + "px" }); 241 jQuery("#Debug").text(Bandeau); 242 243 jQuery("#Debug1").css({ position: "absolute", 244 border: "solid 1px green", 245 top: Bandeau_bas.top + "px", 246 width: (Bandeau_bas.width / 5) + "px", 247 height: Bandeau_bas.height + "px" 248 }); 249 jQuery("#Debug1").text(Bandeau_bas.top + " height:" + Bandeau_bas.height); 250 251 jQuery("#Debug2").css({ position: "absolute", 252 left: '200px', 253 border: "solid 1px green", top: Bandeau_bas.bottom + "px" 254 }); 255 jQuery("#Debug2").text(Bandeau_bas.bottom); 256 257 */ 258 347 259 348 260 //========================================================================== … … 352 264 353 265 354 /*355 * recherche la plus grande image (hauteur ou largeur)356 */357 358 359 function Get_Img_Maxi(myobj) {360 var w00 = 0;361 var TheImg = null;362 jQuery(myobj).each(function (i) {363 w0 = img_reelle.width;364 h0 = img_reelle.height;365 if (h0 > w0) w0 = h0;366 if (w0 > w00) {367 if (!this.src.match(RegExp(".png", "g")))368 if (!this.src.match(RegExp(thumbnail, "g"))) {369 TheImg = this;370 w00 = w0;371 }372 373 }374 });375 return TheImg;376 }377 266 378 267 if (old_w != winwidth) … … 383 272 384 273 385 Cadre = jQuery("#theImage").get(0); 386 387 //=============== Information cadre ====== 388 var info_the_page = jQuery("#the_page").info(); 389 390 //============================================================================= 391 var info_HeaderBar = jQuery("#imageHeaderBar").info(); 392 var info_imageInfoBar = jQuery("#imageInfoBar").info(); 393 var info_content = jQuery("#content").info(); 394 var info_ToolBar = jQuery("#imageToolBar").info(); 395 396 var info_titrePage = jQuery("#titrePage").info(); 397 398 var info_the_page = jQuery("#the_page").info(); 399 var zone_affichage = jQuery("#theImage").info(); 400 274 var Cadre = jQuery("#theImage").get(0); 401 275 402 276 var Type_Img = ""; … … 424 298 425 299 var info_Cadre = jQuery(Cadre).info(); 426 427 428 if (info_Cadre.position != "static") { 429 /* Si LLGBO met le cadre en relative */ 430 if (theme.match(RegExp("gally", "g"))) { 431 //--- passage absolute ==> static ===/ 432 jQuery(Cadre).css("position", "static"); 433 info_Cadre = jQuery(Cadre).info(); 434 435 } 436 } 437 438 jQuery("#imageToolBar").css("position", "relative"); 439 jQuery("#imageHeaderBar").css("position", "relative"); 440 jQuery("#imageToolBar").css("top", 0 + "px"); 441 jQuery("#imageHeaderBar").css("top", "0px"); 442 w0 = Zone_Affichage.width; 443 marge = (Zone_Affichage.width - info_ToolBar.width) / 2; 300 //=============== Information cadre ====== 301 var info_the_page = jQuery("#the_page").info(); 302 303 //============================================================================= 304 var info_HeaderBar = jQuery("#imageHeaderBar").info(); 305 306 var info_content = jQuery("#content").info(); 307 308 309 var info_titrePage = jQuery("#titrePage").info(); 310 311 312 var Zone_Affichage = jQuery("#theImage").info(); 313 314 var info_ToolBar = jQuery("#imageToolBar").info(); 315 var info_imageInfoBar = jQuery("#imageInfoBar").info(); 316 var info_theHeader = jQuery("#theHeader").info(); 317 318 var marge = 0; 444 319 445 320 var marge_right = marge; 446 321 var marge_left = marge; 447 322 if (info_content.width > 100) { 448 marge_right = Get_Val_int(info_imageInfoBar.margin.left) + Get_Val_int(info_imageInfoBar.margin.right);323 marge_right = info_imageInfoBar.margin.left + info_imageInfoBar.margin.right; 449 324 winwidth = info_content.width; 450 325 marge_right = info_imageInfoBar.width + marge_right; … … 454 329 455 330 winwidth -= (marge_right + marge_left); 456 // var marge_top = info_ToolBar.top + info_ToolBar.height;457 331 458 332 //====================================================================== 459 info_theHeader = jQuery("#theHeader").info(); 460 // var marge_top =info_theHeader.bottom + info_HeaderBar.height+ info_ToolBar.height; //145 461 var marge_top = info_HeaderBar.bottom + info_ToolBar.height; //145 333 334 462 335 if (Type_Img == "pamoorama") { 463 336 var info_pamoorama = jQuery("#pamoorama").info(); … … 505 378 506 379 var TheImg = jQuery("#map").get(0); 507 info_image = jQuery("#map").info(); 508 509 510 pos_page = jQuery("#the_page").info(); 380 img_reelle.height = info_image.height; 381 img_reelle.width = winwidth - marge_right - marge_right; 382 Bandeau_bas.height = 10; 383 marge_right = 10; 384 385 info_the_page = jQuery("#the_page").info(); 511 386 ; 512 387 … … 526 401 }); 527 402 528 pos_image = jQuery(TheImg).info();529 pos_page = jQuery("#the_page").info();403 info_theImage = jQuery(TheImg).info(); 404 info_the_page = jQuery("#the_page").info(); 530 405 531 406 break … … 533 408 534 409 if (!TheImg) return; 535 pos_image = jQuery(TheImg).info();536 pos_page = jQuery("#the_page").info();410 info_theImage = jQuery(TheImg).info(); 411 info_the_page = jQuery("#the_page").info(); 537 412 538 413 … … 540 415 case "img_autre": 541 416 if (!TheImg) return; 542 pos_image = jQuery(TheImg).position();543 pos_page = jQuery("#the_page").position();417 info_theImage = jQuery(TheImg).info(); 418 info_the_page = jQuery("#the_page").info(); 544 419 545 420 … … 550 425 TheImg = jQuery(Cadre).find("embed"); 551 426 552 pos_image = jQuery(Cadre).position();553 pos_page = jQuery("#the_page").position();427 info_theImage = jQuery(Cadre).info(); 428 info_the_page = jQuery("#the_page").info(); 554 429 if (rapport < 0) { 555 430 img_height = parseInt(jQuery(TheImg).outerHeight()); … … 565 440 566 441 TheImg = jQuery('#charlie object').get(0); 567 pos_image = jQuery(Cadre).position();568 pos_page = jQuery("#the_page").position();442 info_theImage = jQuery(Cadre).info(); 443 info_the_page = jQuery("#the_page").info(); 569 444 if (rapport < 0) { 570 445 img_height = parseInt(TheImg.height); … … 581 456 var Image = jQuery("#pamoorama").find("img"); 582 457 583 pos_image = jQuery("#pamoorama").info();584 pos_page = jQuery("#the_page").info();458 info_theImage = jQuery("#pamoorama").info(); 459 info_the_page = jQuery("#the_page").info(); 585 460 break 586 461 … … 589 464 590 465 //=============== Vérification taille minimale autorizée ====================== 591 var miniWidth = Get_Val_int(jQuery(TheImg).css("min-width"), mini_width);592 miniHeight = Get_Val_int(jQuery(TheImg).css("min-height"), mini_height);593 594 595 var maxWidth = Get_Val_int(jQuery(TheImg).css("max-width"), winwidth, "0");596 maxHeight = Get_Val_int(jQuery(TheImg).css("max-height"), winheight, "0");466 var miniWidth = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-width"), mini_width); 467 miniHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("min-height"), mini_height); 468 469 470 var maxWidth = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("max-width"), winwidth, "0"); 471 maxHeight = jQuery(TheImg).Get_Val_int(jQuery(TheImg).css("max-height"), winheight, "0"); 597 472 598 473 mini_width = parseInt(miniWidth); … … 624 499 //=============== Zone d'affichage ============================ 625 500 626 borderW = Get_Val_int(zone_affichage.borderwidth.left, 2); 627 borderW += Get_Val_int(zone_affichage.borderwidth.right, 2); 628 629 630 zone_affichage.width = winwidth - borderW; 631 zone_affichage.height = winheight - marge_top; 501 borderW = Zone_Affichage.borderwidth.left; 502 borderW += Zone_Affichage.borderwidth.right; 503 504 505 Zone_Affichage.width = winwidth - borderW; 632 506 633 507 //================================================================================== … … 661 535 //============ Padding image ? =============== 662 536 663 img_padding_top = Get_Val_int(info_img.padding.top);664 img_padding_top += Get_Val_int(info_img.padding.bottom);665 img_padding_top += Get_Val_int(info_img.borderwidth.top);666 img_padding_top += Get_Val_int(info_img.borderwidth.bottom);667 668 margin_top = Get_Val_int(info_Cadre.margin.top);669 padding_top = Get_Val_int(info_Cadre.padding.top);670 padding_top += Get_Val_int(info_Cadre.padding.bottom);537 img_padding_top = (info_img.padding.top); 538 img_padding_top += (info_img.padding.bottom); 539 img_padding_top += (info_img.borderwidth.top); 540 img_padding_top += (info_img.borderwidth.bottom); 541 542 margin_top = (info_Cadre.margin.top); 543 padding_top = (info_Cadre.padding.top); 544 padding_top += (info_Cadre.padding.bottom); 671 545 672 546 Marge_Basse = parseInt(marge_basse || 0); // hors bandeau 673 547 //========================================================================== 674 548 h = 0; 675 zone_affichage.height = winheight - Bandeau - Marge_Basse - h - margin_top - padding_top;676 var Image_height = zone_affichage.height - Bandeau_bas.height - img_padding_top;677 var Delta = zone_affichage.height - Image_height; 678 549 Zone_Affichage.height = winheight - Bandeau - Marge_Basse; 550 var Image_height = Zone_Affichage.height - Bandeau_bas.height; 551 552 // jQuery("#Debug1").css("top", Image_height + "px"); 679 553 //============================================================= 680 554 var height_user = eval(user_status + "_height"); … … 696 570 Image_width = parseInt(Image_height * rapport); 697 571 else if (Type_Img == "map") { 698 Image_width = zone_affichage.width - marge_left - marge_right;572 Image_width = Zone_Affichage.width - marge_left - marge_right; 699 573 } else { 700 Image_width = zone_affichage.width;574 Image_width = Zone_Affichage.width; 701 575 } 702 576 … … 717 591 else 718 592 widthmin = parseInt(width_user); 719 var marges = 0; 720 widthmin -= Get_Val_int(info_img.borderwidth.left); 721 widthmin -= Get_Val_int(info_img.borderwidth.right); 722 if (jQuery("#gbo") && jQuery("#gbo div:first").length > 0) { 723 llgboframe = jQuery("#gbo div:first"); 724 marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").innerWidth(); 725 } 726 widthmin -= 2 * marges; 593 var marges = marges_llgbo; 594 widthmin -= info_img.borderwidth.left; 595 widthmin -= info_img.borderwidth.right; 596 597 widthmin -= marges; 727 598 if (Image_width > widthmin) { 728 599 // Image_width largeur à atteindre … … 745 616 zoom = echelle; 746 617 //=============LLGBO2 =========================== 747 marges = 0; 618 748 619 t1 = { top: 0 }; 749 if (jQuery("#gbo") && jQuery("#gbo div:first").length > 0) { 750 llgboframe = jQuery("#gbo div:first"); 751 marges = jQuery(llgboframe).outerWidth() - jQuery("#gbo div:last").innerWidth(); 752 753 m1 = jQuery(llgboframe).outerHeight(); 754 t1 = jQuery(llgboframe).position(); 620 if (marges_llgbo > 0) { 621 622 t1 = jQuery(llgboframe).info(); 755 623 756 624 757 625 if (TheImg.src) { 758 marge_top = t1.top - img_top; 759 Image_height -= marge_top; 760 Image_width = Image_height * rapport; 626 627 761 628 if ((winwidth) < Image_width) { 762 629 _width = maxWidth; 763 630 } else { 764 _width = Image_width - (marges / 2);631 _width = Image_width; 765 632 } 766 633 _width -= marges_llgbo; // réduction frame 767 634 jQuery("#gbo").outerWidth(_width); 768 635 jQuery("#gbo").css("width", (_width) + "px"); 769 jQuery("#gbo").css("height", (Image_height) + "px"); 770 jQuery("#gbo").outerHeight(Image_height); 636 637 638 771 639 Image_width = jQuery("#gbo div:last").innerWidth(); 772 640 Image_height = parseInt(Image_width / rapport); 641 jQuery("#gbo").outerHeight(Image_height + marges_llgbo + 10); 642 jQuery("#gbo").css("height", (Image_height + marges_llgbo + 10) + "px"); 773 643 774 644 } else { 775 645 776 jQuery("#gbo").width( zone_affichage.width - marges);646 jQuery("#gbo").width(Zone_Affichage.width - marges); 777 647 jQuery("#gbo").height(Image_height + marges) 778 jQuery("#gbo").css("width", zone_affichage.width - marges + "px");648 jQuery("#gbo").css("width", Zone_Affichage.width - marges + "px"); 779 649 jQuery("#gbo").css("height", Image_height - marges + "px") 780 650 … … 816 686 // Image_height, Image_width = valeur a atteindre. 817 687 if (theme.match(RegExp("luciano", "g"))) { 818 zone_affichage.height -= Bandeau_bas;819 } 820 821 822 jQuery(Cadre).width( zone_affichage.width);688 Zone_Affichage.height -= Bandeau_bas; 689 } 690 691 692 jQuery(Cadre).width(Zone_Affichage.width); 823 693 //============================================================== 824 694 … … 829 699 if (typeof (gmaps) != "undefined") { 830 700 Gmap_ = gmaps.maps[0]; 831 if (Gmap_.sizeMode == 'A') ;701 if (Gmap_.sizeMode == 'A') 832 702 { 833 703 jQuery("#iGMapsIcon").css({ width: old_w * 0.8 + "px", height: old_h * 0.8 + "px" }); … … 837 707 //============================================================== 838 708 if (Type_Img == "charlie") { 839 t1 = jQuery("#charlie"). position();709 t1 = jQuery("#charlie").info(); 840 710 /**/ 841 711 pdf = 2 * parseInt(jQuery(".none_2").css("paddingRight")); … … 872 742 873 743 marge_left += 0; 874 new_width = zone_affichage.width - marge_right - marge_left;744 new_width = Zone_Affichage.width - marge_right - marge_left; 875 745 jQuery("#pamoorama").css({ margin: 0 + "px", 876 746 left: marge_left + "px", … … 890 760 891 761 892 jQuery("#pamoorama_footer").width(( zone_affichage.width - marge_right - marge_left));893 jQuery("#pamoorama_footer").css('width', ( zone_affichage.width - marge_right - marge_left) + "px");762 jQuery("#pamoorama_footer").width((Zone_Affichage.width - marge_right - marge_left)); 763 jQuery("#pamoorama_footer").css('width', (Zone_Affichage.width - marge_right - marge_left) + "px"); 894 764 zoom = Image_height / img_height; 895 765 info_pamoorama_outter = jQuery("#pamoorama_outter").info(); … … 933 803 } 934 804 // 935 if (!pos) pos = jQuery("#copyright"). position();936 if (pos != jQuery("#copyright"). position())937 pos = jQuery("#copyright"). position();805 if (!pos) pos = jQuery("#copyright").info(); 806 if (pos != jQuery("#copyright").info()) 807 pos = jQuery("#copyright").info(); 938 808 if (pos.top > 100) jQuery("#the_page").height(pos.top); 939 809 … … 945 815 //=================================================================== 946 816 jQuery(window).resize(); 817 /* 818 * recherche la plus grande image (hauteur ou largeur) 819 */ 820 821 822 function Get_Img_Maxi(myobj) { 823 var w00 = 0; 824 var TheImg = null; 825 jQuery(myobj).each(function (i) { 826 w0 = img_reelle.width; 827 h0 = img_reelle.height; 828 if (h0 > w0) w0 = h0; 829 if (w0 > w00) { 830 if (!this.src.match(RegExp(".png", "g"))) 831 if (!this.src.match(RegExp(thumbnail, "g"))) { 832 TheImg = this; 833 w00 = w0; 834 } 835 836 } 837 }); 838 return TheImg; 839 } 947 840 948 841 949 842 } // function 950 ); // ready843 ); // ready 951 844 /* 952 845 * -
extensions/Autosize/js/conflit.js
r7316 r7394 2 2 var d1 = 0; 3 3 var init_tb = 0; 4 4 function addEvent2(obj, type, fn) { 5 if (obj.addEventListener) { 6 obj.addEventListener(type, fn, false); 7 EC.add(obj, type, fn); 8 } 9 else if (obj.attachEvent) { 10 obj["e" + type + fn] = fn; 11 obj[type + fn] = function () { 12 obj["e" + type + fn](window.event); 13 } 14 obj.attachEvent("on" + type, obj[type + fn]); 15 EC.add(obj, type, fn); 16 } 17 else { 18 obj["on" + type] = obj["e" + type + fn]; 19 } 20 } 5 21 function $(element, nc) { 6 22 //============== détection framework ================== -
extensions/Autosize/js/jquery.dimensions.js
r7353 r7394 105 105 106 106 107 borderwidth.left = jQuery(elem). css("borderLeftWidth");108 borderwidth.right = jQuery(elem). css("borderRightWidth");109 borderwidth.top = jQuery(elem). css("borderTopWidth");110 borderwidth.bottom = jQuery(elem). css("borderBottomWidth");107 borderwidth.left = jQuery(elem).Get_Val_int(jQuery(elem).css("borderLeftWidth")); 108 borderwidth.right = jQuery(elem).Get_Val_int(jQuery(elem).css("borderRightWidth")); 109 borderwidth.top = jQuery(elem).Get_Val_int(jQuery(elem).css("borderTopWidth")); 110 borderwidth.bottom = jQuery(elem).Get_Val_int(jQuery(elem).css("borderBottomWidth")); 111 111 try { 112 borderwidth.width = jQuery(elem). css("borderWidth");112 borderwidth.width = jQuery(elem).Get_Val_int(jQuery(elem).css("borderWidth")); 113 113 } catch (e) { 114 114 borderwidth.width = '"' + borderwidth.left + ' ' + borderwidth.top + ' ' + borderwidth.right + ' ' + borderwidth.bottom + '"'; … … 116 116 117 117 118 margin.left = jQuery(elem). css("marginLeft");119 margin.right = jQuery(elem). css("marginRight");120 margin.top = jQuery(elem). css("marginTop");121 margin.bottom = jQuery(elem). css("marginBottom");118 margin.left = jQuery(elem).Get_Val_int(jQuery(elem).css("marginLeft")); 119 margin.right = jQuery(elem).Get_Val_int(jQuery(elem).css("marginRight")); 120 margin.top = jQuery(elem).Get_Val_int(jQuery(elem).css("marginTop")); 121 margin.bottom = jQuery(elem).Get_Val_int(jQuery(elem).css("marginBottom")); 122 122 try { 123 margin.margin = jQuery(elem). css("margin");123 margin.margin = jQuery(elem).Get_Val_int(jQuery(elem).css("margin")); 124 124 } catch (e) { 125 125 margin.margin = '"' + margin.left + ' ' + margin.top + ' ' + margin.right + ' ' + margin.bottom + '"'; 126 126 } 127 127 128 padding.left = jQuery(elem). css("paddingLeft");129 padding.right = jQuery(elem). css("paddingRight");130 padding.top = jQuery(elem). css("paddingTop");131 padding.bottom = jQuery(elem). css("paddingBottom");132 try { padding.padding = jQuery(elem). css("padding"); } catch (e) {128 padding.left = jQuery(elem).Get_Val_int(jQuery(elem).css("paddingLeft")); 129 padding.right = jQuery(elem).Get_Val_int(jQuery(elem).css("paddingRight")); 130 padding.top = jQuery(elem).Get_Val_int(jQuery(elem).css("paddingTop")); 131 padding.bottom = jQuery(elem).Get_Val_int(jQuery(elem).css("paddingBottom")); 132 try { padding.padding = jQuery(elem).Get_Val_int(jQuery(elem).css("padding")); } catch (e) { 133 133 padding.padding = '"' + padding.left + ' ' + padding.top + ' ' + padding.right + ' ' + padding.bottom + '"'; 134 134 } … … 190 190 offsetParent = offsetParent.offsetParent; 191 191 return jQuery(offsetParent); 192 }, 193 /* 194 * Get_val_int 195 * params: element,valeur maxi 196 * return: valeur entiere 197 */ 198 199 Get_Val_int: function(myObj, Maxi_val, Mini_val) { 200 var val = 0; 201 var reg1 = new RegExp("%", "g") 202 Maxi_val = parseInt(Maxi_val || "0"); 203 204 /* 205 - numérique suivie de px ou % ou pt ou em, 206 - thin, bordure mince, 207 - medium, bordure moyenne (valeur par défaut), 208 - thick, bordure épaisse, 209 - inherit, hérite de son parent (css2). 210 */ 211 212 if (!myObj) { 213 return Maxi_val; 192 214 } 215 if (typeof (myObj) == "string") { 216 if (myObj == "none") return Maxi_val; 217 if (myObj == "auto") return Maxi_val; 218 if (Mini_val) 219 if (myObj < Mini_val) return Maxi_val; 220 switch (myObj) { 221 case 'thin': 222 return 1; 223 break; 224 case 'medium': 225 return 2; 226 break; 227 case 'thick': 228 return 4; 229 break; 230 case 'inherit': 231 232 233 break; 234 235 default: 236 237 238 break; 239 } 240 241 242 243 244 245 if (myObj.match(reg1)) val = myObj * Maxi_val / 100; 246 val = parseInt(myObj); 247 248 } else 249 val = parseInt(myObj); 250 251 252 if (typeof (val) == "NaN") return Maxi_val; 253 return val; 254 } 193 255 }); 194 256 /* … … 198 260 return parseInt(jQuery.curCSS(el.jquery ? el[0] : el, prop, true)) || 0; 199 261 }; 262 263 264 200 265 })(jQuery); -
extensions/Autosize/language/en_UK/lang.php
r7316 r7394 1 1 <?php 2 2 global $lang; 3 $lang['cl_autosize_enabled'] = "Enabled"; 3 4 $lang['cl_autosize_desc_view'] = "Inclure la description et la licence dans le calcul"; 4 5 $lang['cl_autosize_icon_view'] = "Show an icon in the toolbar"; -
extensions/Autosize/language/fr_FR/lang.php
r7316 r7394 1 1 <?php 2 2 global $lang; 3 $lang['cl_autosize_enabled'] = "Actif"; 3 4 $lang['cl_autosize_desc_view'] = "Inclure la description et la licence dans le calcul"; 4 5 $lang['cl_autosize_icon_view'] = "Affiche une icône dans la barre d'outils"; -
extensions/Autosize/main.inc.php
r7375 r7394 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.2. 64 Version: 1.2.7 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 add_event_handler('loc_after_page_header', array(&$autosize_controler, 'cl_autosize_affiche'), 45 ); 18 //---- avant pamooramics --- 19 //add_event_handler('render_element_content', array(&$autosize_controler, 'cl_autosize_aff_infos_plus'),40,2); 20 18 21 add_event_handler('get_admin_plugin_menu_links', array(&$autosize_controler,'cl_autosize_admin') ); 19 add_event_handler('load_profile_in_template', array(&$autosize_controler,'cl_autosize_script'), 50 );22 add_event_handler('load_profile_in_template', array(&$autosize_controler,'cl_autosize_script'),40 ); 20 23 21 24 ?> -
extensions/Autosize/template/autosize.tpl
r7353 r7394 23 23 24 24 var webmaster_width='{$webmaster_width }'; 25 var webmaster_height='{ $webmaster_height }'; 25 var webmaster_height = '{ $webmaster_height }'; 26 var webmaster_enabled = '{ $webmaster_enabled }'; 27 26 28 var admin_width='{ $admin_width }'; 27 var admin_height='{ $admin_height }'; 29 var admin_height = '{ $admin_height }'; 30 var admin_enabled = '{ $admin_enabled }'; 31 28 32 var generic_width='{ $generic_width }'; 29 var generic_height='{ $generic_height }'; 33 var generic_height = '{ $generic_height }'; 34 var generic_enabled = '{ $generic_enabled }'; 35 30 36 var guest_width='{ $guest_width }'; 31 var guest_height='{$guest_height}'; 37 var guest_height = '{$guest_height}'; 38 var guest_enabled = '{ $guest_enabled }'; 39 32 40 var normal_width='{$normal_width}'; 33 var normal_height='{$normal_height}'; 41 var normal_height = '{$normal_height}'; 42 var normal_enabled = '{ $normal_enabled }'; 43 34 44 var user_status='{$user_status}'; 35 45 … … 47 57 {html_head} 48 58 {/html_head} 59 <div id="Debug" align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div> 60 <div id="Debug1" align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div> 61 <div id="Debug2" align=center style="color:black;z-index:2000;position:absolute; background-color:Beige; top:0px;left:0px;width:800px;margin:auto;"></div>
Note: See TracChangeset
for help on using the changeset viewer.