Ignore:
Timestamp:
May 27, 2012, 2:04:11 PM (12 years ago)
Author:
grum
Message:

feature:2638 - Compatibility with Piwigo 2.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/GMaps/js/gmapsCategory.js

    r12204 r15345  
    208208      for(var index=0;index<marker.info.imgTn.length;index++)
    209209      {
    210         switch(marker.info.imgTn[index].charAt(0))
    211         {
    212           case 'G':
    213             marker.info.imgTn[index]='./galleries/'+marker.info.imgTn[index].substr(1);
    214             break;
    215           case 'U':
    216             marker.info.imgTn[index]='./upload/'+marker.info.imgTn[index].substr(1);
    217             break;
    218         }
    219       }
    220     }
     210        marker.info.imgTn[index]=replaceRoot(marker.info.imgTn[index]);
     211      }
     212    }
     213  }
     214
     215  var replaceRoot=function(value)
     216  {
     217    var returned=value;
     218    switch(value.charAt(0))
     219    {
     220      case 'G':
     221        returned='./_data/i/galleries/'+value.substr(1);
     222        break;
     223      case 'I':
     224        returned='./i.php?/galleries/'+value.substr(1);
     225        break;
     226      case 'P':
     227        returned='./picture.php?/'+value.substr(1);
     228        break;
     229    }
     230    return(returned);
    221231  }
    222232
     
    335345        function ()
    336346        {
    337           window.location=gmaps.currentInfo.imgCatsUrl[gmaps.currentInfo.displayed][0];
     347          window.location=replaceRoot(gmaps.currentInfo.imgCatsUrl[gmaps.currentInfo.displayed][0]);
    338348        }
    339349      );
     
    345355      {
    346356        $('#ciGMIWC_showcatList')
    347           .append('<li><a href="'+gmaps.currentInfo.imgCatsUrl[index][i]+'">'+gmaps.currentInfo.imgCatsNames[index][i]+'</a></li>');
     357          .append('<li><a href="'+replaceRoot(gmaps.currentInfo.imgCatsUrl[index][i])+'">'+gmaps.currentInfo.imgCatsNames[index][i]+'</a></li>');
    348358      }
    349359      $('#ciGMIWC_img, #ciGMIWC_showcat')
Note: See TracChangeset for help on using the changeset viewer.