Ignore:
Timestamp:
Nov 11, 2011, 12:10:02 AM (12 years ago)
Author:
grum
Message:

feature:2499 - compatibility with Piwigo 2.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/gally/gally-default/js/gallyjs-tcp.js

    r8528 r12592  
    44  ------------------------------------------------------------------------------
    55  file: gally/gallyjs-tcp.js
    6   file release: 1.4.0
     6  file release: 1.4.4
    77  ------------------------------------------------------------------------------
    88  author: grum at piwigo.org
     
    3232  initContentDesc = function()
    3333  {
     34    var tmpInfo='';
     35
    3436    if(($("#additional_infoTOP").length + $("#additional_infoBOTTOM").length)<2)
    3537    {
     
    7072
    7173    // <!--up-down--> tag
    72     txt = $("#additional_infoLEFT").attr("innerHTML");
     74    txt = $("#additional_infoLEFT").prop("innerHTML");
    7375    if(txt==null) { txt=""; }
    7476    tmp = txt.indexOf("<!--up-down-->");
     
    7678    if(tmp>-1)
    7779    { // tag is not managed by the ExtendedDescription plugin
    78       $("#additional_infoTOP").attr("innerHTML", txt.slice(0,tmp));
     80      $("#additional_infoTOP").prop("innerHTML", txt.slice(0,tmp));
    7981      txt=txt.substr(tmp+14); //remove the tag
    8082    }
     
    8587          if(this.id=="")
    8688          {
    87             $("#additional_infoTOP").attr("innerHTML", $("#additional_infoTOP").attr("innerHTML")+this.innerHTML);
     89            $("#additional_infoTOP").prop("innerHTML", $("#additional_infoTOP").prop("innerHTML")+this.innerHTML);
    8890            this.parentNode.removeChild(this);
    8991          }
     
    9799    if(tmp>-1)
    98100    { // tag is present, cut the right text to the
    99       $("#additional_infoBOTTOM").attr("innerHTML", txt.slice(0,tmp));
     101      $("#additional_infoBOTTOM").prop("innerHTML", txt.slice(0,tmp));
    100102      txt=txt.substr(tmp+17);
    101103    }
    102104
    103     $("#additional_infoLEFT").attr("innerHTML", txt);
     105    $("#additional_infoLEFT").prop("innerHTML", txt);
    104106
    105107    if((txt.replace(/\s*/im, "")=="")&&($("#additional_infoID").length>0))
     
    110112    $(".additional_info").css("visibility", "visible");
    111113
    112     if($("#additional_infoBOTTOM").attr("innerHTML").replace(/\s*/im, "")=="")
     114    tmpInfo=$("#additional_infoBOTTOM").prop("innerHTML");
     115    if(tmpInfo==null) tmpInfo='';
     116
     117    if(tmpInfo.replace(/\s*/im, "")=="")
    113118    {
    114119      // remove the bottom area if empty
     
    120125    }
    121126
    122     if($("#additional_infoTOP").attr("innerHTML").replace(/\s*/im, "")=="")
     127    tmpInfo=$("#additional_infoTOP").prop("innerHTML");
     128    if(tmpInfo==null) tmpInfo='';
     129    if(tmpInfo.replace(/\s*/im, "")=="")
    123130    {
    124131      // remove the top area if empty
     
    138145        {
    139146          visibility:"hidden",
    140           top: $("#titrePageID").attr("offsetTop")+$("#titrePageID").attr("offsetHeight")-2+'px'
     147          top: $("#titrePageID").prop("offsetTop")+$("#titrePageID").prop("offsetHeight")-2+'px'
    141148        }
    142149      );
     
    167174        function (index, elem)
    168175        {
    169           //alert($(this.parentNode).attr('offsetWidth')+"---"+$(this.parentNode).attr('id'));
    170           $(this).css("min-width", $(this.parentNode).attr('offsetWidth'));
     176          //alert($(this.parentNode).prop('offsetWidth')+"---"+$(this.parentNode).prop('id'));
     177          $(this).css("min-width", $(this.parentNode).prop('offsetWidth'));
    171178          if(jQuery.browser.msie)
    172179          {
     
    194201            height:"auto"
    195202          }).fadeTo(options.animateDelay,1);
    196           $("#icon_menu").attr("className", "button2");
     203          $("#icon_menu").toggleClass("button button2");
    197204          menuState=true;
    198205          break;
     
    204211            });
    205212          });
    206           $("#icon_menu").attr("className", "button");
     213          $("#icon_menu").toggleClass("button button2");
    207214          menuState=false;
    208215      }
     
    217224            height:"auto"
    218225          });
    219           $("#icon_menu").attr("className", "button2");
     226          $("#icon_menu").toggleClass("button button2");
    220227          menuState=true;
    221228          break;
     
    225232            height:"0px"
    226233          });
    227           $("#icon_menu").attr("className", "button");
     234          $("#icon_menu").toggleClass("button button2");
    228235          menuState=false;
    229236      }
Note: See TracChangeset for help on using the changeset viewer.