Changeset 7013


Ignore:
Timestamp:
Sep 24, 2010, 6:15:20 PM (14 years ago)
Author:
cljosse
Message:

[Autosize]Improvement 'panoramas' compatibility


Location:
extensions/Autosize
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Autosize/js/Affiche_script.js

    r7012 r7013  
    1 
     1
    22//==== remplace $(... avec jQuery( ====
    33 var ov_map;
     
    88     new_element = jQuery(element);
    99     jq = new_element.selector;
    10      
     10     if (jQuery("#Panorama").length) {
     11
     12         return new_element;
     13     }
    1114     afq = jQuery(document).data("initialized") ; //2
    1215     if (element == window && afq != 1)
     
    3336            }else if( MooTools.version == "1.11") {
    3437            B = element;
    35             if (!B) {
    36                 if (typeof (B) == "boolean") return null;
    37                 return jQuery();
    38             }
     38                if (!B) {
     39                        if (typeof (B) == "boolean") return null;
     40                        return jQuery();
     41                }
    3942                if (B.htmlElement) {
    4043                    return Garbage.collect(B);
    4144
    4245                }
    43                 if ([window, document].contains(B)) {
    44                 return B;
    45                 }
     46                if ([window, document].contains(B)) { return B; }
    4647                var A = $type(B);
    4748                if (A == "string") { B = document.getElementById(B); A = (B) ? "element" : false; }
     
    123124
    124125            Type_Img = "pamoorama";
     126        } else if (jQuery("#Panorama").length) {
     127
     128            Type_Img = "panorama";
     129            return;
    125130        } else if (jQuery("#theImage").find("img").length > 0) {
    126131            Type_Img = "img";
     
    356361
    357362            } else if (theme.match(RegExp("luciano", "g"))) {
    358                 jQuery("#theImage").height(Image_height );
     363                jQuery("#theImage").height(Image_height);
    359364            }
    360365        } catch (e) {
  • extensions/Autosize/main.inc.php

    r7012 r7013  
    2323    global $infos_message,$erreur_message;
    2424    global  $conf,$lang ,$user;
    25 
    2625    if ( $page['body_id']=='thePicturePage'  ) {
    2726   if ( isset($picture['current'])){
     
    2928    $autosize_parametres = cl_autosize_Get_Options();
    3029    include (AUTOSIZE_PATH."include/affiche.php");             
    31  
     30
    3231    $template->set_filenames(
    3332        array('autosize_content'=> $my_path.'template/autosize.tpl')
     
    146145 }
    147146 //=======================================================================
    148 //add_event_handler('loc_end_page_header','cl_autosize_script',40 );   
    149 function cl_autosize_script()
     147//add_event_handler('render_element_content', 'cl_autosize_script', 98, 2 );
     148
     149function cl_autosize_script($content, $image)
    150150{
    151151   global $user, $picture, $template,$page;
    152     global $content, $element_info;   
     152 
     153    global  $element_info;   
    153154    global $infos_message,$erreur_message;
    154155    global  $conf,$lang ,$user;
    155156
    156157    $my_path = dirname(__FILE__).'/';
    157        
    158  
    159158    $template->set_filenames(
    160         array('autosize_cl_content'=> $my_path.'template/cl_conflit.tpl')
     159        array('autosize_cl_init'=> $my_path.'template/cl_conflit.tpl')
    161160    );
    162 
    163161        $template->assign(
    164162                                        array(
     
    166164                                        )
    167165                     );
    168        return $template->parse( 'autosize_cl_content', false);
     166       return  $content;
    169167       
    170168}
Note: See TracChangeset for help on using the changeset viewer.