1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 01:35:41 +03:00

polishing AUX ui

This commit is contained in:
cTn 2013-04-10 15:57:36 +02:00
parent 14ef72b7ea
commit 43228abb72
2 changed files with 10 additions and 1 deletions

View file

@ -412,6 +412,9 @@ a:hover {
/* padding-left: 5px; */ /* padding-left: 5px; */
text-align: center; text-align: center;
} }
.tab-auxiliary_configuration .boxes .on {
background-color: #0d8b13;
}
.tab-auxiliary_configuration .boxes td input { .tab-auxiliary_configuration .boxes td input {
position: absolute; position: absolute;

View file

@ -25,6 +25,12 @@ function tab_initialize_auxiliary_configuration() {
// UI Hooks // UI Hooks
$('.tab-auxiliary_configuration .boxes input').change(function() { $('.tab-auxiliary_configuration .boxes input').change(function() {
if($(this).is(':checked')) {
$(this).parent().addClass('on');
} else {
$(this).parent().removeClass('on');
}
// if any of the fields changed, unlock update button // if any of the fields changed, unlock update button
$('a.update').addClass('active'); $('a.update').addClass('active');
}); });
@ -70,7 +76,7 @@ function tab_initialize_auxiliary_configuration() {
function box_check(num, pos) { function box_check(num, pos) {
if (bit_check(num, pos)) { // 1 if (bit_check(num, pos)) { // 1
return '<td><input type="checkbox" checked="checked" /></td>'; return '<td class="on"><input type="checkbox" checked="checked" /></td>';
} else { // 0 } else { // 0
return '<td><input type="checkbox" /></td>'; return '<td><input type="checkbox" /></td>';
} }