remove thumb icons for edit submit

This commit is contained in:
Oliver Gorwits
2012-11-25 17:02:06 +00:00
parent aa115a6cdf
commit 532f000c97
4 changed files with 22 additions and 45 deletions

View File

@@ -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,