mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Only show and evaluate 4-char grids for hams.at
This commit is contained in:
@@ -102,7 +102,7 @@ class Hamsat extends CI_Controller {
|
|||||||
}
|
}
|
||||||
$decoded_json->data[$i]->mode_class = $modeclass;
|
$decoded_json->data[$i]->mode_class = $modeclass;
|
||||||
for($j = 0; $j < count($decoded_json->data[$i]->grids); $j++) {
|
for($j = 0; $j < count($decoded_json->data[$i]->grids); $j++) {
|
||||||
$worked = $this->logbook_model->check_if_grid_worked_in_logbook($decoded_json->data[$i]->grids[$j], null, "SAT");
|
$worked = $this->logbook_model->check_if_grid_worked_in_logbook(substr($decoded_json->data[$i]->grids[$j], 0, 4), null, "SAT");
|
||||||
if ($worked->num_rows() != 0) {
|
if ($worked->num_rows() != 0) {
|
||||||
$decoded_json->data[$i]->grids_wkd[$j] = 1;
|
$decoded_json->data[$i]->grids_wkd[$j] = 1;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -107,9 +107,9 @@ function loadActivationsTable(rows, show_workable_only) {
|
|||||||
grids = [];
|
grids = [];
|
||||||
for (var j=0; j < activation.grids_wkd.length; j++) {
|
for (var j=0; j < activation.grids_wkd.length; j++) {
|
||||||
if (activation.grids_wkd[j] == 1) {
|
if (activation.grids_wkd[j] == 1) {
|
||||||
grids.push("<span data-bs-toggle=\"tooltip\" title=\"Worked\" class=\"badge bg-success\">"+activation.grids[j]+"</span>")
|
grids.push("<span data-bs-toggle=\"tooltip\" title=\"Worked\" class=\"badge bg-success\">"+activation.grids[j].substring(0, 4)+"</span>")
|
||||||
} else {
|
} else {
|
||||||
grids.push("<span data-bs-toggle=\"tooltip\" title=\"Not Worked\" class=\"badge bg-danger\">"+activation.grids[j]+"</span>")
|
grids.push("<span data-bs-toggle=\"tooltip\" title=\"Not Worked\" class=\"badge bg-danger\">"+activation.grids[j].substring(0, 4)+"</span>")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data.push(grids.join(' '));
|
data.push(grids.join(' '));
|
||||||
|
|||||||
Reference in New Issue
Block a user