4646 {[ "type":"date", "label":" ' .tr ('Data scadenza predefinita ' ).'", "name":"data_scadenza_predefinita", "value":"$data_scadenza_predefinita$", "required":"1" ]}
4747 </div>
4848 </div>
49-
49+
5050 <div class="row">
5151 <div class="col-md-6">
5252 {[ "type":"checkbox", "label":" ' .tr ('Sempre visibile ' ).'", "name":"is_sempre_visibile", "value":"$is_sempre_visibile$", "help": " ' .tr ('Se impostato il valore sarà sempre visibile sull \'articolo se il listino è attivo e la data di scadenza è ancora valida ' ).'" ]}
6363 </div>
6464 </div>
6565 <hr>
66- <div class="row">
67- <div class="col-md-5">
68- {[ "type":"select", "label":" ' .tr ('Articolo ' ).'", "ajax-source": "articoli", "select-options": {"permetti_movimento_a_zero": 1, "id_listino": ' .$ id_record .'} ]}
66+ <div class="card card-info">
67+ <div class="card-header">
68+ <h3 class="card-title">
69+ <i class="fa fa-list-alt"></i> ' .tr ('Gestione Articoli ' ).'
70+ </h3>
6971 </div>
70-
71- <div class="col-md-1">
72- <div class="btn-group btn-group-flex">
73- <button type="button" class="btn btn-primary" style="margin-top:25px;" onclick="aggiungiArticolo(this, true)">
74- <i class="fa fa-plus"></i> ' .tr ('Aggiungi ' ).'
75- </button>
72+ <div class="card-body">
73+ <div class="row">
74+ <div class="col-md-8">
75+ {[ "type":"select", "label":" ' .tr ('Seleziona Articolo ' ).'", "ajax-source": "articoli", "select-options": {"permetti_movimento_a_zero": 1, "id_listino": ' .$ id_record .'} ]}
76+ </div>
77+ <div class="col-md-4">
78+ <label> </label>
79+ <div class="form-group">
80+ <button type="button" class="btn btn-success btn-block" onclick="aggiungiArticolo(this, true)">
81+ <i class="fa fa-plus"></i> ' .tr ('Aggiungi Articolo ' ).'
82+ </button>
83+ </div>
84+ </div>
7685 </div>
7786 </div>
7887 </div>
7988
80- <table class="table table-hover table-sm table-bordered" id="tablelistini" width="100%">
81- <thead>
82- <tr>
83- <th class="text-center">
84- <br><input id="check_all" type="checkbox"/>
85- </th>
86- <th class="text-center"> ' .tr ('Codice ' ).'</th>
87- <th class="text-center"> ' .tr ('Descrizione ' ).'</th>
88- <th class="text-center"> ' .tr ('Data scadenza ' ).'</th>
89- <th class="text-center"> ' .tr ('Minimo ' ).'</th>
90- <th class="text-center"> ' .tr ('Prezzo di listino ' ).'</th>
91- <th class="text-center"> ' .tr ('Prezzo ivato ' ).'</th>
92- <th class="text-center"> ' .tr ('Sconto ' ).'</th>
93- <th class="text-center"></th>
94- </tr>
95- </thead>
96- </table>
89+ <div class="table-responsive">
90+ <table class="table table-hover table-sm table-bordered" id="tablelistini" width="100%">
91+ <thead>
92+ <tr>
93+ <th class="text-center align-middle" width="50">
94+ <input id="check_all" type="checkbox"/>
95+ </th>
96+ <th class="text-center">
97+ <i class="fa fa-barcode text-muted"></i> ' .tr ('Codice ' ).'
98+ </th>
99+ <th class="text-center">
100+ <i class="fa fa-file-text-o text-muted"></i> ' .tr ('Descrizione ' ).'
101+ </th>
102+ <th class="text-center">
103+ <i class="fa fa-calendar text-muted"></i> ' .tr ('Data scadenza ' ).'
104+ </th>
105+ <th class="text-center">
106+ <i class="fa fa-sort-numeric-asc text-muted"></i> ' .tr ('Minimo ' ).'
107+ </th>
108+ <th class="text-center">
109+ <i class="fa fa-euro text-muted"></i> ' .tr ('Prezzo di listino ' ).'
110+ </th>
111+ <th class="text-center">
112+ <i class="fa fa-euro text-muted"></i> ' .tr ('Prezzo ivato ' ).'
113+ </th>
114+ <th class="text-center">
115+ <i class="fa fa-percent text-muted"></i> ' .tr ('Sconto ' ).'
116+ </th>
117+ <th class="text-center" width="100">
118+ <i class="fa fa-cogs text-muted"></i> ' .tr ('Azioni ' ).'
119+ </th>
120+ </tr>
121+ </thead>
122+ </table>
123+ </div>
97124
98125 <div class="btn-group">
99126 <button type="button" class="btn btn-xs btn-default disabled" id="elimina_righe" onclick="rimuoviArticolo(getSelectData());">
@@ -122,15 +149,15 @@ function aggiungiArticolo(button) {
122149
123150 async function modificaArticolo(button, id) {
124151 let riga = $(button).closest("tr");
125-
152+
126153 // Chiusura tooltip
127154 if ($(button).hasClass("tooltipstered"))
128155 $(button).tooltipster("close");
129-
156+
130157 // Apertura modal
131158 openModal(" ' .tr ('Listino articolo ' ).'", " ' .$ structure ->fileurl ('modals/manage_articolo.php ' ).'?id_module= ' .$ id_module .'&id_record= ' .$ id_record .'&id=" + id);
132159 }
133-
160+
134161 function rimuoviArticolo(id) {
135162 swal({
136163 title: " ' .tr ('Rimuovere questo articolo? ' ).'",
@@ -178,7 +205,7 @@ function rimuoviArticolo(id) {
178205 searchDelay: 500,
179206 pageLength: 15,
180207 });
181-
208+
182209 table.on("processing.dt", function (e, settings, processing) {
183210 if (processing) {
184211 $("#mini-loader").show();
@@ -191,7 +218,7 @@ function rimuoviArticolo(id) {
191218 // Estraggo le righe spuntate
192219 function getSelectData() {
193220 let data=new Array();
194- $( \'#tablelistini \').find( \'.check:checked \').each(function (){
221+ $( \'#tablelistini \').find( \'.check:checked \').each(function (){
195222 data.push($(this).attr( \'id \'));
196223 });
197224
@@ -206,16 +233,16 @@ function getSelectData() {
206233 checked = 1;
207234 }
208235 });
209-
236+
210237 if (checked) {
211238 $("#elimina_righe").removeClass("disabled");
212239 } else {
213240 $("#elimina_righe").addClass("disabled");
214241 }
215242 });
216243 }, 1000);
217-
218- $("#check_all").click(function(){
244+
245+ $("#check_all").click(function(){
219246 if( $(this).is(":checked") ){
220247 $(".check").each(function(){
221248 if( !$(this).is(":checked") ){
0 commit comments