\n
","jsInit":[],"jsTemplates":{"590e048269be1c4a86de2cab958cf96c":"window.fileinput_3930b294 = {\"multiple\":false,\"autoReplace\":false,\"allowedFileExtensions\":[\"doc\",\"docx\",\"odt\",\"pdf\",\"jpg\",\"jpeg\",\"bmp\",\"gif\",\"tiff\",\"png\"],\"showUpload\":false,\"showCaption\":true,\"showRemove\":true,\"showPreview\":false,\"overwriteInitial\":false,\"preferIconicPreview\":false,\"removeFromPreviewOnError\":true,\"dropZoneEnabled\":true,\"language\":\"it\",\"resizeImage\":false,\"autoOrientImage\":true};\n","0acbd63037b7e03ad21e2b524c811d33":"if (jQuery('#signupform-isees-file-{multiple_index_isees}').data('fileinput')) { jQuery('#signupform-isees-file-{multiple_index_isees}').fileinput('destroy'); }\njQuery('#signupform-isees-file-{multiple_index_isees}').fileinput(fileinput_3930b294);\n"},"max":3,"min":0,"attributes":{"signupform-isees-file":[]},"indexPlaceholder":"multiple_index_isees","prepend":false}); jQuery('#docs').multipleInput({"id":"docs","inputId":"signupform-docs","template":"
","jsInit":[],"jsTemplates":{"590e048269be1c4a86de2cab958cf96c":"window.fileinput_3930b294 = {\"multiple\":false,\"autoReplace\":false,\"allowedFileExtensions\":[\"doc\",\"docx\",\"odt\",\"pdf\",\"jpg\",\"jpeg\",\"bmp\",\"gif\",\"tiff\",\"png\"],\"showUpload\":false,\"showCaption\":true,\"showRemove\":true,\"showPreview\":false,\"overwriteInitial\":false,\"preferIconicPreview\":false,\"removeFromPreviewOnError\":true,\"dropZoneEnabled\":true,\"language\":\"it\",\"resizeImage\":false,\"autoOrientImage\":true};\n","80206a098dada1b4e02ea25149b157b0":"if (jQuery('#signupform-docs-file-{multiple_index_docs}').data('fileinput')) { jQuery('#signupform-docs-file-{multiple_index_docs}').fileinput('destroy'); }\njQuery('#signupform-docs-file-{multiple_index_docs}').fileinput(fileinput_3930b294);\n"},"max":3,"min":0,"attributes":{"signupform-docs-file":[]},"indexPlaceholder":"multiple_index_docs","prepend":false}); jQuery('#form-profile').yiiActiveForm([], []); $(document).ready(function() { $('td.list-cell__servizio select').each(function(){ var id = this.id; var spli = id.split('-'); var index = spli[2]; if($(this).val()<2) { $('#signupform-figli-'+index+'-trasporto').attr("disabled", "disabled"); $('#signupform-figli-'+index+'-fermata').attr("disabled", "disabled"); } else { $('#signupform-figli-'+index+'-trasporto').removeAttr("disabled"); $('#signupform-figli-'+index+'-fermata').removeAttr("disabled"); } }); /* if ($('#navetta').val() == 0) { $('td.list-cell__trasporto select').each(function() { $(this).attr("disabled", "disabled"); }); $('td.list-cell__fermata input').each(function() { $(this).attr("disabled", "disabled"); }); $('#delegati').css('display', 'none'); } else { $('td.list-cell__trasporto select').each(function() { $(this).removeAttr("disabled"); }); $('td.list-cell__fermata input').each(function() { $(this).removeAttr("disabled"); }); $('#delegati').css('display', 'block'); }*/ var first = 1; $("#my_id").addClass("table-responsive"); $("table.multiple-input-list").addClass("table-responsive"); $("table.multiple-input-list tfoot tr").each(function() { var tr = this; // console.dir(tr); $('td', tr).each(function(index, value) { var td = $(this); if (first == 1) { td.remove(); first = 0; } /*else { console.dir(td); }*/ }); }); }); $('#my_id').on('afterAddRow', function(e, row) { // alert($('#navetta').val()); if ($('#auto').val() == 1) { //console.dir(row.find('td.list-cell__trasporto select')); row.find('td.list-cell__trasporto select').attr("disabled", "disabled"); row.find('td.list-cell__fermata input').attr("disabled", "disabled"); // row.find('td.list-cell__button').css("width", "100px"); } }); $('#btn_cf_calculator').on('click', function(e) { e.preventDefault(); $.ajax({ url: "/admin/mensa/anagrafica/default/calculate-cf", type: 'POST', data: { id_comune : $('#anagraficanascita-comune_hidden').val(), name : $('#anagrafica-ragione_sociale_2').val(), surname : $('#anagrafica-ragione_sociale_1').val(), gender : $('#anagrafica-sex').val(), birthDate : $('#anagraficanascita-birthdate').val(), }, success: function(data) { $('#anagrafica-codfis').val(data) // process data } }); }); $('.calcola-cf').on('click', function(e) { var id = this.id; var spli = id.split('-'); var index = spli[1]; e.preventDefault(); birth = $('#signupform-figli-'+index+'-data_nascita').val().split('/'); dateBirth = birth[2]+'-'+birth[1]+'-'+birth[0]; $.ajax({ url: "/admin/mensa/anagrafica/default/calculate-cf", type: 'POST', data: { id_comune : $('#signupform-figli-'+index+'-luogo_id').val(), name : $('#signupform-figli-'+index+'-nome').val(), surname : $('#signupform-figli-'+index+'-cognome').val(), gender : $('#signupform-figli-'+index+'-sesso').val(), birthDate : dateBirth, }, success: function(data) { $('#signupform-figli-'+index+'-cf').val(data) // process data } }); }); $("#anno-id").change(function() { console.log("ho cambiato anno..."); var yearSelected; yearSelected = this.value; $.ajax ({ type: "GET", url:"/admin/mensa/default/upgrade-session", data:{year:yearSelected}, success: function(data) { console.log("filtro la table con l'anno" + yearSelected); // refresh della griglia... $('.grid-view').yiiGridView('applyFilter'); } }); }); if (jQuery('#anno-id').data('select2')) { jQuery('#anno-id').select2('destroy'); } jQuery.when(jQuery('#anno-id').select2(select2_d562a5bb)).done(initS2Loading('anno-id','s2options_6cc131ae')); jQuery('#anno-id').on('select2:open', function() { console.log('select2:open'); var c = $(this); var d = $('#select2-anno-id-results'); console.log(d); $(d).parent().parent().attr('style','z-index:9999'); }); $('body').on('click', '.modal-form', function() { var options = $.extend({"size":null,"loginUrl":["\/login"],"singleton":true}, $(this).data()); $.createModalForm(options, {"class":"modal-form-class"}).ajaxContent({url : $(this).attr('href') || $(this).data('url')});; return false; }); });