frontend support for port poe enable/disable
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// user clicked or asked for port changes to be submitted via ajax
|
||||
function port_control (e) {
|
||||
var td = $(e).closest('.nd_editable_cell');
|
||||
var td = $(e).closest('td');
|
||||
|
||||
$.ajax({
|
||||
type: 'POST'
|
||||
@@ -30,6 +30,17 @@ function port_control (e) {
|
||||
$(e).data('tooltip').options.title = 'Click to Disable';
|
||||
td.attr('data-action', 'down');
|
||||
}
|
||||
else if ($.trim(td.attr('data-action')) == 'false') {
|
||||
$(e).next('span').text('');
|
||||
$(e).toggleClass('nd_power_on');
|
||||
$(e).data('tooltip').options.title = 'Click to Enable';
|
||||
td.attr('data-action', 'true');
|
||||
}
|
||||
else if ($.trim(td.attr('data-action')) == 'true') {
|
||||
$(e).toggleClass('nd_power_on');
|
||||
$(e).data('tooltip').options.title = 'Click to Disable';
|
||||
td.attr('data-action', 'false');
|
||||
}
|
||||
}
|
||||
,error: function() {
|
||||
toastr.error('Failed to submit change request');
|
||||
|
||||
Reference in New Issue
Block a user