Commit f7f73c853ece60629d83519f6f2d273e6021c9cc

Authored by Andrea Petta
1 parent dc2827bb

plugin update

datalets/base-datalet/base-datalet.html
... ... @@ -362,7 +362,7 @@ Example :
362 362 success: function(data){
363 363 if(data.status == "ok")
364 364 {
365   - alert("Datalet added to private room");
  365 + alert("Datalet added to Myspace");
366 366 }
367 367 else
368 368 {
... ...
datalets/leafletjs-datalet/leafletjs-datalet.html
... ... @@ -105,10 +105,13 @@ Example:
105 105 var popupText = "";
106 106 for(var j=2; j<t.data.length; j++)
107 107 {
108   - if(t.data[j].data[i].toString().match(new RegExp("^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|www\\.){1}([0-9A-Za-z-\\.@:%_\+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?")))
  108 + if(typeof t.data[j] != 'undefined' && typeof t.data[j].data[i] != 'undefined')
  109 + {
  110 + if (t.data[j].data[i].toString().match(new RegExp("^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|www\\.){1}([0-9A-Za-z-\\.@:%_\+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?")))
109 111 popupText += '<image height="100" width="100" src="' + t.data[j].data[i] + '" /><br/>';
110   - else
111   - popupText += '<span>' + t.data[j].data[i] + '</span><br/>'
  112 + else
  113 + popupText += '<span>' + t.data[j].name + ' : ' + t.data[j].data[i] + '</span><br/>'
  114 + }
112 115 }
113 116  
114 117 var popup = L.popup().setContent(popupText);
... ...