remove thumb icons for edit submit
This commit is contained in:
@@ -95,7 +95,7 @@ body {
|
||||
|
||||
/* special placing for edit icon in details tab */
|
||||
.nd_device_details_edit {
|
||||
margin-left: -18px;
|
||||
float: right !important;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@@ -106,13 +106,6 @@ body {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* port admin VLAN control */
|
||||
.nd_thumb_icon {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* placement of port link when port admin hint is enabled */
|
||||
.nd_editable_cell > .nd_this_port_only {
|
||||
margin-left: 18px;
|
||||
@@ -121,11 +114,6 @@ body {
|
||||
margin-left: 18px;
|
||||
}
|
||||
|
||||
/* placement of thumb for editable submit */
|
||||
.center_cell > .nd_thumb_icon {
|
||||
margin-left: -18px;
|
||||
}
|
||||
|
||||
/* style of editable content in table */
|
||||
[contenteditable]:focus {
|
||||
background: #FFFFD3 !important;
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
<td>[% d.name %]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Location</td>
|
||||
<td>Location
|
||||
[% IF vars.user.port_control %]
|
||||
<i class="icon-edit nd_edit_icon nd_device_details_edit"></i>
|
||||
[% END %]
|
||||
</td>
|
||||
[% IF vars.user.port_control %]
|
||||
<td class="nd_editable_cell" contenteditable="true"
|
||||
data-field="location" data-for-device="[% d.ip %]">
|
||||
<i class="icon-edit nd_edit_icon nd_device_details_edit"></i>
|
||||
[% d.location %]
|
||||
<i class="icon-thumbs-up nd_thumb_icon"
|
||||
rel="tooltip" data-placement="left" data-offset="3"
|
||||
data-animation="" title="Click to Apply"></i>
|
||||
</td>
|
||||
[% ELSE %]
|
||||
<td>
|
||||
@@ -23,15 +23,15 @@
|
||||
[% END %]
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Contact</td>
|
||||
<td>Contact
|
||||
[% IF vars.user.port_control %]
|
||||
<i class="icon-edit nd_edit_icon nd_device_details_edit"></i>
|
||||
[% END %]
|
||||
</td>
|
||||
[% IF vars.user.port_control %]
|
||||
<td class="nd_editable_cell" contenteditable="true"
|
||||
data-field="contact" data-for-device="[% d.ip %]">
|
||||
<i class="icon-edit nd_edit_icon nd_device_details_edit"></i>
|
||||
[% d.contact %]
|
||||
<i class="icon-thumbs-up nd_thumb_icon"
|
||||
rel="tooltip" data-placement="left" data-offset="3"
|
||||
data-animation="" title="Click to Apply"></i>
|
||||
</td>
|
||||
[% ELSE %]
|
||||
<td>[% d.contact %]</td>
|
||||
|
||||
@@ -78,11 +78,6 @@
|
||||
[% END %]
|
||||
<div class="nd_editable_cell_content">
|
||||
[% row.name | html_entity %]
|
||||
[% IF vars.user.port_control AND params.c_admin %]
|
||||
<i class="icon-thumbs-up nd_thumb_icon"
|
||||
rel="tooltip" data-placement="top" data-offset="3"
|
||||
data-animation="" title="Click to Apply"></i>
|
||||
[% END %]
|
||||
</div>
|
||||
</td>
|
||||
[% END %]
|
||||
@@ -105,10 +100,7 @@
|
||||
data-field="c_vlan" data-for-device="[% device %]" data-for-port="[% row.port | html_entity %]">
|
||||
<i class="icon-edit nd_edit_icon"></i>
|
||||
<div class="nd_editable_cell_content">
|
||||
[% IF row.vlan %][% row.vlan | html_entity %][% ELSE %] [% END %]
|
||||
<i class="icon-thumbs-up nd_thumb_icon"
|
||||
rel="tooltip" data-placement="top" data-offset="3"
|
||||
data-animation="" title="Click to Apply"></i>
|
||||
[% IF row.vlan %][% row.vlan | html_entity %][% END %]
|
||||
</div>
|
||||
</td>
|
||||
[% ELSE %]
|
||||
|
||||
@@ -20,16 +20,19 @@
|
||||
// toggle visibility of port up/down and edit controls
|
||||
$('.nd_editable_cell').hover(function() {
|
||||
$(this).children('.nd_hand_icon').toggle();
|
||||
$(this).children('.nd_edit_icon').toggle();
|
||||
if ($(this).is(':focus')) {
|
||||
$(this).children('.nd_edit_icon').toggle(false); // ports
|
||||
$(this).siblings('td').find('.nd_device_details_edit').toggle(false); // details
|
||||
}
|
||||
else {
|
||||
$(this).children('.nd_edit_icon').toggle(); // ports
|
||||
$(this).siblings('td').find('.nd_device_details_edit').toggle(); // details
|
||||
}
|
||||
});
|
||||
|
||||
// toggle visibility of VLAN edit control when clicked
|
||||
$('[contenteditable=true]').focus(function() {
|
||||
$(this).find('.nd_thumb_icon').toggle();
|
||||
});
|
||||
$('[contenteditable=true]').blur(function() {
|
||||
$(this).find('.nd_thumb_icon').toggle();
|
||||
// can undo but CSS doesn't shift, so just do nothing for now.
|
||||
$(this).children('.nd_edit_icon').toggle(false); // ports
|
||||
$(this).siblings('td').find('.nd_device_details_edit').toggle(false); // details
|
||||
});
|
||||
|
||||
// activity for port up/down control
|
||||
@@ -40,12 +43,6 @@
|
||||
port_control(this); // save
|
||||
});
|
||||
|
||||
// activity for contenteditable control
|
||||
$('.nd_thumb_icon').click(function() {
|
||||
$(this).closest('[contenteditable=true]').blur();
|
||||
port_control(this); // save
|
||||
});
|
||||
|
||||
// activity for contenteditable control
|
||||
$('[contenteditable=true]').keydown(function() {
|
||||
var esc = event.which == 27,
|
||||
|
||||
Reference in New Issue
Block a user