Skip to content

Commit e8d81fb

Browse files
committed
Modificato inserimento descrizioni associative
1 parent ee0821f commit e8d81fb

File tree

2 files changed

+36
-34
lines changed

2 files changed

+36
-34
lines changed

componenti/Modal/ModalInsertDescrizioneAssociativa.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</div>
1919
</div>
2020
<div class="modal-footer">
21-
<button type="button" id="closebtnnewdesass" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
21+
<button type="button" id="closebtnnewinsdesass" class="btn btn-secondary closebtnnewinsdesass" data-bs-dismiss="modal">Close</button>
2222
<button type="button" class="btn btn-primary savebtnnewdesass">Save changes</button>
2323
</div>
2424
</div>
@@ -46,9 +46,8 @@
4646
newnewdescrizione: newnewdescrizione
4747
},
4848
success: function(response) {
49-
console.log ("inserito");
50-
document.getElementById('closebtnnewdesass').click();
51-
gettabassdescrizione()
49+
document.getElementById('closebtnnewinsdesass').click();
50+
$('#ModalTabAssociative').modal('show');
5251
}
5352
5453

componenti/Modal/ModalTabelleAssociative.php

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
</div>
2121
</div>
2222
<div class="modal-footer">
23-
<button type="button" id="closebtn" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> </div>
23+
<button type="button" id="closebtn" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
24+
</div>
2425
</div>
2526
</div>
2627
</div>
@@ -31,40 +32,42 @@
3132
<script src="https://code.jquery.com/jquery-3.6.1.min.js" integrity="sha256-o88AwQnZB+VDvE9tvIXrMQaPlFFSUTR+nldQm1LuPXQ=" crossorigin="anonymous"></script>
3233
<!-- End of Jquery CDN -->
3334
<script>
35+
3436
$(document).ready(function() {
35-
gettabassdescrizione();
36-
gettabasscategoria();
37-
37+
const myModalEl = document.getElementById('ModalTabAssociative')
38+
myModalEl.addEventListener('shown.bs.modal', event => {
39+
gettabassdescrizione()
40+
gettabasscategoria()
41+
})
3842
39-
function gettabassdescrizione() {
40-
console.log("ass")
41-
$.ajax({
42-
type: 'POST',
43-
url: './php/preleva_dati_descassociative.php',
44-
data: {
45-
ajax: 1,
43+
function gettabassdescrizione() {
44+
$.ajax({
45+
type: 'POST',
46+
url: './php/preleva_dati_descassociative.php',
47+
data: {
48+
ajax: 1,
4649
47-
},
48-
success: function(response) {
49-
$("#tabelladescassociative").html(response);
50-
}
51-
});
50+
},
51+
success: function(response) {
52+
$("#tabelladescassociative").html(response);
53+
}
54+
});
5255
53-
}
56+
}
5457
55-
function gettabasscategoria() {
56-
$.ajax({
57-
type: 'POST',
58-
url: './php/preleva_dati_catassociative.php',
59-
data: {
60-
ajax: 1,
58+
function gettabasscategoria() {
59+
$.ajax({
60+
type: 'POST',
61+
url: './php/preleva_dati_catassociative.php',
62+
data: {
63+
ajax: 1,
6164
62-
},
63-
success: function(response) {
64-
$("#tabellacatassociative").html(response);
65-
}
66-
});
65+
},
66+
success: function(response) {
67+
$("#tabellacatassociative").html(response);
68+
}
69+
});
6770
68-
}
69-
})
71+
}
72+
})
7073
</script>

0 commit comments

Comments
 (0)