mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 22:05:17 +03:00
adding auto-connect text, style, tooltip
This commit is contained in:
parent
510af4e54e
commit
353b591c70
3 changed files with 12 additions and 6 deletions
|
@ -88,11 +88,16 @@ a:hover {
|
||||||
#port-picker a.connect.active:hover {
|
#port-picker a.connect.active:hover {
|
||||||
background-color: #13d81d;
|
background-color: #13d81d;
|
||||||
}
|
}
|
||||||
#port-picker .auto_connect {
|
#port-picker input.auto_connect {
|
||||||
position: absolute;
|
float: left;
|
||||||
|
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
}
|
}
|
||||||
|
#port-picker span.auto_connect {
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
margin: 3px 0 0 5px;
|
||||||
|
}
|
||||||
#sensor-status {
|
#sensor-status {
|
||||||
float: right;
|
float: right;
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ $(document).ready(function() {
|
||||||
GUI.auto_connect = true;
|
GUI.auto_connect = true;
|
||||||
|
|
||||||
$('input.auto_connect').prop('checked', true);
|
$('input.auto_connect').prop('checked', true);
|
||||||
$('input.auto_connect').prop('title', 'Auto-Connect: Enabled - Configurator automatically tries to connect when new serial port is detected');
|
$('input.auto_connect, span.auto_connect').prop('title', 'Auto-Connect: Enabled - Configurator automatically tries to connect when new serial port is detected');
|
||||||
|
|
||||||
$('select#baud').val(115200).prop('disabled', true);
|
$('select#baud').val(115200).prop('disabled', true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -162,7 +162,7 @@ $(document).ready(function() {
|
||||||
GUI.auto_connect = false;
|
GUI.auto_connect = false;
|
||||||
|
|
||||||
$('input.auto_connect').prop('checked', false);
|
$('input.auto_connect').prop('checked', false);
|
||||||
$('input.auto_connect').prop('title', 'Auto-Connect: Disabled - User needs to select the correct serial port and click "Connect" button on its own');
|
$('input.auto_connect, span.auto_connect').prop('title', 'Auto-Connect: Disabled - User needs to select the correct serial port and click "Connect" button on its own');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,11 +172,11 @@ $(document).ready(function() {
|
||||||
|
|
||||||
// update title/tooltip
|
// update title/tooltip
|
||||||
if (GUI.auto_connect) {
|
if (GUI.auto_connect) {
|
||||||
$('input.auto_connect').prop('title', 'Auto-Connect: Enabled - Configurator automatically tries to connect when new port is detected');
|
$('input.auto_connect, span.auto_connect').prop('title', 'Auto-Connect: Enabled - Configurator automatically tries to connect when new port is detected');
|
||||||
|
|
||||||
$('select#baud').val(115200).prop('disabled', true);
|
$('select#baud').val(115200).prop('disabled', true);
|
||||||
} else {
|
} else {
|
||||||
$('input.auto_connect').prop('title', 'Auto-Connect: Disabled - User needs to select the correct serial port and click "Connect" button on its own');
|
$('input.auto_connect, span.auto_connect').prop('title', 'Auto-Connect: Disabled - User needs to select the correct serial port and click "Connect" button on its own');
|
||||||
|
|
||||||
if (!GUI.connected_to && !GUI.connecting_to) $('select#baud').prop('disabled', false);
|
if (!GUI.connected_to && !GUI.connecting_to) $('select#baud').prop('disabled', false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,6 +71,7 @@
|
||||||
<li>
|
<li>
|
||||||
<a class="connect" href="#" title="">Connect</a>
|
<a class="connect" href="#" title="">Connect</a>
|
||||||
<input class="auto_connect" type="checkbox" title="Auto-Connect" checked="checked"/>
|
<input class="auto_connect" type="checkbox" title="Auto-Connect" checked="checked"/>
|
||||||
|
<span class="auto_connect">Auto-Connect</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue