Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions djnro/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,7 @@ input[readonly].input {
.btn-link {
padding-top: 15px;
}

dd.preproduction {
color: rgb(230, 93, 0);
}
Binary file added djnro/static/img/edupin-preprod.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified djnro/static/img/edupin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
172 changes: 172 additions & 0 deletions djnro/static/img/edupin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions djnro/static/js/geolocate.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@

function initialize() {
image = new google.maps.MarkerImage(pinImg,
new google.maps.Size(29, 40),
new google.maps.Size(50, 80),
new google.maps.Point(0, 0),
new google.maps.Point(14, 40)
// The anchor for this image is the base of the flagpole at 18,42.
new google.maps.Point(12, 40),
new google.maps.Size(25, 40)
);
var styleArray = [{
featureType : "all",
Expand Down
33 changes: 21 additions & 12 deletions djnro/static/js/home-page-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,29 @@
var map;
var bounds;
var image;
var imagePreProd;
var infoWindow;
var cityImg;
var countryImg;
var styles;
var markersUrl;
var pinImg;
var pinImgPreProd;

function initialize() {
image = new google.maps.MarkerImage(pinImg,
// This marker is 29 pixels wide by 40 pixels tall.
new google.maps.Size(29, 40),
// The origin for this image is 0,0.
new google.maps.Point(0, 0),
// The anchor for this image is the base of the flagpole at 18,42.
new google.maps.Point(14, 40));
new google.maps.Size(50, 80),
new google.maps.Point(0, 0),
// The anchor for this image is the base of the flagpole at 18,42.
new google.maps.Point(12, 40),
new google.maps.Size(25, 40)
);
imagePreProd = new google.maps.MarkerImage(pinImgPreProd,
new google.maps.Size(50, 80),
new google.maps.Point(0, 0),
new google.maps.Point(12, 40),
new google.maps.Size(25, 40)
);

var styleArray = [ {
featureType : "all",
Expand Down Expand Up @@ -126,12 +134,10 @@
marker,
'click',
function() {
infoWindow.setContent ( "<div><h4>"
infoWindow.setContent ( "<div" + (jsonMarker.stage == 1 ? '' : ' class="preproduction"') + "><h4>"
+ jsonMarker.inst
+ "</h4>"
+

"<div class='tabbable'>"
+ "<div class='tabbable'>"
+ "<ul class='nav nav-tabs'>"
+ "<li class='active'><a href='#tab1' data-toggle='tab'>Info</a></li>"
+ "<li><a href='#tab2' data-toggle='tab'>More...</a></li>"
Expand All @@ -153,7 +159,9 @@
+ "&nbsp;</dd>"
+ "<dt>Number of APs</dt><dd>"
+ jsonMarker.AP_no
+ "&nbsp;</dd></dl>"
+ "&nbsp;</dd>"
+ (jsonMarker.stage == 1 ? '' : '<dt class="preproduction">Stage</dt><dd class="preproduction">Testing/Preproduction</dd>')
+ "</dl>"
+ "</div>"
+ "<div class='tab-pane' id='tab2'>"
+ "<dl class='dl-horizontal'>"
Expand Down Expand Up @@ -203,7 +211,7 @@
'map' : map,
'title' : title,
'address' : address,
'icon' : pinImg,
'icon' : markerObj.stage == 1 ? image : imagePreProd,
});
return marker
}
Expand Down Expand Up @@ -350,6 +358,7 @@
image = '';
infoWindow;
pinImg = mapDiv.data("pin");
pinImgPreProd = mapDiv.data("pin-preprod");
pinGrpImg = mapDiv.data("group-pin");
addr = {};
styles = [{
Expand Down
13 changes: 6 additions & 7 deletions djnro/static/js/management-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ var servicesEditUrl;

function initialize() {
image = new google.maps.MarkerImage(pinImg,
// This marker is 29 pixels wide by 40 pixels tall.
new google.maps.Size(29, 40),
// The origin for this image is 0,0.
new google.maps.Point(0,0),
// The anchor for this image is the base of the flagpole at 18,42.
new google.maps.Point(14, 40)
);
new google.maps.Size(50, 80),
new google.maps.Point(0, 0),
// The anchor for this image is the base of the flagpole at 18,42.
new google.maps.Point(12, 40),
new google.maps.Size(25, 40)
);
var styleArray = [
{
featureType: "all",
Expand Down
12 changes: 6 additions & 6 deletions djnro/static/js/world-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

function initialize() {
image = new google.maps.MarkerImage(pinImg,
// This marker is 29 pixels wide by 40 pixels tall.
new google.maps.Size(29, 40),
// The origin for this image is 0,0.
new google.maps.Point(0, 0),
// The anchor for this image is the base of the flagpole at 18,42.
new google.maps.Point(14, 40));
new google.maps.Size(50, 80),
new google.maps.Point(0, 0),
// The anchor for this image is the base of the flagpole at 18,42.
new google.maps.Point(12, 40),
new google.maps.Size(25, 40)
);

var styleArray = [ {
featureType : "all",
Expand Down
2 changes: 1 addition & 1 deletion djnro/templates/front/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% block bodyclass %}home{% endblock %}
{% block content %}
<div id="map_wrapper">
<div id="map_canvas" style="width:100%; height:600px; overflow: hidden;" data-map-center-lat="{{MAP_CENTER.0}}" data-map-center-lng="{{MAP_CENTER.1}}" data-group-pin="{% static 'img/edugroup.png' %}" data-pin="{% static 'img/edupin.png' %}" data-city="{% static 'img/city.png' %}" data-country="{% static 'img/country.png' %}" data-markers="{% url 'get-all-services' %}"></div>
<div id="map_canvas" style="width:100%; height:600px; overflow: hidden;" data-map-center-lat="{{MAP_CENTER.0}}" data-map-center-lng="{{MAP_CENTER.1}}" data-group-pin="{% static 'img/edugroup.png' %}" data-pin="{% static 'img/edupin.png' %}" data-pin-preprod="{% static 'img/edupin-preprod.png' %}" data-city="{% static 'img/city.png' %}" data-country="{% static 'img/country.png' %}" data-markers="{% url 'get-all-services' %}"></div>
</div>
<div class="squares">
<div class="container">
Expand Down
1 change: 1 addition & 0 deletions edumanage/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2021,6 +2021,7 @@ def cache_key(inst_key):
point['wired_no'] = u"%s" % (sl.wired_no)
point['SSID'] = u"%s" % (sl.SSID)
point['key'] = u"%s" % sl.pk
point['stage'] = u"%s" % (sl.stage)
points[cache_key].append(point)

points_ret.extend(points[cache_key])
Expand Down