@section('javascript_common') var verified = {{ $concorso->TCCVerificatoEControllato }}; var smsSenders = new Array(); var smsText = new Array(); var concorsoNoEstrazione = @if ($concorso->TCCTipoEstrazioneFinale == "NoEstrazione") {{ "true;" }} @else {{ "false;" }} @endif @if (count($tenantsconcorsi)== 0) var tabindexOrder = new Array(); @else var tabindexOrder = new Array(@foreach($tenantsconcorsi as $tenant) {{ $tenant->TCCNID}}, @endforeach -1); // -1 just to end the array :-) @endif @foreach ($orari as $orario) smsSenders.push('{{$orario->TCCOSMSBonusGiocoMittente}}'); smsText.push('{{addslashes(str_replace("\\e","€", $orario->TCCOSMSBonusGioco))}}'); @endforeach var metaDefFields = new Array(@foreach($defData as $md) "{{ $md->TCCDMKey}}", @endforeach "XX"); // "XX" just to end the array :-) var metaDefValues = new Array(@foreach($defData as $md) "{{ addslashes(str_replace(array("\r\n", "\n", "\r"), ' ',($md->TCCDMValue))) }}", @endforeach "XX"); var addDiv = $('#adddataestrazione'); var i = $('#adddataestrazione p').size() + 1; $("input[name='codiciPromo']").click(function() { if ($(this).prop('checked')) { $("#hasPromo").show("fast"); } else { $("#hasPromo").hide("fast"); $("#hasPromoFunction").hide("fast"); $("#hasPromoGiocate").hide("fast"); $("#codicePromoFunzione").val("raddoppio"); } }); $("select[name='codicePromoFunzione']").click(function() { if (($(this).val() == 'scontrino') && ($("input[name='codiciPromo']").prop('checked'))) { $("#hasPromoFunction").show("fast"); $("#hasPromoGiocate").hide('fast'); } else if (($(this).val() == 'giocate') && ($("input[name='codiciPromo']").prop('checked'))) { $("#hasPromoGiocate").show("fast"); $("#hasPromoFunction").hide("fast"); } else { $("#hasPromoFunction").hide("fast"); $("#hasPromoGiocate").hide('fast'); } }); $("input[name='flagBonusGioco']").click(function() { if ($(this).prop('checked')) { $("#hasBonusGioco").show("fast"); } else { $("#hasBonusGioco").hide("fast"); } }); $("input[name='flagCodiciOmaggio']").click(function() { if ($(this).prop('checked')) { $("#hasCodiciOmaggio").show("fast"); } else { $("#hasCodiciOmaggio").hide("fast"); } }); $("input[name='flagMaxErogabili']").click(function() { if ($(this).prop('checked')) { $("#hasBonusGiocoMaxErog").show("fast"); } else { $("#hasBonusGiocoMaxErog").hide("fast"); } }); $("input[name='flagGiorniValidita']").click(function() { if ($(this).prop('checked')) { $("#hasGiorniValidita").show("fast"); } else { $("#hasGiorniValidita").hide("fast"); } }); $("input[name='ScattaFotoVincitori']").click(function() { if ($(this).prop('checked')) { $("#hasFotoVincitori").show("fast"); } else { $("#hasFotoVincitori").hide("fast"); } }); $("input[name='FirmaLiberatoriaFoto']").click(function() { if ($(this).prop('checked')) { $("#hasLiberatoria").show("fast"); } else { $("#hasLiberatoria").hide("fast"); } }); $("input[name='flagSMSVinci']").click(function() { if ($(this).prop('checked')) { $("#hasSMSVinci").show("fast"); } else { $("#hasSMSVinci").hide("fast"); } }); $("#maxbonus").tooltip(); $("#validitabonus").tooltip(); $('button[id^="sv_cna"]').click(function(e){ e.preventDefault(); var id = $(this).attr('id').substr(7); $('#svta_'+id).insertAtCaret('#COD#'); }); $('button[id^="sv_crp"]').click(function(e){ e.preventDefault(); var id = $(this).attr('id').substr(7); $('#svta_'+id).insertAtCaret('#CODWIN#'); }); $('button[id^="sv_win"]').click(function(e){ e.preventDefault(); var id = $(this).attr('id').substr(7); $('#svta_'+id).insertAtCaret('#VINCITA#'); }); $('button[id^="sv_times"]').click(function(e){ e.preventDefault(); var id = $(this).attr('id').substr(9); $('#svta_'+id).insertAtCaret('#VOLTE#'); }); $('button[id^="sv_def_"]').click(function(e){ e.preventDefault(); var id = $(this).attr('id').substr(7); var txt = ""; switch(parseInt(id)) { case 1: txt = "Ci dispiace ma SMS&Vinci non è attivo. Vieni a trovarci dalle ore xx:00 alle yy:00 per partecipare e tentare la fortuna! "; break; case 2: txt = "Ancora un po' di pazienza, il concorso partirà tra breve. Puoi inviare il messaggio a partire dalle xx:00 di oggi. "; break; case 3: txt = "Peccato il tempo per la partecipazione a SMS&Vinci è scaduto! Puoi comunque ritentare la fortuna il xx/yy dalle zz:00 alle ww:00 tornando al "; break; case 4: txt = "Peccato il tempo per la partecipazione a SMS&Vinci è scaduto! "; break; case 5: txt = "SMS&Vinci non è attivo. "; break; case 6: txt = "L'SMS inviato è errato. Controlla di aver inserito solo il Codice Gioco riportato sul retro degli scontrini. "; break; case 7: txt = "Codice Gioco errato. Controlla di aver inserito il codice corretto e riprova. "; break; case 8: txt = "Spiacenti ma le giocate disponibili per il Codice #COD# sono terminate. Puoi partecipare a SMS&Vinci con un altro codice."; break; case 9: txt = "Complimenti! Hai vinto un #VINCITA#, con il Codice #COD#. Recati alla postazione hostess e mostra questo messaggio. COD:#CODWIN#. "; break; case 10: txt = "Spiacenti ma non hai vinto. Puoi tentare la fortuna altre #VOLTE# volte utilizzando il codice #COD#. Invia un altro SMS. "; break; case 11: txt = "Spiacenti ma non hai vinto. Grazie per aver giocato a SMS&Vinci. Hai utilizzato tutte le giocate disponibili con il codice #COD#. "; break; default: txt = ""; } txt = txt + "{{ $brandName }}"; $('#svta_'+id).val(txt); }); $(document).on('click', '#remNew', function() { if ($('#verifyBtn_2').attr('class').indexOf('btn-success') > -1) { alert("La form è validata e controllata. Per aggiungere una nuova estrazione, cliccare sul pulsante 'Togli la Verifica'"); } else { if( i > 1 ) { var pTag = $(this).parents('p'); pTag.html('Estrazione cancellata. Salvare le modifiche premendo il bottone SALVA.').addClass('text-info'); setTimeout(function () { pTag.remove(); }, 3000); i--; } } return false; }); $(document).on('click', '#addNew', function() { if ($('#verifyBtn_3').attr('class').indexOf('btn-success') > -1) { alert("La form è validata e controllata. Per aggiungere una nuova estrazione, cliccare sul pulsante 'Togli la Verifica'"); } else { $('

    +x

