Skip to content

Commit

Permalink
Issue #61 - Adding tool tip to fieldname
Browse files Browse the repository at this point in the history
  • Loading branch information
aywaldron committed Nov 29, 2018
1 parent 90df535 commit 76842e9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions ait/gui/static/css/ait/gui/Field.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ ait-field {
cursor: pointer;
}

ait-field name {
font-weight: bold;
}

ait-field[disable-tlm-popover] {
cursor: default;
}
Expand Down
10 changes: 5 additions & 5 deletions ait/gui/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,10 @@
<div class="col-sm-6">
<h4 class="telem-group-title">1553 HS Voltages</h4>
<table class="telem col2">
<tr> <td> Voltage_A: <ait-field packet="1553_HS_Packet" name="Voltage_A"></ait-field>
<td> Voltage_B: <ait-field packet="1553_HS_Packet" name="Voltage_B"></ait-field>
<tr> <td> Voltage_C: <ait-field packet="1553_HS_Packet" name="Voltage_C"></ait-field>
<td> Voltage_D: <ait-field packet="1553_HS_Packet" name="Voltage_D"></ait-field>
<tr> <td><ait-field packet="1553_HS_Packet" name="Voltage_A" display_name="Voltage_A"></ait-field>
<td><ait-field packet="1553_HS_Packet" name="Voltage_B" display_name="Voltage_B"></ait-field>
<tr> <td><ait-field packet="1553_HS_Packet" name="Voltage_C" display_name="Voltage_C"></ait-field>
<td><ait-field packet="1553_HS_Packet" name="Voltage_D" display_name="Voltage_D"></ait-field>
</table>

<br />
Expand All @@ -129,7 +129,7 @@ <h4 class="telem-group-title">1553 HS Voltages</h4>
<div class="col-sm-6">
<h4 class="telem-group-title">1553 HS Currents</h4>
<table class="telem col2">
<tr> <td> Current_A: <ait-field packet="1553_HS_Packet" name="Current_A"></ait-field>
<tr> <td><ait-field packet="1553_HS_Packet" name="Current_A" display_name="Current_A"></ait-field>
</table>

<br />
Expand Down
4 changes: 3 additions & 1 deletion ait/gui/static/js/ait/gui/Field.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ const Field =
// Mithril lifecycle method
oninit (vnode) {
this._fname = vnode.attrs.name
this._dname = vnode.attrs.display_name
this._pname = vnode.attrs.packet
this._raw = vnode.attrs.raw === true
this._cached = { packet: null, val: null }
Expand Down Expand Up @@ -363,7 +364,8 @@ const Field =
}
}

return m('ait-field', vnode.attrs, value)
return m('ait-field', vnode.attrs, [m('name', this._dname + ': '),
m('value', value)])
}
}

Expand Down

0 comments on commit 76842e9

Please sign in to comment.