Changeset 30224 for extensions/LLGBO2


Ignore:
Timestamp:
Oct 19, 2014, 7:23:31 PM (10 years ago)
Author:
gbo
Message:

improve frame size when using zoom in browser -> ctrl +/-

Location:
extensions/LLGBO2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • extensions/LLGBO2/include/manage_picture_content.php

    r30030 r30224  
    7676                                $frame_title =  "\n".'<!-- Begin LLGBO -->'."\n".'<span  id="llgboh2" style ="background:transparent;z-index:3;color:'.$conf['LLGBO2']['FR-titlecolor'].'">';   
    7777                                }
    78                        
     78                               
    7979                        $template->append('llgbo', array(   
    8080                                                        'FRAME_TITLE1' => $frame_title,
     
    8686                                                         
    8787                        $template->set_prefilter('default_content', 'LLGBO_prefilter_Content_Frame');           
    88 
    89                 if (isset($conf['automatic_size_width_margin'])) // auto size  must take care of frame size
    90                         { $template->assign( array(
    91                         'asize_width_margin' => $conf['automatic_size_width_margin'] + $frame_border,
    92                         'asize_height_margin' => $conf['automatic_size_height_margin'] + $frame_border,));
    93                         $template->parse('asize_picture_js');} 
    9488        } // end frame                                 
    9589//----------------------------------------------------   
     
    128122        return $content;
    129123}
     124
    130125?>
  • extensions/LLGBO2/js/jquery_llgboframeresize.js

    r29841 r30224  
    66                         {      var MainImg = jQuery("#theMainImage");
    77                                if (MainImg.size() > 0)
    8                                    {    var nImgH = parseInt(MainImg.height() );
    9                                                 var nImgW = parseInt(MainImg.width() );
     8                                   {   var nImgH = parseFloat(MainImg.height() );
     9                                                var nImgW = parseFloat(MainImg.width() );
    1010                                                var FrLstBdr = 0; var frbdr=0;
    1111                                                jQuery(".llgboFR").each(function(){
    12                                                         frbdr = parseInt(jQuery(this).css('border-top-width'));
     12                                                        frbdr = parseFloat(jQuery(this).css('border-top-width'));
    1313                                                        FrLstBdr = (frbdr * 2)+FrLstBdr;
    1414                                                        });
    15                                         }               
     15                                        }                                              
    1616                                Elmgbo.width (nImgW + FrLstBdr) ;
    1717                                Elmgbo.height (nImgH + FrLstBdr) ;
     18                                               
     19                                               
    1820                        }       
    1921                }
     
    2426                                LlgboFr_Resize(); });
    2527                       
    26                 jQuery("#theMainImage").load(function(){
     28                jQuery("#theMainImage").load(function(){ ;
    2729                                LlgboFr_Resize();});
    2830 });
  • extensions/LLGBO2/main.inc.php

    r30030 r30224  
    22/*
    33Plugin Name: Look_like_gbo2
    4 Version:  2.7.D
     4Version:  2.7.E
    55Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=251
    66Author: GBo
     
    1717                2.7.D fix bug with frame and theme P0w0
    1818                        improve compatibility with Automatic Size       
     19                2.7.E fix bug with frame in js resize
    1920 */
    2021if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
     
    2324// | Plugin constants                                               |
    2425// +-----------------------------------------------------------------------+
    25 define('LLGBO_VERSION', '2.7.D');
     26define('LLGBO_VERSION', '2.7.E');
    2627define('LLGBO_ID',       basename(dirname(__FILE__)));
    2728define('LLGBO_PATH' ,    PHPWG_PLUGINS_PATH . LLGBO_ID . '/');
     
    4748       
    4849    $conf['LLGBO2'] =  safe_unserialize($conf['LLGBO2_Settings']);
     50       
     51        // auto size  must take care of frame size
     52        if (($conf['LLGBO2']['frame']) ) //Frame on
     53        {       $framesize =0;         
     54            foreach ($conf['LLGBO2']['FR-sizes'] as $cle  => $value)
     55                        { if ( $value > 0)
     56                                {       $framesize = $framesize + ( 2 * $value);        }
     57                        }
     58                if (defined('ASIZE_PATH'))
     59                        { $conf['automatic_size_width_margin']= 12 + $framesize;
     60                          $conf['automatic_size_height_margin']= 40 + $framesize;
     61                        }
     62        }
    4963}
    5064/******************************************************************/
Note: See TracChangeset for help on using the changeset viewer.