modificato js tag.js

This commit is contained in:
Amministratore 2023-05-26 08:20:05 +02:00
parent dae4b7b797
commit 9e29d02fd9

21
public/js/app/tag.js vendored
View File

@ -0,0 +1,21 @@
$(document).ready(function() {
$('#tags').DataTable({
responsive: true
});
$(document).on('click', '.open_modal', function() {
var url = "tagmodify";
var riga_id = $(this).val();
$.getJSON(url + '/' + riga_id, function(data) {
//success data
console.log(data[0]);
console.log(data[0].tag_name);
$('#tag_name').val(data[0].tag_name);
$('#tag_id').val(data[0].id);
$('#myModal').modal('show');
});
});
$(document).on('click', '.open_modal_new', function() {
$('#myModal_new').modal('show');
});
});