1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-13 11:29:53 +03:00
This commit is contained in:
cTn 2013-04-12 19:17:27 +02:00
parent e1c1522da5
commit ac1090b4a4
6 changed files with 207 additions and 73 deletions

View file

@ -1,7 +1,7 @@
var timers = new Array();
$(document).ready(function() {
var tabs = $('#tabs > ul');
tabs = $('#tabs > ul');
$('a', tabs).click(function() {
if ($(this).parent().hasClass('active') == false) { // only initialize when the tab isn't already active
if (connectionId < 1) { // if there is no active connection, return
@ -11,6 +11,11 @@ $(document).ready(function() {
// Disable any active "data pulling" timer
disable_timers();
// Disable CLI (there is no "nicer way of doing so right now)
if (CLI_active == true) {
leave_CLI();
}
// Disable previous active button
$('li', tabs).removeClass('active');
@ -29,12 +34,15 @@ $(document).ready(function() {
$('#content').load("./tabs/motor_outputs.html", tab_initialize_motor_outputs);
} else if ($(this).parent().hasClass('tab_sensors')) {
$('#content').load("./tabs/sensors.html", tab_initialize_sensors);
} else if ($(this).parent().hasClass('tab_cli')) {
$('#content').load("./tabs/cli.html", tab_initialize_cli);
}
}
});
// temporary
//$('#content').load("./tabs/initial_setup.html", tab_initialize_initial_setup);
//$('#content').load("./tabs/cli.html", tab_initialize_cli);
});
function disable_timers() {