').appendTo(addDiv); i++; } return false; }); $(document).on('focus', '.dataestrazione', function(event) { var idname = $(this).attr('id'); var num = idname.substr(6,9); event.preventDefault(); var inizioconcorso = $("#startdate").val(); var fineconcorso = $("#enddate").val(); var anno = inizioconcorso.substr(6,4); var mese = parseInt(inizioconcorso.substr(3,2))-1; /* month: from 0 to 11! */ var day = inizioconcorso.substr(0,2); var fineanno = fineconcorso.substr(6,4); var finemese = parseInt(fineconcorso.substr(3,2))-1; /* month: from 0 to 11! */ var fineday = fineconcorso.substr(0,2); $(this).datepicker('destroy'); /* destroying the previous object */ $(this).datepicker({firstDay: 1, dateFormat: 'dd-mm-yy', minDate: new Date(anno,mese,day), maxDate: new Date(fineanno,finemese,fineday), onSelect: function() { var sel = "#p_a_"+num; var dalladata = $(this).next(); var alladata = $(this).next().next(); $(this).next().datepicker('destroy'); $(this).next().next().datepicker('destroy'); $(this).next().datepicker({firstDay: 1, dateFormat: 'dd-mm-yy'}); var maxDate = $(this).datepicker('getDate'); alladata.datepicker({firstDay: 1, dateFormat: 'dd-mm-yy'}); alladata.datepicker('setDate', maxDate); alladata.datepicker('option', 'maxDate', maxDate); alladata.datepicker('option', 'minDate', new Date(anno,mese,day)); alladata.datepicker('refresh'); dalladata.datepicker('setDate', maxDate); dalladata.datepicker('option', 'maxDate', maxDate); dalladata.datepicker('option', 'minDate', new Date(anno,mese,day)); dalladata.datepicker('refresh')}}); }); $(document).on('mouseover', '.dataestrazione', function(event) { if ($(this).attr('disabled') != 'disabled') $(this).tooltip('show'); }); $(document).on('mouseover', '.datainizioestrazione', function(event) { if ($(this).attr('disabled') != 'disabled') $(this).tooltip('show'); }); $(document).on('mouseover', '.datafineestrazione', function(event) { if ($(this).attr('disabled') != 'disabled') $(this).tooltip('show'); var minDate = $(this).prev().datepicker('getDate'); $(this).datepicker('option','minDate', minDate); $(this).datepicker('refresh'); }); $('#enddate').datepicker({firstDay: 1, dateFormat: 'dd-mm-yy', minDate: new Date({{substr($concorso->TCCDataInizioConcorso,0,4)}},{{substr($concorso->TCCDataInizioConcorso,5,2)}}-1,{{substr($concorso->TCCDataInizioConcorso,8,2)}})}); $('#tipoestrazionefinale').change(function(){ var text = $(this).children('option').filter(":selected").val(); if (text == "Scontrini") { $('#hasScontrini').show(); } else { $('#hasScontrini').hide(); $('#currency').val(""); } if (text == "NoEstrazione") { if (!concorsoNoEstrazione) { // se la configurazione attuale prevede le estrazioni, e ora l'operatore cambia con un tipo estrazione che non la prevede, visualizzo un messaggio di warning $("#drawing-msg").html("

