Changeset 7128 for extensions/GMaps/js/gmapsCategory.js
- Timestamp:
- Oct 8, 2010, 3:02:29 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GMaps/js/gmapsCategory.js
r7125 r7128 65 65 width:$(map.getDiv()).width(), 66 66 height:$(map.getDiv()).height(), 67 distanceTreshold:2 567 distanceTreshold:20 68 68 } 69 69 70 70 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 ); 71 83 72 84 $.ajax( … … 80 92 { 81 93 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'); 84 99 } 85 100 } … … 128 143 var marker = new google.maps.Marker( 129 144 { 130 position:new google.maps.LatLng(markers[i].lat itude, markers[i].longitude),145 position:new google.maps.LatLng(markers[i].lat, markers[i].lng), 131 146 map: currentMapLoad, 132 title:markers[i].nbIm agesTxt147 title:markers[i].nbImgTxt 133 148 } 134 149 ); … … 204 219 { 205 220 gmaps.currentInfo.displayed=index; 206 if(gmaps.currentInfo.im agesName[index]=='')221 if(gmaps.currentInfo.imgName[index]=='') 207 222 { 208 223 $('#ciGMIWC_title').html(' '); … … 210 225 else 211 226 { 212 $('#ciGMIWC_title').html(gmaps.currentInfo.im agesName[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]); 215 230 216 231 $('#ciGMIWC_img').unbind(); 217 if(gmaps.currentInfo.im agesCatsUrl[index].length==1)232 if(gmaps.currentInfo.imgCatsUrl[index].length==1) 218 233 { 219 234 $('#ciGMIWC_img').bind('click', 220 235 function () 221 236 { 222 window.location=gmaps.currentInfo.im agesCatsUrl[gmaps.currentInfo.displayed][0];237 window.location=gmaps.currentInfo.imgCatsUrl[gmaps.currentInfo.displayed][0]; 223 238 } 224 239 ); … … 227 242 { 228 243 $('#ciGMIWC_showcatList').html(''); 229 for(var i=0;i<gmaps.currentInfo.im agesCatsUrl[index].length;i++)244 for(var i=0;i<gmaps.currentInfo.imgCatsUrl[index].length;i++) 230 245 { 231 246 $('#ciGMIWC_showcatList') 232 .append('<li><a href="'+gmaps.currentInfo.im agesCatsUrl[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>'); 233 248 } 234 249 $('#ciGMIWC_img, #ciGMIWC_showcat') … … 239 254 if(gmaps.currentInfo.nbImages>1) 240 255 { 241 $('#ciGMIWC_picnum').html((index+1)+'/'+gmaps.currentInfo.nbIm agesTxt);256 $('#ciGMIWC_picnum').html((index+1)+'/'+gmaps.currentInfo.nbImgTxt); 242 257 $('#ciWALeft, #ciWARight').css('display', 'inline-block'); 243 258 } 244 259 else 245 260 { 246 $('#ciGMIWC_picnum').html(gmaps.currentInfo.nbIm agesTxt);261 $('#ciGMIWC_picnum').html(gmaps.currentInfo.nbImgTxt); 247 262 $('#ciWALeft, #ciWARight').css('display', 'none'); 248 263 } … … 416 431 } 417 432 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 418 439 419 440 }
Note: See TracChangeset
for help on using the changeset viewer.