Commit 03b8755a authored by Porter Libby's avatar Porter Libby
Browse files

work on some styles

parent 553c01bc
......@@ -117,6 +117,68 @@ input[type="radio"]:checked{
{
background-color: #f1f1f1;
}
input[type="checkbox"]:checked+label{
font-weight: bold;
text-decoration: underline;
}
input[type="checkbox"]:checked{
background-color: white;
color: green;
font-size: 20px;
}
.form-check
{
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
display: inline-block;
position: relative;
background-color: #f1f1f1;
color: var(--themeh);
top: 10px;
height: 30px;
width: 30px;
border: 0;
border-radius: 2px;
cursor: pointer;
margin-right: 7px;
outline: none;
}
.form-check:checked::before
{
position: absolute;
font: 13px/1 'Open Sans', sans-serif;
left: 11px;
top: 7px;
content: '\02143';
transform: rotate(40deg);
}
.form-check:hover
{
background-color: var(--theme4);
}
.form-check:checked
{
background-color: #f1f1f1;
}
label
{
font: 15px/1.7 'Open Sans', sans-serif;
......
......@@ -21,6 +21,7 @@
display:block;
text-align: center;
position:fixed;
margin-top:10px;
}
table {
......@@ -28,6 +29,8 @@ table {
margin-top:50px;
font-family: arial, sans-serif;
border-collapse: collapse;
min-width:99%;
}
td, th {
......
......@@ -148,7 +148,7 @@ function getSectors(site_id){
}
function getSpots(sector_id){
current_spots = [];
document.getElementById('data-prompt').innerHTML = "Pick a spot."
document.getElementById('data-prompt').innerHTML = "Pick some spots to compare!"
document.getElementById('spots').innerHTML = placeholderHTML;
resetElements(['streamingplatform','streamingdates','streaming','readingplatform','readingdates','reading']);
......@@ -253,7 +253,7 @@ function getReadings(spot_id,value){
}
console.log("CURRENT SPOTS: " + current_spots);
document.getElementById('data-prompt').innerHTML = "Pick some spots to compare";
document.getElementById("button_permalink").disabled = true;
document.getElementById("button_csv").disabled = true;
......@@ -285,7 +285,7 @@ function getReadings(spot_id,value){
dataview.querySelector("#nav-button-map").classList.add("new_data_button");
document.getElementById('reading').innerHTML = "";
document.getElementById('data-prompt').innerHTML = "Loaded "+readings.length+" points to the graph and map!";
document.getElementById('data-prompt').innerHTML = "Loaded "+current_spots.length+" spots to the graph and map! <br> Pick some more?";
document.getElementById("button_permalink").disabled = false;
document.getElementById("button_csv").disabled = false;
......@@ -550,12 +550,12 @@ function processReadings(readings){
out_node = {};
for(j=0;j<current_data.length;j++){
if (current_data[j].recordtime = min || !out_node.recordtime){
out_node.Spot = current_data[j].spotid;
out_node.recordtime = current_data[j].recordtime;
out_node.elevation = current_data[j].elevation;
out_node.longitude = current_data[j].longitude;
out_node.latitude = current_data[j].latitude;
out_node.accuracy = current_data[j].accuracy;
out_node.spotid = current_data[j].spotid;
if (!out_node[current_data[j].sensortype]){
out_node[current_data[j].sensortype] = current_data[j].value;
}
......
......@@ -47,7 +47,7 @@ function createGraphReading(dataset, q_arr, color){
const table = document.createElement('table');
var tableHTML = "";
var keys = Object.keys(dataset[0]);
tableHTML += createTableRow(keys);
tableHTML += createTableHeader(keys);
console.log(dataset);
for ( x = 0 ; x < dataset.length ; x++){
......@@ -74,6 +74,15 @@ function createTableRow(arr){
text += '</tr>';
return text;
}
function createTableHeader(arr){
console.log(arr);
text = '<tr>';
for (j=0;j<arr.length;j++){
text += "<th>" + arr[j] + "</th>"
}
text += '</tr>';
return text;
}
function createGraphStreaming(dataset, title,color){
// reset some containers
document.getElementById('line-chart').style.display = 'block';
......
......@@ -87,11 +87,11 @@ function createRadioElementSpots( mode, name, checked, label,id ) {
console.log(name,id,label);
var radioHtml = '<div class="elem-div elem-0">'
if (typeof id === 'string' || id instanceof String){
radioHtml += '<input class="data-radio form-radio" onchange="'+ f +'(';
radioHtml += '<input class="data-radio form-check" onchange="'+ f +'(';
radioHtml += "'" + id + "'";
radioHtml +=')" type="checkbox" name="' + name + '" id="' + label + '" />';
}else{
radioHtml += '<input class="data-radio form-radio" onchange="'+ f +'(' + id + ',this.checked)" type="checkbox" name="' + name + '" id="' + label + '" />';
radioHtml += '<input class="data-radio form-check" onchange="'+ f +'(' + id + ',this.checked)" type="checkbox" name="' + name + '" id="' + label + '" />';
}
radioHtml += '<label for="' + label + '">';
radioHtml += '<strong>'+ label + "</strong>";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment