fix icon placement in editable device port cells

This commit is contained in:
Oliver Gorwits
2014-01-13 00:38:18 +00:00
parent 25292e1ce8
commit 5557811aeb
3 changed files with 15 additions and 8 deletions

View File

@@ -158,9 +158,14 @@ div.content > div.tab-content table.nd_floatinghead thead {
/* nudge cell content to the right when port_control controls are enabled */
.nd_editable-cell > .nd_this-port-only {
margin-left: 18px;
margin-right: 18px;
}
.nd_editable-cell > .nd_port-only-first {
margin-left: 9px;
}
.nd_editable-cell > .nd_editable-cell-content {
margin-left: 18px;
margin-right: 18px;
}
.table .nd_nudge-for-icon {
padding-left: 25px;
@@ -265,7 +270,7 @@ td > form.nd_inline-form {
cursor: pointer;
color: black;
float: left;
display: none;
visibility: hidden;
margin-top: 3px;
}
.nd_log-icon:hover, .nd_log-icon:focus {

View File

@@ -92,14 +92,16 @@ $(document).ready(function() {
// toggle visibility of port up/down and edit controls
$('.tab-content').on('mouseenter', '.nd_editable-cell', function() {
$(this).children('.nd_hand-icon,.nd_log-icon').show();
$(this).children('.nd_hand-icon').show();
$(this).children('.nd_log-icon').css('visibility', 'visible');
if (! $(this).is(':focus')) {
$(this).children('.nd_edit-icon').show(); // ports
$(this).siblings('td').find('.nd_device-details-edit').show(); // details
}
});
$('.tab-content').on('mouseleave', '.nd_editable-cell', function() {
$(this).children('.nd_hand-icon,.nd_log-icon').hide();
$(this).children('.nd_hand-icon').hide();
$(this).children('.nd_log-icon').css('visibility', 'hidden');
if (! $(this).is(':focus')) {
$(this).children('.nd_edit-icon').hide(); // ports
$(this).siblings('td').find('.nd_device-details-edit').hide(); // details

View File

@@ -75,11 +75,11 @@
[% ELSE %]
<td nowrap>
[% END %]
[% IF row.is_master %]
<small><i class="icon-group muted"></i></small>
[% END %]
<a class="nd_this-port-only" href="[% uri_for('/device',
<a class="nd_this-port-only nd_port-only-first" href="[% uri_for('/device',
self_options) %]&q=[% params.q | uri %]&f=[% row.port | uri %]&prefer=port">
[% IF row.is_master %]
<small><i class="icon-group muted"></i></small>&nbsp;
[% END %]
[% row.port | html_entity %]</a>
[% IF row.slave_of %]<br/>
<a class="nd_this-port-only" href="[% uri_for('/device',