|
@@ -130,7 +130,7 @@ function initialiseLocations() {
|
|
|
var filterValue = filterValueParts.join("").toLowerCase();
|
|
var filterValue = filterValueParts.join("").toLowerCase();
|
|
|
|
|
|
|
|
// Populate table
|
|
// Populate table
|
|
|
- var tr = $("<tr data-location-id=\"" + location.id + "\" data-internal-id=\"" + location.internalId + "\" data-latitude=\"" + location.latitude + "\" data-longitude=\"" + location.longitude + "\" data-filter-value=\"" + filterValue + "\"></tr>");
|
|
|
|
|
|
|
+ var tr = $("<tr data-location-id=\"" + location.id + "\" data-internal-id=\"" + location.internalId + "\" data-tester-id=\"" + location.testerId + "\" data-latitude=\"" + location.latitude + "\" data-longitude=\"" + location.longitude + "\" data-filter-value=\"" + filterValue + "\"></tr>");
|
|
|
|
|
|
|
|
var td = $("<td class=\"text-right\"></td>");
|
|
var td = $("<td class=\"text-right\"></td>");
|
|
|
td.append(location.id);
|
|
td.append(location.id);
|
|
@@ -194,11 +194,13 @@ function handleFindTestersButtonClick() {
|
|
|
var container = $(this).closest("[data-location-id]");
|
|
var container = $(this).closest("[data-location-id]");
|
|
|
|
|
|
|
|
var locationId = parseInt($(container).attr("data-location-id"));
|
|
var locationId = parseInt($(container).attr("data-location-id"));
|
|
|
|
|
+ var testerId = parseInt($(container).attr("data-tester-id"));
|
|
|
var lat = parseFloat($(container).attr("data-latitude"));
|
|
var lat = parseFloat($(container).attr("data-latitude"));
|
|
|
var lng = parseFloat($(container).attr("data-longitude"));
|
|
var lng = parseFloat($(container).attr("data-longitude"));
|
|
|
|
|
|
|
|
selectedLocation = {
|
|
selectedLocation = {
|
|
|
id: locationId,
|
|
id: locationId,
|
|
|
|
|
+ testerId: testerId,
|
|
|
lat: lat,
|
|
lat: lat,
|
|
|
lng: lng
|
|
lng: lng
|
|
|
};
|
|
};
|
|
@@ -217,7 +219,8 @@ function handleFindTestersButtonClick() {
|
|
|
function handleLocationClick() {
|
|
function handleLocationClick() {
|
|
|
|
|
|
|
|
selectedLocation = {
|
|
selectedLocation = {
|
|
|
- id: this.location.id
|
|
|
|
|
|
|
+ id: this.location.id,
|
|
|
|
|
+ testerId: this.location.testerId
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
map.panTo(this.getPosition());
|
|
map.panTo(this.getPosition());
|
|
@@ -241,12 +244,14 @@ function clearTesters() {
|
|
|
function initialiseTesters() {
|
|
function initialiseTesters() {
|
|
|
|
|
|
|
|
let highlightClass = "table-warning";
|
|
let highlightClass = "table-warning";
|
|
|
|
|
+ let testerId = selectedLocation.testerId;
|
|
|
|
|
|
|
|
$("#tests-tbody tr").removeClass(highlightClass);
|
|
$("#tests-tbody tr").removeClass(highlightClass);
|
|
|
$("#tests-tbody tr[data-location-id=" + selectedLocation.id + "]").addClass(highlightClass);
|
|
$("#tests-tbody tr[data-location-id=" + selectedLocation.id + "]").addClass(highlightClass);
|
|
|
|
|
|
|
|
map = maps["map"];
|
|
map = maps["map"];
|
|
|
|
|
|
|
|
|
|
+
|
|
|
$("#tester-list-loading-container").text("Loading available testers...");
|
|
$("#tester-list-loading-container").text("Loading available testers...");
|
|
|
|
|
|
|
|
$.post("/account/projects/" + projectID + "/get-testers", {
|
|
$.post("/account/projects/" + projectID + "/get-testers", {
|
|
@@ -292,6 +297,10 @@ function initialiseTesters() {
|
|
|
|
|
|
|
|
var tr = $("<tr data-tester-id=\"" + tester.id + "\" data-address-id=\"" + tester.addressId + "\" data-filter-value=\"" + filterValue + "\"></tr>");
|
|
var tr = $("<tr data-tester-id=\"" + tester.id + "\" data-address-id=\"" + tester.addressId + "\" data-filter-value=\"" + filterValue + "\"></tr>");
|
|
|
|
|
|
|
|
|
|
+ if(tester.id == testerId) {
|
|
|
|
|
+ $(tr).addClass(highlightClass);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
var td = $("<td class=\"text-right\"></td>");
|
|
var td = $("<td class=\"text-right\"></td>");
|
|
|
td.append(tester.id);
|
|
td.append(tester.id);
|
|
|
tr.append(td);
|
|
tr.append(td);
|