diff --git a/public/js/app/progetti.js b/public/js/app/progetti.js new file mode 100644 index 0000000..ec0eeb0 --- /dev/null +++ b/public/js/app/progetti.js @@ -0,0 +1,21 @@ +$(document).ready(function() { + $('#tab_progetti').DataTable({ + responsive: true + }); +}); + +$(document).on('click', '.open_modal_new', function() { + // var riga_id = $(this).val(); + console.log('cliccato'); + $('#myModal_new').modal('show'); + $('#form_new').attr('action', 'progetti/new'); +}); + +$.getJSON("progetti/coordinatori", {}, function(data) { + $.each(data, function(i, item) { + $("select[name='coordinatore']").append( + new Option(item.name, item.id) + ) + } + ); +}); \ No newline at end of file diff --git a/public/js/app/rigaProgetti.js b/public/js/app/rigaProgetti.js new file mode 100644 index 0000000..832527c --- /dev/null +++ b/public/js/app/rigaProgetti.js @@ -0,0 +1,37 @@ +$(document).ready(function() { + $('#tab_progetti').DataTable({ + responsive: true + }); + + $('#form').click(function() { + $('form').toggle(); + }); + + $("#dettaglio").click(function() { + $('[hidable]').toggle(); + }); + + $(document).on('click', '.open_modal', function() { + var url = '/admin/progetti/detail/edit'; + var riga_id = $(this).val(); + $.get(url + '/' + riga_id, function(data) { + //success data + console.log(url); + //console.log(data[0].descrizione); + $('#data_u').val(data[0].data); + $('#desc_u').val(data[0].descrizione); + $('#ore_u').val(data[0].ore); + $('#prezzo_u').val(data[0].prezzo); + $('#id_progetto_u').val(data[0].fk_id_progetto); + $('#idriga').val(data[0].id); + $('#myModal').modal('show'); + }) + }); + + $(document).on('click', '.open_modal_addRow', function() { + // var riga_id = $(this).val(); + console.log('cliccato'); + $('#myModal_addRow').modal('show'); + // $('#form_new').attr('action', 'progetti/new'); + }); +}); \ No newline at end of file diff --git a/resources/views/progetti/demomodal.blade.php b/resources/views/progetti/demomodal.blade.php deleted file mode 100644 index 04ccd0c..0000000 --- a/resources/views/progetti/demomodal.blade.php +++ /dev/null @@ -1,66 +0,0 @@ - - - - Bootstrap Modal Example in Laravel - Websolutionstuff - - - - - -
-

Bootstrap Modal Example in Laravel - Websolutionstuff

-
-

- - - - - - - - - - - - - - - - - - - - - - - - -
No.Name Example
1Admin
2Test
-
-
- - - - - - \ No newline at end of file diff --git a/resources/views/progetti/dettaglio.blade.php b/resources/views/progetti/dettaglio.blade.php index d1b68d9..0132438 100644 --- a/resources/views/progetti/dettaglio.blade.php +++ b/resources/views/progetti/dettaglio.blade.php @@ -194,7 +194,6 @@ - @@ -207,23 +206,17 @@ - - - - - @endsection @section('script') @endsection diff --git a/resources/views/progetti/editriga.blade.php b/resources/views/progetti/editriga.blade.php deleted file mode 100644 index 56c2c53..0000000 --- a/resources/views/progetti/editriga.blade.php +++ /dev/null @@ -1,45 +0,0 @@ -@extends('progetti.dettaglio') - \ No newline at end of file diff --git a/resources/views/progetti/new.blade.php b/resources/views/progetti/new.blade.php deleted file mode 100644 index 1760116..0000000 --- a/resources/views/progetti/new.blade.php +++ /dev/null @@ -1,94 +0,0 @@ -@extends('admin') -@section('content') -
-
-

Progetto

-
-
-
-
-
-
- Nuovo progetto -
-
-
- @csrf -
-
- - -
-
- - -
-
-
-
- - -
-
-
-
- -
- - - - -
-
- -
- - -
-
-
-
- - -
-
- - -
-
-
-
- - -
-
-
-
- -
-
-
-
-
-
-
- - -@endsection -@section('script') - -@endsection