Ignore:
Timestamp:
May 17, 2012, 8:38:07 PM (12 years ago)
Author:
gbo
Message:

2.4.B Compliance with Theme Stripped and plugin Piwishak

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/LLGBO2/js/jquery_llgboframeresize.js

    r14421 r15076  
    11// LLGBO frame resize
    2 jQuery(document).ready(function($){ 
    3         $("#theMainImage").load(function(){
    4                 var FrmHeight =   parseInt(this.height);
    5                 var FrmWidth =     parseInt(this.width);
    6                 var FrmLastBorder = 0;
    7                 var gboid = document.getElementById("gbo")
    8                 if (gboid)
    9                         {for ( i=1; i<32; i=i+2 )
    10                                 {var tgname = "llgboframe"+(i);
    11                                 var FrmS = document.getElementById(tgname);
    12                                         if (FrmS)       
    13                                                 {
    14                                                 FrmHeight = FrmHeight + (FrmLastBorder * 2);
    15                                                 FrmWidth= FrmWidth + (FrmLastBorder * 2);
    16                                                 FrmS.style.height = FrmHeight+"px";
    17                                                 FrmS.style.width  = FrmWidth+"px";
    18                                                 FrmLastBorder = parseInt(FrmS.style.borderWidth);
    19                                                 }
    20                                 }
    21                         FrmHeight = FrmHeight + (FrmLastBorder * 2);
    22                         FrmWidth = FrmWidth + (FrmLastBorder * 2);
    23                         gboid.style.height = FrmHeight+"px";
    24                         gboid.style.width  = FrmWidth+"px";
     2jQuery(document).ready(function(jQuery){
     3        jQuery("#theMainImage").load(function(){LlgboFr_Resize();});   
     4        jQuery(window).resize(function(){ LlgboFr_Resize(); });
     5});
     6var LlgboFr_Resize = function () {
     7        var MainImg = jQuery("img#theMainImage").get(0);       
     8        var nFrH = parseInt(MainImg.height);
     9        var nFrW = parseInt(MainImg.width);
     10        var FrLstBdr = 0, i = 0;
     11        var elGbo = jQuery("div#llgbo");
     12        if  (elGbo.get(0)) {
     13                for ( i=1; i<32; i=i+2 )
     14                        {var Fr = jQuery("div#llgboframe"+(i));
     15                         var frbdr = 0;
     16                         if (Fr.get(0)) {
     17                                frbdr = parseInt(Fr.css('border-left-width'));
     18                                nFrH = nFrH + FrLstBdr ;
     19                                nFrW = nFrW + FrLstBdr ;
     20                                Fr.css("height", (nFrH) + "px");
     21                                Fr.css("width", (nFrW) + "px");}
     22                                FrLstBdr = (frbdr * 2);
    2523                        }
    26         });     
    27 });
    28 
     24                        elGbo.css("width", (nFrW + FrLstBdr) + "px");
     25                        elGbo.css("height", (nFrH + FrLstBdr) + "px");
     26                }
     27}
Note: See TracChangeset for help on using the changeset viewer.