Skip to content

Commit

Permalink
Fixed #77 and #78.
Browse files Browse the repository at this point in the history
close #77
close #78
  • Loading branch information
nemesisdesign committed Apr 3, 2012
1 parent 48716fc commit d25f836
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
Binary file modified locale/it/LC_MESSAGES/django.mo
Binary file not shown.
3 changes: 3 additions & 0 deletions locale/it/LC_MESSAGES/django.po
Expand Up @@ -157,6 +157,9 @@ msgstr ""
msgid "dBm not available"
msgstr "dBm non disponibile"

msgid "not available"
msgstr "non disponibile"

msgid "Delete \"%(node)s\""
msgstr "Elimina \"%(node)s\""

Expand Down
22 changes: 15 additions & 7 deletions media/js/nodeshot.js
Expand Up @@ -1812,13 +1812,21 @@ var nodeshot = {
strokeOpacity: opacity,
strokeWeight: 5
});
// click event for polyline
link.clickListener = google.maps.event.addListener(link, 'click', function(event){
nodeshot.gmap.infoWindow.setContent('<b>etx</b>: '+etx+'<br /><b>dBm</b>: '+dbm);
nodeshot.gmap.infoWindow.maxWidth = 50;
nodeshot.gmap.infoWindow.position = event.latLng;
nodeshot.gmap.infoWindow.open(nodeshot.gmap.map);
});
// if not a distance calculation link
if(quality!=4){
// if dBm info is not available
if(dbm==0){
// write something human readable instead of 0
dbm = i18n.NOT_AVAILABLE
}
// add an onclick event for the link which shows etx and dBm
link.clickListener = google.maps.event.addListener(link, 'click', function(event){
nodeshot.gmap.infoWindow.setContent('<b>etx</b>: '+etx+'<br /><b>dBm</b>: '+dbm);
nodeshot.gmap.infoWindow.maxWidth = 50;
nodeshot.gmap.infoWindow.position = event.latLng;
nodeshot.gmap.infoWindow.open(nodeshot.gmap.map);
});
}
// show link on gmap
link.setMap(nodeshot.gmap.map);
// return link object - needed by nodeshot.distance.add()
Expand Down
3 changes: 2 additions & 1 deletion nodeshot/templates/i18n_fragment.html
Expand Up @@ -20,5 +20,6 @@
SAVE: "{% trans 'save' %}",
DELETE: "{% trans 'delete' %}",
SMTP_ERROR: "{% trans 'The message cannot be sent because the outgoing email server is temporarily unavailable. Try again later. We apologize for the inconvenience.' %}",
NODE_DOESNT_EXIST: "{% trans 'The node does not exist' %}"
NODE_DOESNT_EXIST: "{% trans 'The node does not exist' %}",
NOT_AVAILABLE: "{% trans 'not available' %}"
}

0 comments on commit d25f836

Please sign in to comment.