Servos Tab rework + small fix for Flasher Tab

10.3.x-maintenance
skaman82 2015-11-08 13:56:01 +01:00
parent e02aae80af
commit fb298047f7
5 changed files with 133 additions and 65 deletions

View File

@ -860,7 +860,7 @@
"message": "Direction and rate"
},
"servosLiveMode": {
"message": "Enable Live mode:"
"message": "Enable Live mode"
},
"servosButtonSave": {
"message": "Save"

View File

@ -108,7 +108,7 @@
</div>
<div class="content_toolbar">
<div class="btn"><a class="load_file" href="#" i18n="firmwareFlasherButtonLoadLocal"></a></div>
<div class="btn"><a class="load_remote_file locked" href="#" i18n="firmwareFlasherButtonLoadOnline"></a></div>
<div class="btn"><a class="flash_firmware locked" href="#" i18n="firmwareFlasherFlashFirmware"></a></div>
<div class="btn"><a class="load_remote_file disabled" href="#" i18n="firmwareFlasherButtonLoadOnline"></a></div>
<div class="btn"><a class="flash_firmware disabled" href="#" i18n="firmwareFlasherFlashFirmware"></a></div>
</div>
</div>

View File

@ -1,62 +1,121 @@
.tab-servos {
}
.tab-servos input[type="number"]::-webkit-inner-spin-button {
border: 0;
}
.tab-servos .title {
margin-top: 0px;
line-height: 30px;
text-align: center;
font-weight: bold;
border: 1px solid #8b8b8b;
border: 1px solid #e4e4e4;
border-bottom: 0;
background-color: #ececec;
background-color: #DADADA;
color: #797979;
border-top-right-radius:5px;
border-top-left-radius:5px;
}
.tab-servos table {
margin-bottom: 10px;
width:100%;
border-collapse:collapse;
}
.tab-servos table,
.tab-servos table th,
.tab-servos table td {
border-left:0px;
border-right:0px;
border-top:0px;
}
.tab-servos input[type="number"]::-webkit-inner-spin-button {
border: 0;
}
.tab-servos table.directions td.direction select {
height: 19px;
line-height: 19px;
}
.tab-servos table {
width: 100%;
border-collapse: collapse;
}
.tab-servos table th {
line-height: 20px;
text-align: center;
border: 1px solid #8b8b8b;
.tab-servos table th {
padding-top:3px;
padding-bottom:3px;
text-align: center;
border: 1px solid #e4e4e4;
}
.tab-servos table td {
padding: 1px;
border: 1px solid #8b8b8b;
border-bottom:1px solid #e4e4e4;
padding-top:6px;
padding-bottom:7px;
padding-left:5px;
padding-right:5px;
border-left:1px solid #e4e4e4;
border-right:1px solid #e4e4e4;
}
.tab-servos table tr:nth-child(even) {
background-color:#f9f9f9;
}
.tab-servos table tr:first-child {
border-left:1px solid #e4e4e4;
border-right:1px solid #e4e4e4;
background-color: #828885;
color: #FFF;
line-height: 14px;
}
.tab-servos table td:nth-child(2) {
width:140px;
}
.tab-servos table td:nth-child(3) {
width:140px;
}
.tab-servos table td:nth-child(4) {
width:140px;
}
.tab-servos table td:nth-child(19) {
width:110px;
}
.tab-servos table .main {
font-weight: bold;
text-align: center;
background-color: #ececec;
}
.tab-servos table .channel {
width: 40px;
text-align: center;
}
.tab-servos table input {
border: 1px solid silver;
border-radius:3px;
}
.tab-servos table select {
border: 1px solid silver;
}
.tab-servos table .channel input {
vertical-align: middle;
}
.tab-servos table input[type="number"] {
display: block;
width: 100%;
height: 20px;
line-height: 20px;
text-align: right;
}
.tab-servos table .direction {
}
.tab-servos .direction .name {
float: left;
display: block;
@ -66,52 +125,61 @@
.tab-servos .direction .alternate {
float: left;
display: block;
width: 60px;
}
.tab-servos .direction .first {
float: left;
margin: 2px 10px 0 20px;
}
.tab-servos .direction .second {
float: left;
margin: 2px 10px 0 0;
}
.tab-servos .direction .rate {
width: 200px;
height: 20px;
.tab-servos .direction .rate {
width: 110px;
height: 20px;
text-align: center;
}
.tab-servos .live {
float: left;
margin-top: 10px;
margin-top: 0px;
}
.tab-servos .live span {
float: left;
}
.tab-servos .live input {
float: left;
margin: 0 0 0 5px;
}
.tab-servos .buttons {
width: calc(100% - 20px);
position: absolute;
bottom: 10px;
}
.tab-servos .require-support {
display:none;
}
.tab-servos.supported .require-support {
display:block;
}
.tab-servos .require-upgrade {
display:block;
}
.tab-servos.supported .require-upgrade {
display:none;
}
.tab-servos .live span {
margin-right:10px;
}

View File

@ -1,36 +1,36 @@
<div class="tab-servos toolbar_fixed_bottom">
<div class="content_wrapper">
<div class="tab_title" i18n="tabServos">Servos</div>
<div class="cf_doc_version_bt">
<a id="button-documentation" href="" target="_blank"></a>
</div>
<div class="require-support">
<div class="title" i18n="servosChangeDirection"></div>
<table class="fields">
<div class="content_wrapper">
<div class="tab_title" i18n="tabServos">Servos</div>
<div class="cf_doc_version_bt">
<a id="button-documentation" href="" target="_blank"></a>
</div>
<div class="require-support">
<div class="title" i18n="servosChangeDirection"></div>
<table class="fields">
<tr class="main">
<th width="200px" i18n="servosName"></th>
<th style="width: 120px" i18n="servosMid"></th>
<th style="width: 120px" i18n="servosMin"></th>
<th style="width: 120px" i18n="servosMax"></th>
<th style="width: 120px" i18n="servosAngleAtMin"></th>
<th style="width: 120px" i18n="servosAngleAtMax"></th>
<th style="width: 40px">CH1</th>
<th style="width: 40px">CH2</th>
<th style="width: 40px">CH3</th>
<th style="width: 40px">CH4</th>
<th width="110px" i18n="servosName"></th>
<th i18n="servosMid"></th>
<th i18n="servosMin"></th>
<th i18n="servosMax"></th>
<th style="width: 120px" i18n="servosAngleAtMin"></th>
<th style="width: 120px" i18n="servosAngleAtMax"></th>
<th style="width: 40px">CH1</th>
<th style="width: 40px">CH2</th>
<th style="width: 40px">CH3</th>
<th style="width: 40px">CH4</th>
</tr>
</table>
<div class="live">
</table>
<div class="live">
<input type="checkbox" id="toggle" /> <span i18n="servosLiveMode"></span>
</div>
</div>
<div class="note require-upgrade">
<div class="note_spacer">
<p i18n="servosFirmwareUpgradeRequired"></p>
</div>
</div>
</div>
<div class="content_toolbar">
<div class="btn save_btn"><a class="update" href="#" i18n="servosButtonSave"></a></div>
</div>
</div>
</div>
<div class="note require-upgrade">
<div class="note_spacer">
<p i18n="servosFirmwareUpgradeRequired"></p>
</div>
</div>
</div>
<div class="content_toolbar">
<div class="btn save_btn"><a class="update" href="#" i18n="servosButtonSave"></a></div>
</div>
</div>

View File

@ -60,7 +60,7 @@ TABS.servos.initialize = function (callback) {
<th >A' + (i+1) + '</th>\
';
}
servoHeader = servoHeader + '<th style="width: 200px" i18n="servosDirectionAndRate"></th>';
servoHeader = servoHeader + '<th style="width: 110px" i18n="servosDirectionAndRate"></th>';
for (var i = 0; i < RC.active_channels; i++) {
servoCheckbox = servoCheckbox + '\