Changeset 7820
- Timestamp:
- Nov 19, 2010, 2:31:09 PM (13 years ago)
- Location:
- extensions/Autosize
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Autosize/autosize.inc.php
r7817 r7820 145 145 if ( !empty($content) ) { return $content; } 146 146 if ($ThePicture['is_picture'] <> 1 ) { return $content; ; } 147 $tpls=' {known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js" now=1}'; 148 $autosizejs = '<script type="text/javascript" charset="utf-8" src="' .$ROOT_URL;147 148 $autosizejs = '<script type="text/javascript" charset="utf-8" src="'; 149 149 $autocss = $autosizejs.'themes/default/js/jquery.packed.js"></script>'."\n"; 150 150 $template->append('head_elements',$autocss); 151 151 152 $autocss="<script type='text/javascript'>153 jQuery('#theImage').css({opacity:'0. 1'});152 $autocss="<script type='text/javascript'> 153 jQuery('#theImage').css({opacity:'0.0'}); 154 154 </script>"; 155 155 … … 186 186 global $template,$user,$conf,$picture ,$page; 187 187 //userDefManage ?? 188 189 188 $my_path = basename(dirname(__FILE__)).'/' ; 189 $my_path = dirname(__FILE__).'/'; 190 190 $debug = isset($conf['debug']) ? $conf['debug'] : false ; 191 191 $cl_conflit = isset($conf['cl_conflit']) ? $conf['cl_conflit'] : 'true' ; 192 193 194 195 196 197 198 199 192 $theme=$user['theme']; 193 $template->assign( 194 array('ma_page' => $page['body_id'], 195 'cl_conflit' => $cl_conflit , 196 'theme' => $theme , 197 'DEBUG' => $debug , 198 'AUTOSIZE_PATH' => AUTOSIZE_PATH) 199 ); 200 200 201 201 $autoscript="<script type='text/javascript'> 202 202 if (typeof (save_framework) == 'function') 203 203 save_framework('".$page['body_id']."'); 204 205 204 </script>"; 206 205 $template->append('footer_elements',$autoscript); -
extensions/Autosize/js/Affiche_script.js
r7819 r7820 23 23 24 24 } 25 //================================================================================================= 26 function Wait_Pamoorama() { 25 26 //========================================================================== 27 function Wait_Affichage() { 28 if (jQuery("#pamoorama").length) { 29 jQuery().newResize() ; 27 30 mypanorama = window.myPamoorama; 28 if (!mypanorama) setTimeout("Wait_Pamoorama()", 500); 29 if ( mypanorama.skipInit==false) setTimeout("Wait_Pamoorama()", 500); 31 if (!mypanorama){ 32 setTimeout("Wait_Affichage()", 500); 33 return false ; 34 } 35 if ( mypanorama.skipInit==false) { 36 setTimeout("Wait_Affichage()", 500); 37 return false ; 38 } 30 39 info_pamoorama = jQuery("#pamoorama").infos(); 31 40 new_width= info_pamoorama.width ; 32 if(! jQuery().newResize()) setTimeout("Wait_Pamoorama()", 500); 33 if ( myPamoorama.options.width!= new_width ) return 34 jQuery("#theImage").css( 35 { opacity: 1 } 36 ); 37 38 } 39 function Wait_Affichage() { 40 if(!jQuery().newResize()) { 41 42 if ( Math.abs(new_width - myPamoorama.options.width)>10 ) { 41 43 setTimeout("Wait_Affichage()", 500); 42 } 44 return false ; 45 } 46 47 48 }else if(!jQuery().newResize()) { 49 setTimeout("Wait_Affichage()", 500); 50 return 51 } 52 53 43 54 fade_in = parseInt(fade_in); 44 55 if (fade_in==0 ) 45 56 { 46 57 jQuery("#theImage").css({ 47 opacity: 1, 48 filter: 'alpha(opacity:100)'} 58 opacity: 1 59 60 } 49 61 ) 50 62 }else{ … … 55 67 56 68 57 jQuery("#theImage").css(58 { opacity: 1 }59 );60 69 61 70 } … … 342 351 343 352 jQuery(window).resize( 344 function (event, ui) { 353 function (event, ui) { 354 return ; 355 345 356 event = event || window.event; 346 357 … … 409 420 return ; 410 421 411 if(jQuery.browser.msie) 412 { var el = e.srcElement; 413 ID = el.id; 414 Prop = e.propertyName.split("."); 415 if(Prop.length < 2) return ; 416 Property = Prop[1]; 417 } 418 else 419 {ID =this.id ; 420 Prop = e.attrName ; 421 Property = e.newValue ; 422 } 423 jQuery().affiche_debug({ Dragg: {texte:"onPropertyChange : " + ID, 424 css:{ 425 opacity: 0.5, 426 filter: 'alpha(opacity:50)', 427 position: "absolute", 428 width: "500px", 429 border: "solid 1px green", 430 top: 130 + "px"} 431 } 432 }); 433 mypanorama = window.myPamoorama; 434 if (Property.match("width","gi")) { 435 436 437 if(!mypanorama) 438 setTimeout("wait_Pamoorama()", 500); 439 440 441 442 if(jQuery("#pamoorama_outter").length == 0) 443 { 444 elem=jQuery("#pamoorama").get(0); 445 type="propertychange"; 446 handle=jQuery().onPropertyChange; 447 448 if (elem.addEventListener) {// Firefox, Opera, Google Chrome and Safari 449 elem.addEventListener('DOMAttrModified', handle, false); 450 } else if (elem.attachEvent) { 451 elem.attachEvent("on" + type, handle); 452 } 453 setTimeout("wait_Timer()", 600); 454 } 455 else if( jQuery("#pamoorama_footer").length == 0) 456 setTimeout("wait_Pamoorama()", 600); 457 else if( jQuery("#pamoorama_frame").length == 0) 458 setTimeout("wait_Pamoorama()", 600); 459 } 460 return; 422 461 423 }, 462 424 /* 463 425 * recherche la plus grande image (hauteur ou largeur) 464 426 */ … … 592 554 593 555 if (myPamoorama.skipInit == false) { 594 setTimeout("Wait_Pamoorama()", 500);556 595 557 return false; 596 558 } -
extensions/Autosize/main.inc.php
r7816 r7820 2 2 /* 3 3 Plugin Name: AutoSize 4 Version: 1.3. 54 Version: 1.3.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
Note: See TracChangeset
for help on using the changeset viewer.