Skip to content

Commit ad79fbc

Browse files
authored
Merge pull request #569 from ctzsnooze/adjust-header-dialog-information-to-fit
fir header dialog information into min width
2 parents edfabef + 3eb7d37 commit ad79fbc

File tree

5 files changed

+24
-22
lines changed

5 files changed

+24
-22
lines changed

css/header_dialog.css

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ select {
100100
font-family: 'open_sanssemibold', Arial, serif;
101101
}
102102

103+
.h5 {
104+
color: red;
105+
margin: 0;
106+
}
107+
103108
/* Spacers */
104109
.spacer {
105110
padding-left: 7px;
@@ -125,14 +130,14 @@ select {
125130

126131
/* space around each div*/
127132
.spacer_left {
128-
padding-left: 15px;
133+
padding-left: 0px;
129134
float: left;
130-
width: calc(100% - 15px);
135+
width: calc(100%);
131136
}
132137

133138
.spacer_right {
134-
padding-right: 15px;
135-
width: calc(100% - 15px);
139+
padding-right: 5px;
140+
width: calc(100% - 5px);
136141
float: left;
137142
}
138143

@@ -176,7 +181,7 @@ select {
176181

177182
.header-dialog .modal-dialog {
178183
width:75%;
179-
min-width:954px;
184+
min-width:850px;
180185
}
181186

182187
.header-dialog .cf th {

index.html

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ <h4>Field values</h4>
627627
</button>
628628
<h4 class="modal-title">Configure graphs</h4>
629629
</div>
630-
<div class="modal-body">
630+
<div class="modal-body" padding-left:5px;>
631631
<div class="btn-group">
632632
<button type="button" class="btn btn-primary dropdown-toggle config-graphs-add" data-toggle="dropdown" aria-expanded="false">
633633
<span class="glyphicon glyphicon-plus"></span> Add graph
@@ -655,14 +655,11 @@ <h4 class="modal-title">Configure graphs</h4>
655655
<div class="modal-dialog">
656656
<div class="modal-content">
657657
<div class="modal-header">
658-
<button type="button" class="close" data-dismiss="modal" aria-label="Close" data-toggle="tooltip" title="Close without saving changes">
658+
<button type="button" class="close" data-dismiss="modal" aria-label="Close" data-toggle="tooltip" title="Close">
659659
<span aria-hidden="true">&times;</span>
660660
</button>
661-
<h4 class="modal-title">Log Header Information</h4>
662-
<h5 class="modal-title-revision"></h5>
663-
<h5 class="modal-title-board-info"></h5>
664-
<h5 class="modal-title-date"></h5>
665661
<h5 class="modal-title-craft"></h5>
662+
<h5 class="modal-title-revision"></h5>
666663
</div>
667664
<div class="modal-body">
668665
<form name="header-information" id="pid-tuning">
@@ -690,19 +687,19 @@ <h5 class="modal-title-craft"></h5>
690687
<label>&nbsp</label>
691688
</th>
692689
<th name="Proportional">
693-
<label>Proportional</label>
690+
<label>P</label>
694691
</th>
695692
<th name="Integral">
696-
<label>Integral</label>
693+
<label>I</label>
697694
</th>
698695
<th name="D_Max">
699696
<label>D_Max</label>
700697
</th>
701698
<th name="Derivative">
702-
<label>Derivative</label>
699+
<label>D</label>
703700
</th>
704701
<th name="Feedforward">
705-
<label>Feedforward</label>
702+
<label>FF</label>
706703
</th>
707704
</tr>
708705
<tr class="rollPID">
@@ -941,7 +938,7 @@ <h5 class="modal-title-craft"></h5>
941938
<input type="text" step="0.01" min="0" max="999" />
942939
</td>
943940
<td name="feedforwardAveraging" class="bf-only">
944-
<label>Averaging</label>
941+
<label>Avgerage</label>
945942
<select>
946943
<!~~ list generated here ~~>
947944
</select>
@@ -1634,7 +1631,7 @@ <h5 class="modal-title-craft"></h5>
16341631
<input type="text" step="0.01" min="0" max="999.00" />
16351632
</td>
16361633
<td name="gyro_notch_cutoff">
1637-
<label>Notch 1 Cutoff</label>
1634+
<label>Notch1 Cutoff</label>
16381635
<input type="text" step="0.1" min="0" max="999.00" />
16391636
</td>
16401637
<td name='gyro_notch_hz_2'>

js/header_dialog.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,10 +511,10 @@ function HeaderDialog(dialog, onSave) {
511511

512512
// Update the log header
513513

514-
$('h5.modal-title-revision').text((sysConfig['Firmware revision'] != null) ? ` Rev : ${sysConfig['Firmware revision']}` : '');
514+
$('h5.modal-title-craft').text((sysConfig['Craft name'] != null) ? ` ${sysConfig['Craft name']}` : '');
515+
// $('h5.modal-title-date').text((sysConfig['Firmware date'] != null) ? ` ${sysConfig['Firmware date']}` : '');
516+
$('h5.modal-title-revision').text(((sysConfig['Firmware revision'] != null) ? ` ${sysConfig['Firmware revision']}` : '') + ' - ' + ((sysConfig['Firmware date'] != null) ? ` ${sysConfig['Firmware date']}` : ''));
515517
$('h5.modal-title-board-info').text((sysConfig['Board information'] != null) ? ` Board : ${sysConfig['Board information']}` : '');
516-
$('h5.modal-title-date').text((sysConfig['Firmware date'] != null) ? ` Date : ${sysConfig['Firmware date']}` : '');
517-
$('h5.modal-title-craft').text((sysConfig['Craft name'] != null) ? ` Name : ${sysConfig['Craft name']}` : '');
518518

519519
switch(sysConfig.firmwareType) {
520520
case FIRMWARE_TYPE_BETAFLIGHT:

js/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const NEW_WINDOW_HEIGHT = 760;
1212

1313
// these values set the minimum resize dimensions of a secondary window
1414
// minimum resize dimensions of the initial window are set in package.json
15-
const INNER_BOUNDS_WIDTH = 740;
15+
const INNER_BOUNDS_WIDTH = 930;
1616
const INNER_BOUNDS_HEIGHT = 480;
1717

1818
const INITIAL_APP_PAGE = "index.html";

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"id": "main",
1616
"show": true,
1717
"icon": "images/bf_icon_128.png",
18-
"min_width": 740,
18+
"min_width": 930,
1919
"min_height": 480
2020
},
2121
"repository": {

0 commit comments

Comments
 (0)