enabling spinners in all spinner required tabs

10.3.x-maintenance
cTn 2014-01-22 16:03:14 +01:00
parent 0b40722cdc
commit 996b81b53f
6 changed files with 58 additions and 3 deletions

View File

@ -1,3 +1,21 @@
.tab-pid_tuning {
}
.tab-pid_tuning .spinner {
float: right;
width: 16px;
height: 20px;
background-image: url('../images/arrows.png');
background-repeat: no-repeat;
background-color: white;
}
.tab-pid_tuning .spinner .up {
height: 10px;
}
.tab-pid_tuning .spinner .down {
height: 10px;
}
.tab-pid_tuning table { .tab-pid_tuning table {
float: left; float: left;

View File

@ -2,6 +2,9 @@ function tab_initialize_pid_tuning() {
ga_tracker.sendAppView('PID Tuning'); ga_tracker.sendAppView('PID Tuning');
GUI.active_tab = 'pid_tuning'; GUI.active_tab = 'pid_tuning';
// enable custom spinners
add_custom_spinners();
send_message(MSP_codes.MSP_PID, MSP_codes.MSP_PID, false, function() { send_message(MSP_codes.MSP_PID, MSP_codes.MSP_PID, false, function() {
send_message(MSP_codes.MSP_RC_TUNING, MSP_codes.MSP_RC_TUNING, false, function() { send_message(MSP_codes.MSP_RC_TUNING, MSP_codes.MSP_RC_TUNING, false, function() {
// Fill in the data from PIDs array // Fill in the data from PIDs array

View File

@ -1,5 +1,19 @@
.tab-receiver { .tab-receiver {
} }
.tab-receiver .spinner {
float: right;
width: 15px;
height: 20px;
background-image: url('../images/arrows.png');
background-repeat: no-repeat;
}
.tab-receiver .spinner .up {
height: 10px;
}
.tab-receiver .spinner .down {
height: 10px;
}
.tab-receiver .bars { .tab-receiver .bars {
float: left; float: left;
} }

View File

@ -2,6 +2,9 @@ function tab_initialize_receiver() {
ga_tracker.sendAppView('Receiver Page'); ga_tracker.sendAppView('Receiver Page');
GUI.active_tab = 'receiver'; GUI.active_tab = 'receiver';
// enable custom spinners
add_custom_spinners();
send_message(MSP_codes.MSP_RC_TUNING, MSP_codes.MSP_RC_TUNING, false, function() { send_message(MSP_codes.MSP_RC_TUNING, MSP_codes.MSP_RC_TUNING, false, function() {
// fill in data from RC_tuning // fill in data from RC_tuning
$('.tunings .throttle input[name="mid"]').val(RC_tuning.throttle_MID.toFixed(2)); $('.tunings .throttle input[name="mid"]').val(RC_tuning.throttle_MID.toFixed(2));

View File

@ -1,3 +1,19 @@
.tab-servos {
}
.tab-servos .spinner {
float: right;
width: 15px;
height: 20px;
background-image: url('../images/arrows.png');
background-repeat: no-repeat;
}
.tab-servos .spinner .up {
height: 10px;
}
.tab-servos .spinner .down {
height: 10px;
}
.tab-servos .supported_wrapper, .tab-servos .supported_wrapper,
.tab-servos .direction_wrapper { .tab-servos .direction_wrapper {
display: none; display: none;
@ -44,8 +60,6 @@
width: 65px; width: 65px;
height: 20px; height: 20px;
padding-right: 5px;
line-height: 20px; line-height: 20px;
text-align: right; text-align: right;

View File

@ -103,6 +103,9 @@ function tab_initialize_servos() {
} }
} }
// enable custom spinners
add_custom_spinners();
// UI hooks for dynamically generated elements // UI hooks for dynamically generated elements
$('table.directions select, table.directions input, table.fields select, table.fields input').change(function() { $('table.directions select, table.directions input, table.fields select, table.fields input').change(function() {
if ($('div.live input').is(':checked')) { if ($('div.live input').is(':checked')) {