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" msgid "dBm not available"
msgstr "dBm non disponibile" msgstr "dBm non disponibile"


msgid "not available"
msgstr "non disponibile"

msgid "Delete \"%(node)s\"" msgid "Delete \"%(node)s\""
msgstr "Elimina \"%(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, strokeOpacity: opacity,
strokeWeight: 5 strokeWeight: 5
}); });
// click event for polyline // if not a distance calculation link
link.clickListener = google.maps.event.addListener(link, 'click', function(event){ if(quality!=4){
nodeshot.gmap.infoWindow.setContent('<b>etx</b>: '+etx+'<br /><b>dBm</b>: '+dbm); // if dBm info is not available
nodeshot.gmap.infoWindow.maxWidth = 50; if(dbm==0){
nodeshot.gmap.infoWindow.position = event.latLng; // write something human readable instead of 0
nodeshot.gmap.infoWindow.open(nodeshot.gmap.map); 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 // show link on gmap
link.setMap(nodeshot.gmap.map); link.setMap(nodeshot.gmap.map);
// return link object - needed by nodeshot.distance.add() // 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' %}", SAVE: "{% trans 'save' %}",
DELETE: "{% trans 'delete' %}", 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.' %}", 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.