Ignore:
Timestamp:
Oct 8, 2010, 3:02:29 AM (14 years ago)
Author:
grum
Message:

Connect the plugin to the RBuilder component + fixe some small bugs

File:
1 edited

Legend:

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

    r7125 r7128  
    6565    width:$(map.getDiv()).width(),
    6666    height:$(map.getDiv()).height(),
    67     distanceTreshold:25
     67    distanceTreshold:20
    6868  }
    6969
    7070  currentMapLoad=map;
     71
     72  $('#gmapsLoading').css('display', 'inline-block');
     73  $('#gmapsNbPhotos').html('');
     74  $('#iDialogGMapWaiting').css(
     75    {
     76      width:$('#iGMapsIcon').width()+'px',
     77      height:$('#iGMapsIcon').height()+'px',
     78      top:$('#iGMapsIcon').position().top+'px',
     79      left:$('#iGMapsIcon').position().left+'px',
     80      display:'block'
     81    }
     82  );
    7183
    7284  $.ajax(
     
    8092        {
    8193          tmp=$.parseJSON(msg);
    82           tmp.sort(compareMarkers);
    83           applyMarkers(currentMapLoad, tmp);
     94          tmp.markers.sort(compareMarkers);
     95          applyMarkers(currentMapLoad, tmp.markers);
     96          $('#gmapsLoading').css('display', 'none');
     97          $('#gmapsNbPhotos').html('['+tmp.datas.nbPhotos+']');
     98          $('#iDialogGMapWaiting').css('display', 'none');
    8499        }
    85100    }
     
    128143    var marker = new google.maps.Marker(
    129144      {
    130         position:new google.maps.LatLng(markers[i].latitude, markers[i].longitude),
     145        position:new google.maps.LatLng(markers[i].lat, markers[i].lng),
    131146        map: currentMapLoad,
    132         title:markers[i].nbImagesTxt
     147        title:markers[i].nbImgTxt
    133148      }
    134149    );
     
    204219{
    205220  gmaps.currentInfo.displayed=index;
    206   if(gmaps.currentInfo.imagesName[index]=='')
     221  if(gmaps.currentInfo.imgName[index]=='')
    207222  {
    208223    $('#ciGMIWC_title').html(' ');
     
    210225  else
    211226  {
    212     $('#ciGMIWC_title').html(gmaps.currentInfo.imagesName[index]);
    213   }
    214   $('#ciGMIWC_img').attr('src', gmaps.currentInfo.imagesTnFile[index]);
     227    $('#ciGMIWC_title').html(gmaps.currentInfo.imgName[index]);
     228  }
     229  $('#ciGMIWC_img').attr('src', './galleries/'+gmaps.currentInfo.imgTn[index]);
    215230
    216231  $('#ciGMIWC_img').unbind();
    217   if(gmaps.currentInfo.imagesCatsUrl[index].length==1)
     232  if(gmaps.currentInfo.imgCatsUrl[index].length==1)
    218233  {
    219234    $('#ciGMIWC_img').bind('click',
    220235      function ()
    221236      {
    222         window.location=gmaps.currentInfo.imagesCatsUrl[gmaps.currentInfo.displayed][0];
     237        window.location=gmaps.currentInfo.imgCatsUrl[gmaps.currentInfo.displayed][0];
    223238      }
    224239    );
     
    227242  {
    228243    $('#ciGMIWC_showcatList').html('');
    229     for(var i=0;i<gmaps.currentInfo.imagesCatsUrl[index].length;i++)
     244    for(var i=0;i<gmaps.currentInfo.imgCatsUrl[index].length;i++)
    230245    {
    231246      $('#ciGMIWC_showcatList')
    232         .append('<li><a href="'+gmaps.currentInfo.imagesCatsUrl[index][i]+'">'+gmaps.currentInfo.imagesCatsNames[index][i]+'</a></li>');
     247        .append('<li><a href="'+gmaps.currentInfo.imgCatsUrl[index][i]+'">'+gmaps.currentInfo.imgCatsNames[index][i]+'</a></li>');
    233248    }
    234249    $('#ciGMIWC_img, #ciGMIWC_showcat')
     
    239254  if(gmaps.currentInfo.nbImages>1)
    240255  {
    241     $('#ciGMIWC_picnum').html((index+1)+'/'+gmaps.currentInfo.nbImagesTxt);
     256    $('#ciGMIWC_picnum').html((index+1)+'/'+gmaps.currentInfo.nbImgTxt);
    242257    $('#ciWALeft, #ciWARight').css('display', 'inline-block');
    243258  }
    244259  else
    245260  {
    246     $('#ciGMIWC_picnum').html(gmaps.currentInfo.nbImagesTxt);
     261    $('#ciGMIWC_picnum').html(gmaps.currentInfo.nbImgTxt);
    247262    $('#ciWALeft, #ciWARight').css('display', 'none');
    248263  }
     
    416431      }
    417432
     433      $('div.gmapsPopup div.ui-dialog-titlebar')
     434      .append('<span id="gmapsLoading" style="display:none;"><img src="./plugins/GrumPluginClasses/icons/processing.gif"><span>'+gmaps.lang.loading+'</span></span>');
     435
     436      $('#ui-dialog-title-iGMapsIconContent')
     437      .append('<span id="gmapsNbPhotos"></span>');
     438
    418439
    419440    }
Note: See TracChangeset for help on using the changeset viewer.