2018-02-27 23:21:46 +08:00
|
|
|
(function() {
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
$(document).on('click', '.record-info-link', function(e) {
|
|
|
|
var that = $(this);
|
|
|
|
$.ajax({
|
|
|
|
method: 'GET',
|
|
|
|
url: that.attr('href'),
|
|
|
|
dataType: 'json'
|
|
|
|
}).done(function(xhr, settings, data) {
|
|
|
|
$('body').append($.parseHTML(data.responseJSON.html));
|
|
|
|
$('#modal-info-repository-row').modal('show', {
|
|
|
|
backdrop: true,
|
|
|
|
keyboard: false
|
|
|
|
}).on('hidden.bs.modal', function() {
|
2018-03-02 21:14:27 +08:00
|
|
|
$(this).find('.modal-body #repository_row-info-table').DataTable().destroy();
|
2018-02-27 23:21:46 +08:00
|
|
|
$(this).remove();
|
|
|
|
});
|
2018-03-02 21:14:27 +08:00
|
|
|
$('#repository_row-info-table').DataTable({
|
2018-02-27 23:21:46 +08:00
|
|
|
dom: 'RBltpi',
|
|
|
|
stateSave: false,
|
|
|
|
buttons: [],
|
|
|
|
processing: true,
|
|
|
|
colReorder: {
|
|
|
|
fixedColumnsLeft: 1000000 // Disable reordering
|
|
|
|
},
|
|
|
|
columnDefs: [{
|
|
|
|
targets: 0,
|
|
|
|
searchable: false,
|
|
|
|
orderable: false
|
|
|
|
}],
|
|
|
|
fnDrawCallback: function(settings, json) {
|
|
|
|
animateSpinner(this, false);
|
|
|
|
},
|
|
|
|
preDrawCallback: function(settings) {
|
|
|
|
animateSpinner(this);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
e.preventDefault();
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
})();
|