This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<listener> | |
<listener-class>org.jboss.weld.environment.servlet.Listener</listener-class> | |
</listener> | |
<resource-env-ref> | |
<resource-env-ref-name>BeanManager</resource-env-ref-name> | |
<resource-env-ref-type> | |
javax.enterprise.inject.spi.BeanManager | |
</resource-env-ref-type> | |
</resource-env-ref> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Context> | |
<Manager pathname=""/> <!-- disables storage of sessions across restarts --> | |
<Resource name="BeanManager" | |
auth="Container" | |
type="javax.enterprise.inject.spi.BeanManager" | |
factory="org.jboss.weld.resources.ManagerObjectFactory"/> | |
</Context> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.field-required').on('invalid', function() { | |
var textfield = $(this).get(0); | |
var msg = $(this).attr('msg') || 'O preenchimento deste campo é obrigatório'; | |
textfield.setCustomValidity(''); | |
if (!textfield.validity.valid) { | |
textfield.setCustomValidity(msg); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//if and repeated code | |
if($saidas[0]['SaidasFinanceira']['cod_pf_recebedor']!=''){ | |
$dadosEntidade = $saidas[0]['PessoasFisica']; | |
$codEntidade = $saidas[0]['SaidasFinanceira']['cod_pf_recebedor']; | |
$tipoEntidade = 'PF'; | |
}else if($saidas[0]['SaidasFinanceira']['cod_pj_recebedor']!=''){ | |
$dadosEntidade = $saidas[0]['PessoasJuridica']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//old code | |
private function retornaEndereco($tipoEntidade,$codEntidade){ | |
//Verifica o tipo da entidade | |
switch($tipoEntidade){ | |
case 'PF': | |
return | |
// retorna o endereco da pessoa Fisica | |
$this->EnderecoPf->find('first' | |
,array( | |
'joins'=>array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Debug ativo nivel 2, e Model (qualquer model que contenha uma tabela e esteja listada em $uses.) | |
$log = $this->Model->getDataSource()->getLog(false, false); | |
older versions | |
$log = $this->Model->getDataSource()->showLog( false ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$this->paginate = array('conditions'=>array('id'=>1),'fields'=>'lat'); | |
$result = $this->paginate('Model'); | |
or | |
$this->paginate('model',array('conditions')); | |
$result = $this->paginate('Model',array('id'=>1)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$options = array(); | |
foreach($forms[0]['Field'] as $k => $v){ | |
echo $this->Form->input($v['name'],array('type'=>strtolower($v['type']),'placeholder'=>$v['description'],'options'=>$options)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).on('click','.add-option',function(){ | |
$(this).removeClass('add-option btn-success').addClass('rm-option btn-danger').text('-'); | |
option_input = "<input type=\"text\" class=\"options\" placeholder=\"Digite uma opção\" /><button class=\"add-option btn btn-success\" type=\"button\">+</button>"; | |
$('.option').append(option_input); | |
}).on('click', '.rm-option', function(){ | |
$(this).prev().remove(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo Configure::version(); |
OlderNewer