Change css/js indentation to 4 spaces
parent
c3b3fff6ba
commit
859cf03201
|
@ -16,6 +16,10 @@ indent_size = 4
|
|||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.{js,html}]
|
||||
[*.{html}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
indent_size = 2
|
||||
|
||||
[*.{css,js}]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
|
|
@ -0,0 +1,141 @@
|
|||
.alert-debug {
|
||||
color: black;
|
||||
background-color: white;
|
||||
border-color: #d6e9c6;
|
||||
}
|
||||
|
||||
.alert-info {
|
||||
color: #3a87ad;
|
||||
background-color: #d9edf7;
|
||||
border-color: #bce8f1;
|
||||
}
|
||||
|
||||
.alert-success {
|
||||
color: #468847;
|
||||
background-color: #dff0d8;
|
||||
border-color: #d6e9c6;
|
||||
}
|
||||
|
||||
.alert-warning {
|
||||
color: black;
|
||||
background-color: orange;
|
||||
border-color: #d6e9c6;
|
||||
}
|
||||
|
||||
.alert-error {
|
||||
color: #b94a48;
|
||||
background-color: #f2dede;
|
||||
border-color: #eed3d7;
|
||||
}
|
||||
|
||||
.img-avatar {
|
||||
border: 2px solid white;
|
||||
border-radius: 50px;
|
||||
float: left;
|
||||
margin: 0 auto;
|
||||
margin-top: -7px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#main-navbar {
|
||||
margin-top: 2%;
|
||||
}
|
||||
|
||||
#map {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
width: 100%;
|
||||
height: 450px;
|
||||
}
|
||||
|
||||
#call2action {
|
||||
margin-top: 240px;
|
||||
height: 88px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.img-gs-front {
|
||||
width: 200px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.gs-front-data {
|
||||
float: right;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.gs-front-line {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#navbar-logo {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
#call2action .btn-lg {
|
||||
margin-left: 30px;
|
||||
margin-top: -8px;
|
||||
}
|
||||
|
||||
.axis path,
|
||||
.axis line {
|
||||
fill: none;
|
||||
stroke: black;
|
||||
shape-rendering: crispEdges;
|
||||
}
|
||||
|
||||
.axis text {
|
||||
font-family: sans-serif;
|
||||
font-size: 10px;
|
||||
}
|
||||
.timeline-label {
|
||||
font-family: sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#timeline2 .axis {
|
||||
transform: translate(0px,30px);
|
||||
-ms-transform: translate(0px,30px); /* IE 9 */
|
||||
-webkit-transform: translate(0px,30px); /* Safari and Chrome */
|
||||
-o-transform: translate(0px,30px); /* Opera */
|
||||
-moz-transform: translate(0px,30px); /* Firefox */
|
||||
}
|
||||
|
||||
.coloredDiv {
|
||||
height:20px; width:20px; float:left;
|
||||
}
|
||||
|
||||
.playpause {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.edit-profile-buttons {
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.notice {
|
||||
text-align: center;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.calculation-result {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#map-station {
|
||||
margin-top: 2%;
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.station-view-image {
|
||||
width: 200px;
|
||||
float: right;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.station-edit-image {
|
||||
width: 200px;
|
||||
float: right;
|
||||
}
|
|
@ -1,143 +0,0 @@
|
|||
/* line 5, ../sass/project.scss */
|
||||
.alert-debug {
|
||||
color: black;
|
||||
background-color: white;
|
||||
border-color: #d6e9c6;
|
||||
}
|
||||
|
||||
/* line 11, ../sass/project.scss */
|
||||
.alert-info {
|
||||
color: #3a87ad;
|
||||
background-color: #d9edf7;
|
||||
border-color: #bce8f1;
|
||||
}
|
||||
|
||||
/* line 17, ../sass/project.scss */
|
||||
.alert-success {
|
||||
color: #468847;
|
||||
background-color: #dff0d8;
|
||||
border-color: #d6e9c6;
|
||||
}
|
||||
|
||||
/* line 23, ../sass/project.scss */
|
||||
.alert-warning {
|
||||
color: black;
|
||||
background-color: orange;
|
||||
border-color: #d6e9c6;
|
||||
}
|
||||
|
||||
/* line 29, ../sass/project.scss */
|
||||
.alert-error {
|
||||
color: #b94a48;
|
||||
background-color: #f2dede;
|
||||
border-color: #eed3d7;
|
||||
}
|
||||
|
||||
.img-avatar {
|
||||
border: 2px solid white;
|
||||
border-radius: 50px;
|
||||
float: left;
|
||||
margin: 0 auto;
|
||||
margin-top: -7px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#main-navbar {
|
||||
margin-top: 2%;
|
||||
}
|
||||
|
||||
#map {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
width: 100%;
|
||||
height: 450px;
|
||||
}
|
||||
|
||||
#call2action {
|
||||
margin-top: 240px;
|
||||
height: 88px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.img-gs-front {
|
||||
width: 200px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.gs-front-data {
|
||||
float: right;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.gs-front-line {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
#navbar-logo {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
#call2action .btn-lg {
|
||||
margin-left: 30px;
|
||||
margin-top: -8px;
|
||||
}
|
||||
|
||||
.axis path,
|
||||
.axis line {
|
||||
fill: none;
|
||||
stroke: black;
|
||||
shape-rendering: crispEdges;
|
||||
}
|
||||
.axis text {
|
||||
font-family: sans-serif;
|
||||
font-size: 10px;
|
||||
}
|
||||
.timeline-label {
|
||||
font-family: sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
#timeline2 .axis {
|
||||
transform: translate(0px,30px);
|
||||
-ms-transform: translate(0px,30px); /* IE 9 */
|
||||
-webkit-transform: translate(0px,30px); /* Safari and Chrome */
|
||||
-o-transform: translate(0px,30px); /* Opera */
|
||||
-moz-transform: translate(0px,30px); /* Firefox */
|
||||
}
|
||||
.coloredDiv {
|
||||
height:20px; width:20px; float:left;
|
||||
}
|
||||
|
||||
.playpause {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.edit-profile-buttons {
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
.notice {
|
||||
text-align: center;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
.calculation-result {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#map-station {
|
||||
margin-top: 2%;
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.station-view-image {
|
||||
width: 200px;
|
||||
float: right;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.station-edit-image {
|
||||
width: 200px;
|
||||
float: right;
|
||||
}
|
|
@ -4,31 +4,30 @@ var map = L.mapbox.map('map', 'pierros.jbf6la1j',{
|
|||
}).setView([40, 0], 3);
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#successful a.toggle').click(function (e) {
|
||||
e.preventDefault()
|
||||
$(this).tab('show')
|
||||
})
|
||||
|
||||
$.ajax({
|
||||
url: "/api/stations/?format=json"
|
||||
}).done(function(data) {
|
||||
data.forEach(function(m) {
|
||||
L.mapbox.featureLayer({
|
||||
type: 'Feature',
|
||||
geometry: {
|
||||
type: 'Point',
|
||||
coordinates: [
|
||||
parseFloat(m.lng),
|
||||
parseFloat(m.lat)
|
||||
]
|
||||
},
|
||||
properties: {
|
||||
title: m.name,
|
||||
'marker-size': 'large',
|
||||
'marker-color': '#666',
|
||||
}
|
||||
}).addTo(map);
|
||||
});
|
||||
url: '/api/stations/?format=json'
|
||||
}).done(function(data) {
|
||||
data.forEach(function(m) {
|
||||
L.mapbox.featureLayer({
|
||||
type: 'Feature',
|
||||
geometry: {
|
||||
type: 'Point',
|
||||
coordinates: [
|
||||
parseFloat(m.lng),
|
||||
parseFloat(m.lat)
|
||||
]
|
||||
},
|
||||
properties: {
|
||||
title: m.name,
|
||||
'marker-size': 'large',
|
||||
'marker-color': '#666',
|
||||
}
|
||||
}).addTo(map);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,91 +1,77 @@
|
|||
$(function () {
|
||||
$('#datetimepicker-start').datetimepicker();
|
||||
$('#datetimepicker-start').data("DateTimePicker").setMinDate(moment().add(1,'h'));
|
||||
$('#datetimepicker-end').datetimepicker();
|
||||
$("#datetimepicker-start").on("dp.change",function (e) {
|
||||
//Setting minimum and maximum for end
|
||||
$('#datetimepicker-end').data("DateTimePicker").setMinDate(e.date);
|
||||
$('#datetimepicker-end').data("DateTimePicker").setMaxDate(moment(e.date).add(24, 'h'));
|
||||
});
|
||||
$('#datetimepicker-start').datetimepicker();
|
||||
$('#datetimepicker-start').data('DateTimePicker').setMinDate(moment().add(1,'h'));
|
||||
$('#datetimepicker-end').datetimepicker();
|
||||
$("#datetimepicker-start").on('dp.change',function (e) {
|
||||
//Setting minimum and maximum for end
|
||||
$('#datetimepicker-end').data('DateTimePicker').setMinDate(e.date);
|
||||
$('#datetimepicker-end').data('DateTimePicker').setMaxDate(moment(e.date).add(24, 'h'));
|
||||
});
|
||||
|
||||
$('#satellite-selection').change( function() {
|
||||
var norad = $(this).find(':selected').data("norad");
|
||||
$('#transponder-selection').prop("disabled", false);
|
||||
$('#transponder-selection option').hide();
|
||||
$('#transponder-selection option[data-satellite="'+norad+'"]').show().prop("selected", true);
|
||||
if($('#transponder-selection option:visible').length === 0) {
|
||||
$('#transponder-selection').prop("disabled", true);
|
||||
$('#transponder-selection option[id="no-transponder"]').show().prop("selected", true);
|
||||
}
|
||||
});
|
||||
$('#satellite-selection').change( function() {
|
||||
var norad = $(this).find(':selected').data('norad');
|
||||
$('#transponder-selection').prop('disabled', false);
|
||||
$('#transponder-selection option').hide();
|
||||
$('#transponder-selection option[data-satellite="'+norad+'"]').show().prop('selected', true);
|
||||
if($('#transponder-selection option:visible').length === 0) {
|
||||
$('#transponder-selection').prop('disabled', true);
|
||||
$('#transponder-selection option[id="no-transponder"]').show().prop('selected', true);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$( document ).ready( function(){
|
||||
$('#calculate-observation').click( function(){
|
||||
$('.calculation-result').show();
|
||||
var satellite = $('#satellite-selection').val();
|
||||
var start_time = $('#datetimepicker-start input').val();
|
||||
var end_time = $('#datetimepicker-end input').val();
|
||||
$('#calculate-observation').click( function(){
|
||||
$('.calculation-result').show();
|
||||
var satellite = $('#satellite-selection').val();
|
||||
var start_time = $('#datetimepicker-start input').val();
|
||||
var end_time = $('#datetimepicker-end input').val();
|
||||
|
||||
$.ajax({
|
||||
url: '/prediction_windows/'+satellite+'/'+start_time+'/'+end_time+'/'
|
||||
}).done(function(data) {
|
||||
var dc = 0; //Data counter
|
||||
var suggested_data = [];
|
||||
$.each(data, function( i,k ){
|
||||
label = k.id + " - " + k.name;
|
||||
var times = [];
|
||||
//console.log(k);
|
||||
$.each(k.window, function( m,n ){
|
||||
var starting_time = moment(n.start).valueOf();
|
||||
var ending_time = moment(n.end).valueOf();
|
||||
$('#windows-data').append('<input type="hidden" name="'+dc+'-starting_time" value="'+n.start+'">');
|
||||
$('#windows-data').append('<input type="hidden" name="'+dc+'-ending_time" value="'+n.end+'">');
|
||||
$('#windows-data').append('<input type="hidden" name="'+dc+'-station" value="'+k.id+'">');
|
||||
times.push({starting_time: starting_time, ending_time: ending_time})
|
||||
dc = dc +1;
|
||||
});
|
||||
suggested_data.push({label : label, times : times});
|
||||
//console.log(k);
|
||||
//console.log(k.name);
|
||||
$.ajax({
|
||||
url: '/prediction_windows/' + satellite + '/' + start_time + '/' + end_time + '/'
|
||||
}).done(function(data) {
|
||||
var dc = 0; //Data counter
|
||||
var suggested_data = [];
|
||||
$.each(data, function( i,k ){
|
||||
label = k.id + ' - ' + k.name;
|
||||
var times = [];
|
||||
$.each(k.window, function( m,n ){
|
||||
var starting_time = moment(n.start).valueOf();
|
||||
var ending_time = moment(n.end).valueOf();
|
||||
$('#windows-data').append('<input type="hidden" name="'+dc+'-starting_time" value="'+n.start+'">');
|
||||
$('#windows-data').append('<input type="hidden" name="'+dc+'-ending_time" value="'+n.end+'">');
|
||||
$('#windows-data').append('<input type="hidden" name="'+dc+'-station" value="'+k.id+'">');
|
||||
times.push({starting_time: starting_time, ending_time: ending_time})
|
||||
dc = dc +1;
|
||||
});
|
||||
suggested_data.push({label : label, times : times});
|
||||
});
|
||||
|
||||
$('#windows-data').append('<input type="hidden" name="total" value="'+dc+'">');
|
||||
timeline_init(start_time, end_time, suggested_data);
|
||||
});
|
||||
|
||||
$('#windows-data').append('<input type="hidden" name="total" value="'+dc+'">');
|
||||
/*data.each(function( index ){
|
||||
var data_groundstation = $(this).data('groundstation');
|
||||
var data_time_start = 1000 * $(this).data('start');
|
||||
var data_time_end = 1000 * $(this).data('end');
|
||||
observation_data.push({label : data_groundstation, times : [{starting_time: data_time_start, ending_time: data_time_end}]});
|
||||
});*/
|
||||
timeline_init(start_time, end_time, suggested_data);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function timeline_init( start, end, payload ){
|
||||
var start_time_timeline = moment(start).valueOf();
|
||||
var end_time_timeline = moment(end).valueOf();
|
||||
var start_time_timeline = moment(start).valueOf();
|
||||
var end_time_timeline = moment(end).valueOf();
|
||||
|
||||
$('#timeline').empty();
|
||||
$('#timeline').empty();
|
||||
|
||||
var chart = d3.timeline()
|
||||
.stack()
|
||||
.beginning(start_time_timeline)
|
||||
.ending(end_time_timeline)
|
||||
.hover(function (d, i, datum) {
|
||||
// d is the current rendering object
|
||||
// i is the index during d3 rendering
|
||||
// datum is the id object
|
||||
var div = $('#hoverRes');
|
||||
var colors = chart.colors();
|
||||
div.find('.coloredDiv').css('background-color', colors(i))
|
||||
div.find('#name').text(datum.label);
|
||||
})
|
||||
.margin({left:140, right:10, top:0, bottom:50})
|
||||
.tickFormat({format: d3.time.format("%H:%M"), tickTime: d3.time.minutes, tickInterval: 30, tickSize: 6})
|
||||
;
|
||||
var chart = d3.timeline()
|
||||
.stack()
|
||||
.beginning(start_time_timeline)
|
||||
.ending(end_time_timeline)
|
||||
.hover(function (d, i, datum) {
|
||||
var div = $('#hoverRes');
|
||||
var colors = chart.colors();
|
||||
div.find('.coloredDiv').css('background-color', colors(i))
|
||||
div.find('#name').text(datum.label);
|
||||
})
|
||||
.margin({left:140, right:10, top:0, bottom:50})
|
||||
.tickFormat({format: d3.time.format('%H:%M'), tickTime: d3.time.minutes, tickInterval: 30, tickSize: 6});
|
||||
|
||||
var svg = d3.select("#timeline").append("svg").attr("width", 1140)
|
||||
.datum(payload).call(chart);
|
||||
var svg = d3.select('#timeline').append('svg').attr('width', 1140)
|
||||
.datum(payload).call(chart);
|
||||
}
|
||||
|
|
|
@ -1,52 +1,46 @@
|
|||
// Timeline loading
|
||||
|
||||
observation_start = 1000 * $('#observation-info').data('start');
|
||||
observation_end = 1000 * $('#observation-info').data('end');
|
||||
|
||||
var observation_data = [];
|
||||
|
||||
$('.observation-data').each(function( index ){
|
||||
var data_groundstation = $(this).data('groundstation');
|
||||
var data_time_start = 1000 * $(this).data('start');
|
||||
var data_time_end = 1000 * $(this).data('end');
|
||||
observation_data.push({label : data_groundstation, times : [{starting_time: data_time_start, ending_time: data_time_end}]});
|
||||
var data_groundstation = $(this).data('groundstation');
|
||||
var data_time_start = 1000 * $(this).data('start');
|
||||
var data_time_end = 1000 * $(this).data('end');
|
||||
observation_data.push({label : data_groundstation, times : [{starting_time: data_time_start, ending_time: data_time_end}]});
|
||||
});
|
||||
|
||||
var chart = d3.timeline()
|
||||
.stack()
|
||||
.beginning(observation_start)
|
||||
.ending(observation_end)
|
||||
.hover(function (d, i, datum) {
|
||||
// d is the current rendering object
|
||||
// i is the index during d3 rendering
|
||||
// datum is the id object
|
||||
var div = $('#hoverRes');
|
||||
var colors = chart.colors();
|
||||
div.find('.coloredDiv').css('background-color', colors(i))
|
||||
div.find('#name').text(datum.label);
|
||||
})
|
||||
.margin({left:140, right:10, top:0, bottom:50})
|
||||
.tickFormat({format: d3.time.format("%H:%M"), tickTime: d3.time.minutes, tickInterval: 30, tickSize: 6})
|
||||
;
|
||||
.stack()
|
||||
.beginning(observation_start)
|
||||
.ending(observation_end)
|
||||
.hover(function (d, i, datum) {
|
||||
var div = $('#hoverRes');
|
||||
var colors = chart.colors();
|
||||
div.find('.coloredDiv').css('background-color', colors(i))
|
||||
div.find('#name').text(datum.label);
|
||||
})
|
||||
.margin({left:140, right:10, top:0, bottom:50})
|
||||
.tickFormat({format: d3.time.format("%H:%M"), tickTime: d3.time.minutes, tickInterval: 30, tickSize: 6});
|
||||
|
||||
var svg = d3.select("#timeline").append("svg").attr("width", 1140)
|
||||
.datum(observation_data).call(chart);
|
||||
.datum(observation_data).call(chart);
|
||||
|
||||
// Waveform loading
|
||||
$('.observation-data').each(function( index ){
|
||||
var wavesurfer = Object.create(WaveSurfer);
|
||||
var data_payload_url = $(this).data('payload');
|
||||
var container_el = '#data-' + $(this).data('id');
|
||||
var wavesurfer = Object.create(WaveSurfer);
|
||||
var data_payload_url = $(this).data('payload');
|
||||
var container_el = '#data-' + $(this).data('id');
|
||||
|
||||
wavesurfer.init({
|
||||
container: container_el,
|
||||
waveColor: '#bf7fbf',
|
||||
progressColor: 'purple'
|
||||
});
|
||||
wavesurfer.init({
|
||||
container: container_el,
|
||||
waveColor: '#bf7fbf',
|
||||
progressColor: 'purple'
|
||||
});
|
||||
|
||||
$(this).find('.playpause').click( function(){
|
||||
wavesurfer.playPause();
|
||||
});
|
||||
$(this).find('.playpause').click( function(){
|
||||
wavesurfer.playPause();
|
||||
});
|
||||
|
||||
wavesurfer.load(data_payload_url);
|
||||
wavesurfer.load(data_payload_url);
|
||||
});
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
$(document).ready(function() {
|
||||
//Reading data for station
|
||||
// Reading data for station
|
||||
var station_info = $('#station-info').data();
|
||||
|
||||
//Init the map
|
||||
// Init the map
|
||||
L.mapbox.accessToken = 'pk.eyJ1IjoicGllcnJvcyIsImEiOiJhTVZyWmE4In0.kl2j9fi24LDXfB3MNdN76w';
|
||||
var map = L.mapbox.map('map-station', 'pierros.jbf6la1j',{
|
||||
zoomControl: false
|
||||
}).setView([station_info.lat, station_info.lng], 6);
|
||||
|
||||
//Add a marker
|
||||
// Add a marker
|
||||
L.mapbox.featureLayer({
|
||||
type: 'Feature',
|
||||
geometry: {
|
||||
|
|
Loading…
Reference in New Issue