Attenzione

Si sono specificate delle date di estrazione e ora si è cambiato il tipo di concorso con uno che non richiede alcuna estrazione. Se si salva, tutte le estrazioni saranno cancellate (se in precedenza erano state inserite)!. Premere il pulsante sottostante per cancellare tutte le estrazioni eventualmente inserite

" ); //return false; } else { $("#drawing-msg").html(""); } $('#hasEstrazione').hide(); $('#hasPronostico').hide(); } else { $("#drawing-msg").html(""); $('#hasEstrazione').show(); } if (text == "Pronostico") { $('#hasPronostico').show(); } else { $('#hasPronostico').hide(); } }); (function($) { $.fn.currencyFormat = function() { this.each( function( i ) { $(this).change( function( e ){ var str = this.value; var res = str.replace(",","."); if( isNaN( parseFloat( res ) ) ) return; this.value = parseFloat(res).toFixed(2); }); }); return this; //for chaining } })( jQuery ); // apply the currencyFormat behaviour to elements with 'currency' as their class $( function() { $('.currency').currencyFormat(); }); var pagerOptions = { // target the pager markup - see the HTML block below container: $(".pager"), // use this url format "http:/mydatabase.com?page={page}&size={size}&{sortList:col}" ajaxUrl: null, // modify the url after all processing has been applied customAjaxUrl: function(table, url) { return url; }, // process ajax so that the data object is returned along with the total number of rows // example: { "data" : [{ "ID": 1, "Name": "Foo", "Last": "Bar" }], "total_rows" : 100 } ajaxProcessing: function(ajax){ if (ajax && ajax.hasOwnProperty('data')) { // return [ "data", "total_rows" ]; return [ ajax.total_rows, ajax.data ]; } }, // output string - default is '{page}/{totalPages}' // possible variables: {page}, {totalPages}, {filteredPages}, {startRow}, {endRow}, {filteredRows} and {totalRows} output: '{startRow} to {endRow} ({totalRows})', // apply disabled classname to the pager arrows when the rows at either extreme is visible - default is true updateArrows: true, // starting page of the pager (zero based index) page: 0, // Number of visible rows - default is 10 size: 10, // Save pager page & size if the storage script is loaded (requires $.tablesorter.storage in jquery.tablesorter.widgets.js) savePages : true, // if true, the table will remain the same height no matter how many records are displayed. The space is made up by an empty // table row set to a height to compensate; default is false fixedHeight: true, // remove rows from the table to speed up the sort of large tables. // setting this to false, only hides the non-visible rows; needed if you plan to add/remove rows with the pager enabled. removeRows: false, // css class names of pager arrows cssNext: '.next', // next page arrow cssPrev: '.prev', // previous page arrow cssFirst: '.first', // go to first page arrow cssLast: '.last', // go to last page arrow cssGoto: '.gotoPage', // select dropdown to allow choosing a page cssPageDisplay: '.pagedisplay', // location of where the "output" is displayed cssPageSize: '.pagesize', // page size selector - select dropdown that sets the "size" option // class added to arrows when at the extremes (i.e. prev/first arrows are "disabled" when on the first page) cssDisabled: 'disabled', // Note there is no period "." in front of this class name cssErrorRow: 'tablesorter-errorRow' // ajax error information row }; $.extend($.bootstrap, { // these classes are added to the table. To see other table classes available, // look here: http://twitter.github.com/bootstrap/base-css.html#tables table : 'table table-bordered', caption : 'caption', header : 'bootstrap-header', // give the header a gradient background footerRow : '', footerCells: '', icons : '', // add "icon-white" to make them white; this icon class is added to the in the header sortNone : 'bootstrap-icon-unsorted', sortAsc : 'icon-chevron-up glyphicon glyphicon-chevron-up', // includes classes for Bootstrap v2 & v3 sortDesc : 'icon-chevron-down glyphicon glyphicon-chevron-down', // includes classes for Bootstrap v2 & v3 active : '', // applied when column is sorted hover : '', // use custom css here - bootstrap class may not override it filterRow : '', // filter row class even : '', // odd row zebra striping odd : '' // even row zebra striping }); $('#premiTable').tablesorter({ // this will apply the bootstrap theme if "uitheme" widget is included // the widgetOptions.uitheme is no longer required to be set theme : "bootstrap", widthFixed: true, headers: {3: {sorter: false, filter: false}}, // escludo la quarta colonna dal sorting headerTemplate : '{content} {icon}', // new in v2.7. Needed to add the bootstrap icon! // widget code contained in the jquery.tablesorter.widgets.js file // use the zebra stripe widget if you plan on hiding any rows (filter widget) widgets : [ "uitheme", "filter", "zebra" ], widgetOptions : { // using the default zebra striping class name, so it actually isn't included in the theme variable above // this is ONLY needed for bootstrap theming if you are using the filter widget, because rows are hidden zebra : ["even", "odd"], // reset filters button filter_reset : ".reset" // set the uitheme widget to use the bootstrap theme class names // this is no longer required, if theme is set // ,uitheme : "bootstrap" } }) .tablesorterPager({ // target the pager markup - see the HTML block below container: $(".ts-pager"), // target the pager page select dropdown - choose a page cssGoto : ".pagenum", // remove rows from the table to speed up the sort of large tables. // setting this to false, only hides the non-visible rows; needed if you plan to add/remove rows with the pager enabled. removeRows: false, // output string - default is '{page}/{totalPages}'; // possible variables: {page}, {totalPages}, {filteredPages}, {startRow}, {endRow}, {filteredRows} and {totalRows} output: '{startRow} - {endRow} / {filteredRows} ({totalRows})' }); $('#vecchiacampagna').change(function(){ var id = $(this).children('option').filter(":selected").val(); if (id == 0) return true; $.post('/area_riservata/concorsi/datiSocieta', { id_campagna: id, _token: $("input[name=_token]").val()}, function(res) { if (res.substr(0,2) == "ok") { obj = JSON && JSON.parse(res.substr(3)) || $.parseJSON(res.substr(3)); $('input[name="socpromotrice"]').val(obj['societapromotrice']); $('input[name="indirizzopromotrice"]').val(obj['indirizzosocietapromotrice']); $('input[name="localitasocpromotrice"]').val(obj['localitasocietapromotrice']); $('input[name="capsocietapromotrice"]').val(obj['capsocietapromotrice']); $('input[name="provsocpromotrice"]').val(obj['provinciasocietapromotrice']); $('input[name="pisocietapromotrice"]').val(obj['pisocietapromotrice']); $('input[name="cfsocpromotrice"]').val(obj['cfsocietapromotrice']); $('input[name="indirizzolegalepromotrice"]').val(obj['indirizzolegalesocietapromotrice']); $('input[name="mailsocpromotrice"]').val(obj['emailsocietapromotrice']); $('input[name="mailprivacysocpromotrice"]').val(obj['emailpernormativaprivacy']); $('input[name="cciaasocietapromotrice"]').val(obj['cciaasocietapromotrice']); $('input[name="prcciaasocietapromotrice"]').val(obj['prcciaasocietapromotrice']); $('input[name="numerocciaasocietapromotrice"]').val(obj['numerocciaasocietapromotrice']); $('input[name="reacciaasocietapromotrice"]').val(obj['reacciaasocietapromotrice']); return true; } else { alert("Errore: "+res) return false; } }, "json" ).fail(function() { alert("Problemi di connessione al server o sessione scaduta."); }); }); $('#pronosticiTable').tablesorter({ // this will apply the bootstrap theme if "uitheme" widget is included // the widgetOptions.uitheme is no longer required to be set theme : "bootstrap", widthFixed: true, headers: {3: {sorter: false, filter: false}}, // escludo la quarta colonna dal sorting headerTemplate : '{content} {icon}', // new in v2.7. Needed to add the bootstrap icon! // widget code contained in the jquery.tablesorter.widgets.js file // use the zebra stripe widget if you plan on hiding any rows (filter widget) widgets : [ "uitheme", "filter", "zebra" ], widgetOptions : { // using the default zebra striping class name, so it actually isn't included in the theme variable above // this is ONLY needed for bootstrap theming if you are using the filter widget, because rows are hidden zebra : ["even", "odd"], // reset filters button filter_reset : ".reset" // set the uitheme widget to use the bootstrap theme class names // this is no longer required, if theme is set // ,uitheme : "bootstrap" } }) .tablesorterPager({ // target the pager markup - see the HTML block below container: $(".ts-pager"), // target the pager page select dropdown - choose a page cssGoto : ".pagenum", // remove rows from the table to speed up the sort of large tables. // setting this to false, only hides the non-visible rows; needed if you plan to add/remove rows with the pager enabled. removeRows: false, // output string - default is '{page}/{totalPages}'; // possible variables: {page}, {totalPages}, {filteredPages}, {startRow}, {endRow}, {filteredRows} and {totalRows} output: '{startRow} - {endRow} / {filteredRows} ({totalRows})' }); /*$('#tenantConcTable').tablesorter({ // this will apply the bootstrap theme if "uitheme" widget is included // the widgetOptions.uitheme is no longer required to be set theme : "bootstrap", widthFixed: true, //headers: {3: {sorter: false, filter: false}}, // escludo la quarta colonna dal sorting headerTemplate : '{content} {icon}', // new in v2.7. Needed to add the bootstrap icon! // widget code contained in the jquery.tablesorter.widgets.js file // use the zebra stripe widget if you plan on hiding any rows (filter widget) widgets : [ "uitheme", "filter", "zebra" ], widgetOptions : { // using the default zebra striping class name, so it actually isn't included in the theme variable above // this is ONLY needed for bootstrap theming if you are using the filter widget, because rows are hidden zebra : ["even", "odd"], // reset filters button filter_reset : ".reset" // set the uitheme widget to use the bootstrap theme class names // this is no longer required, if theme is set // ,uitheme : "bootstrap" } }) .tablesorterPager({ // target the pager markup - see the HTML block below container: $(".ts-pager"), // target the pager page select dropdown - choose a page cssGoto : ".pagenum", // remove rows from the table to speed up the sort of large tables. // setting this to false, only hides the non-visible rows; needed if you plan to add/remove rows with the pager enabled. removeRows: false, // output string - default is '{page}/{totalPages}'; // possible variables: {page}, {totalPages}, {filteredPages}, {startRow}, {endRow}, {filteredRows} and {totalRows} output: '{startRow} - {endRow} / {filteredRows} ({totalRows})' });*/ $('.associato_chk').click(function(e){ $(this).parent().parent().removeClass("danger").removeClass("success").addClass("warning"); // se si clicca sul "Attivo", coloro di arancione la riga var status_copy_cmd = $(this).parent().next().next().next().next().next().next().next().children(); if ($(this).prop('checked')){ status_copy_cmd.removeAttr('disabled'); $(this).parent().next().children().prop('disabled', false); $(this).parent().next().next().children().prop('disabled', false); $(this).parent().next().next().next().children().prop('disabled', false); // fine dei checkbox. Ora iniziano i text box currency e numerici $(this).parent().next().next().next().next().children().children().prop('disabled', false); // numero giocate $(this).parent().next().next().next().next().next().children().children().prop('disabled', false); // giocata ogni $(this).parent().next().next().next().next().next().next().children().children().prop('disabled', false); // giocata ogni euro succ $(this).parent().next().next().next().next().next().next().next().children().children().prop('disabled', false); // soglia $(this).parent().next().next().next().next().next().next().next().next().children().children().prop('disabled', false); // max giocate x scontrino $(this).parent().next().next().next().next().next().next().next().next().next().children().children().prop('disabled', false); // max giocate x negozio return; } else status_copy_cmd.attr('disabled','disabled'); $(this).parent().next().children().attr('disabled','disabled'); $(this).parent().next().next().children().attr('disabled','disabled'); $(this).parent().next().next().next().children().attr('disabled','disabled'); $(this).parent().next().next().next().next().children().children().attr('disabled','disabled'); // numero giocate $(this).parent().next().next().next().next().next().children().children().attr('disabled','disabled'); // giocata ogni $(this).parent().next().next().next().next().next().next().children().children().attr('disabled','disabled'); // giocata ogni euro succ $(this).parent().next().next().next().next().next().next().next().children().children().attr('disabled','disabled'); // soglia $(this).parent().next().next().next().next().next().next().next().next().children().children().prop('disabled', 'disabled'); // max giocate x scontrino $(this).parent().next().next().next().next().next().next().next().next().next().children().children().prop('disabled', 'disabled'); // max giocate x negozio }); $("#tenantConcTable tbody").sortable({ update: function( event, ui ) { //if (ui['item'].children().children().prop('checked') == true) // la riga è associata al concorso (quindi è in verde) ui['item'].removeClass("danger").addClass('warning'); // coloro di giallo la riga spostata // aggiorno il nuovo ordinamento sortedEl = $("#tenantConcTable tbody").sortable("toArray"); for (i=0; i < {{ $totalElemTenants }}; i++) { var newOrd = sortedEl[i].split('_'); // contiene ad es: "order_31" $('input[name="nuovoOrdine['+i+']"]').val(newOrd[1]); $('input[name="attivo['+tabindexOrder[newOrd[1]]+']"]').attr('tabindex', 200+i); $('input[name="sommaEstr['+tabindexOrder[newOrd[1]]+']"]').attr('tabindex', 400+i); $('input[name="somma['+tabindexOrder[newOrd[1]]+']"]').attr('tabindex', 600+i); $('input[name="sommaNegozio['+tabindexOrder[newOrd[1]]+']"]').attr('tabindex', 800+i); $('input[name="numeroGiocate['+tabindexOrder[newOrd[1]]+']"]').attr('tabindex', 1000+i); $('input[name="giocataOgni['+tabindexOrder[newOrd[1]]+']"]').attr('tabindex', 1200+i); $('input[name="giocataSucc['+tabindexOrder[newOrd[1]]+']"]').attr('tabindex', 1400+i); $('input[name="soglia['+tabindexOrder[newOrd[1]]+']"]').attr('tabindex', 1600+i); $('input[name="maxgiocateperscontrino['+tabindexOrder[newOrd[1]]+']"]').attr('tabindex', 1800+i); $('input[name="maxgiocatepernegozio['+tabindexOrder[newOrd[1]]+']"]').attr('tabindex', 2000+i); } } }).disableSelection(); // abilito il drag&drop delle righe della tabella $('#submitTenants').click(function(e){ var self = this; e.preventDefault(); $sortedEl = $("#tenantConcTable tbody").sortable("toArray"); $('input[name=ordinamento]').val($sortedEl); // ordino l'array modificato prima di fare il submit della tabella $('#tenants_form').submit(); return false; }); $('a[id^="data-"]').click(function(e){ e.preventDefault(); /* disattiva la riga nella tabella orari */ if (!confirm("Sei sicuro di voler cancellare la riga corrente e tutti i dati contenuti?")) return; $(this).parent().parent().removeClass('success').addClass('active'); var text = $(this).parent().prev().prev().prev().text(); $(this).parent().prev().prev().prev().text(text); $(this).parent().prev().prev().children().val("").attr('disabled','disabled'); $(this).parent().prev().children().val("").attr('disabled','disabled'); $(this).next().next().attr('disabled', 'disabled'); // disabilito il tasto copia orari $(this).attr('disabled','disabled'); $(this).parent().next().children().attr('disabled','disabled').prop('checked',false); // codice omaggio valido $(this).parent().next().next().children().attr('disabled','disabled').prop('checked',false); // registra utente $(this).parent().next().next().next().children().attr('disabled','disabled').prop('checked',false); // reg. estrazione finale var first_input_text = $(this).parent().next().next().next().next(); for (i=0; i < {{ count($premi) }}; i++) { first_input_text.children().attr('disabled','disabled').val("0"); first_input_text = first_input_text.next(); // correggo il totale della distribuzione dei premi var subtotal = 0; for (k=0; k <