From 034a5138494d7dc38e09cb0572b297bd85c6a334 Mon Sep 17 00:00:00 2001 From: Mattia Gosetto Date: Mon, 2 Aug 2021 11:19:20 +0200 Subject: [PATCH] documento attestazione --- .../org.eclipse.core.resources.prefs | 1 + jasper/attestazione.jrxml | 451 ++++++++++++++++++ .../bo/util/ValidazionePraticaUtil.java | 118 +++-- .../impl/AsseverazioneLocalServiceImpl.java | 2 +- .../docroot/WEB-INF/src/service.properties | 4 +- .../domanda/page_dettagli_principali.jsp | 105 ++-- 6 files changed, 583 insertions(+), 98 deletions(-) create mode 100644 jasper/attestazione.jrxml diff --git a/jasper/.settings/org.eclipse.core.resources.prefs b/jasper/.settings/org.eclipse.core.resources.prefs index b552b272..7d20ae47 100644 --- a/jasper/.settings/org.eclipse.core.resources.prefs +++ b/jasper/.settings/org.eclipse.core.resources.prefs @@ -14,5 +14,6 @@ encoding/VIArch\ attivazione.jrxml=UTF-8 encoding/VIArch\ conclusione.jrxml=UTF-8 encoding/accettata_integrazione.jrxml=UTF-8 encoding/annullamento.jrxml=UTF-8 +encoding/attestazione.jrxml=UTF-8 encoding/cambio_istruttore.jrxml=UTF-8 encoding/visualizza_fascicolo.jrxml=UTF-8 diff --git a/jasper/attestazione.jrxml b/jasper/attestazione.jrxml new file mode 100644 index 00000000..cf43ca98 --- /dev/null +++ b/jasper/attestazione.jrxml @@ -0,0 +1,451 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java index f8b64d10..257ee9b1 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service/it/tref/liferay/portos/bo/util/ValidazionePraticaUtil.java @@ -532,44 +532,44 @@ public class ValidazionePraticaUtil { List notCompleted = new ArrayList<>(); switch (intPratica.getTipoProcedura()) { - case Constants.PROCEDURA_P1: - case Constants.PROCEDURA_Q1: - case Constants.PROCEDURA_P8: - case Constants.PROCEDURA_Q8: - case Constants.PROCEDURA_P9: - case Constants.PROCEDURA_Q9: - soggettiRichiesti.add(TipoSoggettoUtil.COMMITTENTE); - soggettiRichiesti.add(TipoSoggettoUtil.PROGETTISTA); - break; - - case Constants.PROCEDURA_P2: - case Constants.PROCEDURA_P4: - case Constants.PROCEDURA_P5: - case Constants.PROCEDURA_P6: - case Constants.PROCEDURA_P7: - case Constants.PROCEDURA_Q2: - case Constants.PROCEDURA_Q4: - case Constants.PROCEDURA_Q5: - case Constants.PROCEDURA_Q6: - case Constants.PROCEDURA_Q7: - soggettiRichiesti.add(TipoSoggettoUtil.COMMITTENTE); - soggettiRichiesti.add(TipoSoggettoUtil.PROGETTISTA); - soggettiRichiesti.add(TipoSoggettoUtil.DITTA); - soggettiRichiesti.add(TipoSoggettoUtil.DIRETTORE_LAVORI); - soggettiRichiesti.add(TipoSoggettoUtil.COLLAUDATORE); - break; - - case Constants.PROCEDURA_P3: - case Constants.PROCEDURA_Q3: - soggettiRichiesti.add(TipoSoggettoUtil.COMMITTENTE); - soggettiRichiesti.add(TipoSoggettoUtil.PROGETTISTA); - soggettiRichiesti.add(TipoSoggettoUtil.ARCHEOLOGO); - break; - - case Constants.PROCEDURA_P10: - case Constants.PROCEDURA_Q10: - soggettiRichiesti.add(TipoSoggettoUtil.COMMITTENTE); - break; + case Constants.PROCEDURA_P1: + case Constants.PROCEDURA_Q1: + case Constants.PROCEDURA_P8: + case Constants.PROCEDURA_Q8: + case Constants.PROCEDURA_P9: + case Constants.PROCEDURA_Q9: + soggettiRichiesti.add(TipoSoggettoUtil.COMMITTENTE); + soggettiRichiesti.add(TipoSoggettoUtil.PROGETTISTA); + break; + + case Constants.PROCEDURA_P2: + case Constants.PROCEDURA_P4: + case Constants.PROCEDURA_P5: + case Constants.PROCEDURA_P6: + case Constants.PROCEDURA_P7: + case Constants.PROCEDURA_Q2: + case Constants.PROCEDURA_Q4: + case Constants.PROCEDURA_Q5: + case Constants.PROCEDURA_Q6: + case Constants.PROCEDURA_Q7: + soggettiRichiesti.add(TipoSoggettoUtil.COMMITTENTE); + soggettiRichiesti.add(TipoSoggettoUtil.PROGETTISTA); + soggettiRichiesti.add(TipoSoggettoUtil.DITTA); + soggettiRichiesti.add(TipoSoggettoUtil.DIRETTORE_LAVORI); + soggettiRichiesti.add(TipoSoggettoUtil.COLLAUDATORE); + break; + + case Constants.PROCEDURA_P3: + case Constants.PROCEDURA_Q3: + soggettiRichiesti.add(TipoSoggettoUtil.COMMITTENTE); + soggettiRichiesti.add(TipoSoggettoUtil.PROGETTISTA); + soggettiRichiesti.add(TipoSoggettoUtil.ARCHEOLOGO); + break; + + case Constants.PROCEDURA_P10: + case Constants.PROCEDURA_Q10: + soggettiRichiesti.add(TipoSoggettoUtil.COMMITTENTE); + break; } boolean isDelegaCommittente = SoggettiUtil.isTitolareInCommittenti(intPraticaId) @@ -589,41 +589,53 @@ public class ValidazionePraticaUtil { if (!isDelegaCollaudo) { notCompleted.add("delega-collaudatore"); } + List soggettiPratica = SoggettoLocalServiceUtil.getValidTmpByIntPratica(intPraticaId); + boolean dlPresente = false; + boolean collaudatorePresente = false; + boolean dittaPresente = false; + boolean progettistaPresente = false; for (Soggetto soggetto : soggettiPratica) { soggettiRichiesti.remove(soggetto.getTipologiaSoggetto()); + if(soggetto.getTipologiaSoggetto() == TipoSoggettoUtil.DIRETTORE_LAVORI) + dlPresente = true; + if(soggetto.getTipologiaSoggetto() == TipoSoggettoUtil.COLLAUDATORE) + collaudatorePresente = true; + if(soggetto.getTipologiaSoggetto() == TipoSoggettoUtil.DITTA) + dittaPresente = true; + if(soggetto.getTipologiaSoggetto() == TipoSoggettoUtil.PROGETTISTA) + progettistaPresente = true; } + if (direttoreLavoriNotRequired) { soggettiRichiesti.remove(TipoSoggettoUtil.DIRETTORE_LAVORI); - if(Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleDirettoreLavori())) - notCompleted.add("Rimuovere "+LanguageUtil.get(LocaleUtil.getDefault(), "gc-soggetto-"+TipoSoggettoUtil.DIRETTORE_LAVORI)+" da soggetti censiti"); + if(dlPresente) + notCompleted.add("Rimuovere "+LanguageUtil.get(LocaleUtil.getDefault(), "gc-soggetto-"+TipoSoggettoUtil.DIRETTORE_LAVORI)+" da soggetti censiti"); } + if (collaudatoreNotRequired) { soggettiRichiesti.remove(TipoSoggettoUtil.COLLAUDATORE); - if(Validator.isNotNull(dettPratica.getCodiceFiscaleDelegatoCollaudo()) || - Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleCollaudatore())) - notCompleted.add("Rimuovere "+LanguageUtil.get(LocaleUtil.getDefault(), "gc-soggetto-"+TipoSoggettoUtil.COLLAUDATORE)+" da soggetti censiti"); + if(collaudatorePresente) + notCompleted.add("Rimuovere "+LanguageUtil.get(LocaleUtil.getDefault(), "gc-soggetto-"+TipoSoggettoUtil.COLLAUDATORE)+" da soggetti censiti"); } + if (dittaNotRequired) { soggettiRichiesti.remove(TipoSoggettoUtil.DITTA); - if(Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleDitta())) - notCompleted.add("Rimuovere "+LanguageUtil.get(LocaleUtil.getDefault(), "gc-soggetto-"+TipoSoggettoUtil.DITTA)+" da soggetti censiti"); + if(dittaPresente) + notCompleted.add("Rimuovere "+LanguageUtil.get(LocaleUtil.getDefault(), "gc-soggetto-"+TipoSoggettoUtil.DITTA)+" da soggetti censiti"); } - if(Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleCollaudatore())){ + if(collaudatorePresente){ String codFiscaleCollaudatore = dettPratica.getCodiceFiscalePrincipaleCollaudatore(); if(Validator.isNotNull(dettPratica.getCodiceFiscaleDelegatoCollaudo())) codFiscaleCollaudatore = dettPratica.getCodiceFiscaleDelegatoCollaudo(); - if(Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleProgettista()) && - (codFiscaleCollaudatore.equals(dettPratica.getCodiceFiscalePrincipaleProgettista())) - ) + + if(progettistaPresente && codFiscaleCollaudatore.equals(dettPratica.getCodiceFiscalePrincipaleProgettista())) notCompleted.add("Il collaudatore non può essere il progettista"); - if(Validator.isNotNull(dettPratica.getCodiceFiscalePrincipaleDirettoreLavori()) && - (codFiscaleCollaudatore.equals(dettPratica.getCodiceFiscalePrincipaleDirettoreLavori())) - ) - notCompleted.add("Il collaudatore non può essere il direttore lavori"); + if(dlPresente && codFiscaleCollaudatore.equals(dettPratica.getCodiceFiscalePrincipaleDirettoreLavori())) + notCompleted.add("Il collaudatore non può essere il direttore lavori"); } for (String soggetto : soggettiRichiesti) { diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java index f8902fe6..56e2a7b6 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/service/impl/AsseverazioneLocalServiceImpl.java @@ -240,7 +240,7 @@ public class AsseverazioneLocalServiceImpl extends AsseverazioneLocalServiceBase .replaceAll("\\s*##lavoripubblici(.*?)##\\s*", dettPratica.getLavoriPubblici() ? StringPool.BLANK : "$1") .replaceAll("\\s*##A10(.*?)##\\s*", - dettPratica.getTcInterventoOpereEscavazione() ? StringPool.BLANK : "$1") + !dettPratica.getTcNoOpereEscavazione() ? StringPool.BLANK : "$1") .replace("{{agalto}}", agAlto ? "X" : StringPool.SPACE) .replace("{{agmedio}}", agMedio ? "X" : StringPool.SPACE) .replace("{{agricoli}}", agricoli ? "X" : StringPool.SPACE).replace("{{codicefiscale}}", codiceFiscale) diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties index 84009238..b0f6af20 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=portos_bo - build.number=3247 - build.date=1627641893090 + build.number=3249 + build.date=1627893517146 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp index 936a2eeb..4cb9b02a 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/navigator/domanda/page_dettagli_principali.jsp @@ -782,19 +782,20 @@ $('#long, #lat').on('change', function() $('#sistemi_costruttivi input').on('change', function() { var _this = $(this); if(_this.attr('id')=='tcInterventiCheckbox'){ - if(!_this.is(":checked")){ - $('.costruzioni_esistenti ul input[type="checkbox"]').prop("checked", false).attr("disabled", true); - } else { - $('.costruzioni_esistenti ul input[type="checkbox"]').attr("disabled", false).removeClass("disabled"); + if(!_this.is(":checked")){ + enableDisableChk('.costruzioni_esistenti ul input[type="checkbox"]', 'not_enable', true); + } else { + enableDisableChk('.costruzioni_esistenti ul input[type="checkbox"]', 'not_enable', false); } } //ADT BUG FE ID = 23 if($('#tc-nuova-costruzioneCheckbox').prop('checked')|| $('#tcAdeguamentoSismicoCheckbox').prop('checked')|| $('#tcMiglioramentoSismicoCheckbox').prop('checked')){ - $('#collaudoStaticoCheckbox').prop("checked", false).attr("disabled", true); + + enableDisableChk('#collaudoStaticoCheckbox', 'not_enable', true); } else if ($('#tcRiparazioneInterventoLocaleCheckbox').prop('checked')) { - $('#collaudoStaticoCheckbox').prop("checked", false).removeAttr('disabled'); + enableDisableChk('#collaudoStaticoCheckbox', 'not_enable', false); } //checkIfDisableSistemiCostruttivi(); }); @@ -868,86 +869,85 @@ $('#lavoriPubbliciCheckbox, #intervFinPu ]; if (_this.is(":checked")){ $.each(toDisable, function(index, val) { - $('#'+val+'Checkbox').attr('disabled', true).prop('disabled', true).prop('checked', false); + enableDisableChk('#'+val+'Checkbox', 'not_enable', true); }); - $('.excludeOther[data-cont="viarch"] input[type="checkbox"]').removeAttr('disabled'); - $('.excludeOther[data-cont="viarch"] input[type="checkbox"]').prop('disabled', false); + + enableDisableChk('.excludeOther[data-cont="viarch"] input[type="checkbox"]', 'not_enable', false); } else { $.each(toDisable, function(index, val) { - $('#'+val+'Checkbox').removeAttr('disabled'); - $('#'+val+'Checkbox').prop('disabled', false); + enableDisableChk('#'+val+'Checkbox', 'not_enable', false); }); - $('.excludeOther[data-cont="viarch"] input[type="checkbox"]').attr('disabled', true).prop('disabled', true).prop('checked', false); - + enableDisableChk('.excludeOther[data-cont="viarch"] input[type="checkbox"]', 'not_enable', true); } }); $('.excludeOther input[type="checkbox"]').change(function (e) { var cont = $(this).parents('.excludeOther').data('cont'); $('.excludeOther[data-cont="'+cont+'"] input[type="checkbox"]').not(this).prop('checked', false).removeAttr('checked'); + $.each($('.excludeOther[data-cont="'+cont+'"] input[type="checkbox"]').not(this), function(index, val) { + $(val).prev('input[type="hidden"]').val(false); + }); }); $('#intervFinPubCheckbox').change(function () { var _this = $(this); if (_this.is(":checked")) { - $('#lavoriPubbliciCheckbox').attr('checked', 'checked').prop('checked', true); + enableDisableChk('#lavoriPubbliciCheckbox', 'enable', false); } else { - $('#lavoriPubbliciCheckbox').removeAttr('checked'); - $('#lavoriPubbliciCheckbox').prop('checked', false); + enableDisableChk('#lavoriPubbliciCheckbox', 'not_enable', false); } }); $('#tc-no-opere-escavazioneCheckbox').change(function () { if ($(this).is(":checked")){ - $('#tc-intervento-opere-escavazioneCheckbox').removeAttr('checked'); - $('#tc-intervento-opere-escavazioneCheckbox').prop('checked', false); + enableDisableChk('#tc-intervento-opere-escavazioneCheckbox', 'not_enable', false); } }); $('#tc-intervento-opere-escavazioneCheckbox').change(function () { if ($(this).is(":checked")){ - $('#tc-no-opere-escavazioneCheckbox').removeAttr('checked'); - $('#tc-no-opere-escavazioneCheckbox').prop('checked', false); + enableDisableChk('#tc-no-opere-escavazioneCheckbox', 'not_enable', false); } }); $('#tc-manut-ord-straordCheckbox, #tc-nuova-costruzione-pertinenzaCheckbox').change(function () { var _this = $(this); if (_this.is(":checked")) { - $('#tc-costruzioni-esistentiCheckbox').prop('checked', true).attr('checked', true); - $('#tc-costruzioni-esistentiCheckbox').prop('disabled', true).attr('disabled', true); + enableDisableChk('#tc-no-opere-escavazioneCheckbox', 'enable', true); }else{ - $('#tc-costruzioni-esistentiCheckbox').prop('checked', false).attr('checked', false); - $('#tc-costruzioni-esistentiCheckbox').prop('disabled', false).attr('disabled', false); + enableDisableChk('#tc-no-opere-escavazioneCheckbox', 'not_enable', false); } }); $('#normEsenteBolloCheckbox').change(function () { var _this = $(this); if (_this.is(":checked")){ - $('#lavoriPubbliciCheckbox').prop('checked', true).attr('checked', true); + enableDisableChk('#lavoriPubbliciCheckbox', 'enable', false); }else{ - $('#lavoriPubbliciCheckbox').prop('checked', false).attr('checked', false); + enableDisableChk('#lavoriPubbliciCheckbox', 'not_enable', false); } }); $('#collaudoStaticoCheckbox').change(function () { var _this = $(this); if (_this.is(":checked")){ - $('#noCollaudoCheckbox').prop('checked', true).attr('checked', true).attr("disabled", true); - $('#tc-nuova-costruzioneCheckbox').prop("checked", false).attr("disabled", true); - $('#tcInterventiCheckbox').prop("checked", true).attr("disabled", true); - $('#tcAdeguamentoSismicoCheckbox').prop("checked", false).attr("disabled", true); - $('#tcMiglioramentoSismicoCheckbox').prop("checked", false).attr("disabled", true); + enableDisableChk('#noCollaudoCheckbox', 'enable', true); + enableDisableChk('#tcInterventiCheckbox', 'enable', true); + enableDisableChk('#tc-nuova-costruzioneCheckbox', 'not_enable', true); + enableDisableChk('#tcAdeguamentoSismicoCheckbox', 'not_enable', true); + enableDisableChk('#tcMiglioramentoSismicoCheckbox', 'not_enable', true); + $('#tcRiparazioneInterventoLocaleCheckbox').removeAttr("disabled"); $('#tcRiparazioneInterventoLocaleCheckbox').removeClass('disabled'); }else { - $('#noCollaudoCheckbox').prop('checked', false).attr('checked', false).attr("disabled", false); + + enableDisableChk('#noCollaudoCheckbox', 'not_enable', false); + enableDisableChk('#tcInterventiCheckbox', 'not_enable', false); + enableDisableChk('#tcAdeguamentoSismicoCheckbox', 'not_enable', true); + enableDisableChk('#tcMiglioramentoSismicoCheckbox', 'not_enable', true); + enableDisableChk('#tcRiparazioneInterventoLocaleCheckbox', 'not_enable', true); + $('#tc-nuova-costruzioneCheckbox').removeAttr("disabled"); - $('#tcInterventiCheckbox').prop("checked", false).removeAttr("disabled"); - $('#tcAdeguamentoSismicoCheckbox').prop("checked", false).attr("disabled", true); - $('#tcMiglioramentoSismicoCheckbox').prop("checked", false).attr("disabled", true); - $('#tcRiparazioneInterventoLocaleCheckbox').prop("checked", false).attr("disabled", true); } }); function checkCollaudoStatico(){ @@ -958,17 +958,18 @@ function checkCollaudoStatico(){ collaudostatico = AUI().one("#collaudoStaticoCheckbox"); if(collaudostatico.attr("checked") ){ - $('#tc-nuova-costruzioneCheckbox').prop("checked", false).attr("disabled", true); - $('#tcInterventiCheckbox').prop("checked", true).attr("disabled", true); - $('#tcAdeguamentoSismicoCheckbox').prop("checked", false).attr("disabled", true); - $('#tcMiglioramentoSismicoCheckbox').prop("checked", false).attr("disabled", true); + enableDisableChk('#tc-nuova-costruzioneCheckbox', 'not_enable', true); + enableDisableChk('#tcInterventiCheckbox', 'enable', true); + enableDisableChk('#tcAdeguamentoSismicoCheckbox', 'not_enable', true); + enableDisableChk('#tcMiglioramentoSismicoCheckbox', 'not_enable', true); + $('#tcRiparazioneInterventoLocaleCheckbox').removeAttr("disabled"); $('#tcRiparazioneInterventoLocaleCheckbox').removeClass('disabled'); } if(nuovaCostruzione.attr("checked")|| adeguamentoSismico.attr("checked")|| - miglioramentoSismico.attr("checked")){ - $('#collaudoStaticoCheckbox').prop("checked", false).attr("disabled", true); + miglioramentoSismico.attr("checked")){ + enableDisableChk('#collaudoStaticoCheckbox', 'not_enable', true); } else if (interventoLocale.attr("checked")) { $('#collaudoStaticoCheckbox').removeAttr('disabled'); } @@ -982,4 +983,24 @@ $("#interventoVoceP7").on("keypress keyup blur",function (ev } }); +function enableDisableChk(obj, action, disable){ + if(action == 'enable'){ + $(obj).prop("checked", true); + $(obj).attr('checked', true); + $(obj).prev('input[type="hidden"]').val("on"); + }else{ + $(obj).prop("checked", false); + $(obj).attr('checked', false); + $(obj).prev('input[type="hidden"]').val(false); + } + + if(disable){ + $(obj).attr("disabled", true); + $(obj).prop("disabled", true); + }else{ + $(obj).attr("disabled", false); + $(obj).prop("disabled", false); + } +} + \ No newline at end of file