[#4] Allow comment on device port in the log, for any user

This commit is contained in:
Oliver Gorwits
2015-01-01 17:48:25 +00:00
parent f9122ce72e
commit 06f62f97b7
8 changed files with 110 additions and 7 deletions

View File

@@ -52,4 +52,35 @@
,delay: 150
,minLength: 3
});
// dynamically bind to all forms in the table
$('.content').on('click', '.nd_adminbutton', function(event) {
// stop form from submitting normally
event.preventDefault();
// what purpose - add/update/del
var mode = $(this).attr('name');
// submit the query and put results into the tab pane
$.ajax({
type: 'POST'
,async: true
,dataType: 'html'
,url: uri_base + '/ajax/control/report/' + tab + '/' + mode
,data: $(this).closest('tr').find('input[data-form="' + mode + '"]').serializeArray()
,beforeSend: function() {
$(target).html(
'<div class="span2 alert">Request submitted...</div>'
);
}
,success: function() {
$('#' + tab + '_form').trigger('submit');
}
// skip any error reporting for now
// TODO: fix sanity_ok in Netdisco Web
,error: function() {
$('#' + tab + '_form').trigger('submit');
}
});
});
});