UI polish

pull/3/head
cTn 11 years ago
parent 7981bbea4e
commit 7dbd4bac82

@ -3,7 +3,7 @@
border-collapse: collapse; border-collapse: collapse;
} }
.tab-pid_tuning table, .tab-pid_tuning table th, .tab-pid_tuning table td { .tab-pid_tuning table, .tab-pid_tuning table th, .tab-pid_tuning table td {
padding: 5px; padding: 4px;
border: 1px solid #8b8b8b; border: 1px solid #8b8b8b;
} }
.tab-pid_tuning table tr:nth-child(odd) { .tab-pid_tuning table tr:nth-child(odd) {
@ -24,27 +24,19 @@
margin-top: 20px; margin-top: 20px;
width: 120px; height: 28px;
height: 56px; line-height: 28px;
line-height: 56px;
padding: 0 15px 0 15px;
font-size: 14px;
color: white;
text-align: center; text-align: center;
font-weight: bold;
border: 1px solid silver; border: 1px solid silver;
background-color: #ececec;
background-color: #6f1515;
} }
.tab-pid_tuning .update:hover { .tab-pid_tuning .update:hover {
cursor: default; background-color: #dedcdc;
}
.tab-pid_tuning .update.active {
background-color: #0fab16;
}
.tab-pid_tuning .update.active:hover {
cursor: pointer;
background-color: #13d81d;
} }
.tab-pid_tuning .rate-tpa { .tab-pid_tuning .rate-tpa {
float: left; float: left;

@ -137,13 +137,8 @@ function tab_initialize_pid_tuning() {
$('.rate-tpa input[name="tpa"]').val(RC_tuning.dynamic_THR_PID.toFixed(2)); $('.rate-tpa input[name="tpa"]').val(RC_tuning.dynamic_THR_PID.toFixed(2));
// UI Hooks // UI Hooks
$('.pid_tuning input, .rate-tpa input').change(function() {
// if any of the fields changed, unlock update button
$('a.update').addClass('active');
});
$('a.update').click(function() { $('a.update').click(function() {
if ($(this).hasClass('active')) {
// Catch all the changes and stuff the inside PIDs array // Catch all the changes and stuff the inside PIDs array
var needle_main = 0; var needle_main = 0;
var needle_secondary = 0; var needle_secondary = 0;
@ -223,10 +218,6 @@ function tab_initialize_pid_tuning() {
// Save changes to EEPROM // Save changes to EEPROM
send_message(MSP_codes.MSP_EEPROM_WRITE, MSP_codes.MSP_EEPROM_WRITE); send_message(MSP_codes.MSP_EEPROM_WRITE, MSP_codes.MSP_EEPROM_WRITE);
// remove the active status
$(this).removeClass('active');
}
}); });
// enable data pulling // enable data pulling

Loading…
Cancel
Save