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
| /** | |
| Altera a mensagem de um campo required com a classe field-required html5 | |
| */ | |
| $('.field-required').on('invalid', function() { | |
| var textfield = $(this).get(0); | |
| var msg = $(this).attr('msg') || 'O preenchimento deste campo é obrigatório'; |
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
| $path = Router::url(array('controller'=> 'forms','action'=>'view','plugin'=>'projeto')); | |
| $host = Router::url('/', true); |
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
| grep -rl 'PalavraAntiga' diretorio/ | xargs sed -i 's/PalavraAntiga/PalavraNovo/g' |
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
| function getAllElementsWithAttribute(attribute) | |
| { | |
| var matchingElements = []; | |
| var allElements = document.getElementsByTagName('*'); | |
| for (var i = 0, n = allElements.length; i < n; i++) | |
| { | |
| if (allElements[i].getAttribute(attribute)) | |
| { | |
| // Element exists with attribute. Add to array. | |
| matchingElements.push(allElements[i]); |
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
| var nodesArray = Array.prototype.slice.call(document.querySelectorAll("div")); | |
| var nodesArray = [].slice.call(document.querySelectorAll("div")); |
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
| $conditions = array( 'conditions' => array( | |
| 'OR' => array( array( 'TaxasInscricao.data_inicio ' => null ,'TaxasInscricao.data_fim' => null ), | |
| array( 'TaxasInscricao.data_inicio >= ' => $now , 'TaxasInscricao.data_fim <= ' => $now ), | |
| array( 'TaxasInscricao.data_inicio ' => null , 'TaxasInscricao.data_fim <= ' => $now ), | |
| array( 'TaxasInscricao.data_inicio ' => $now , 'TaxasInscricao.data_fim ' => null ) | |
| ))); |
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
| $associacos = $this->Associaco->find('all',array( 'fields' => array( 'cod_associacao', 'cod_pj_associacao','"PessoasJuridica"."razao_social" AS "Associaco__razao_social"'), | |
| 'conditions' => array( 'Associaco.cod_convencao' => Configure::read('SGO.cod_convencao')), | |
| 'contain' => '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
| function select($fields = '*') { | |
| $this->QueryBuilder = "SELECT $fields "; | |
| return $this; | |
| } | |
| function from($model){ | |
| $this->QueryBuilder .= ' '.ClassRegistry::init($model)->table.' '; | |
| return $this; | |
| } |
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
| $entradas_financeiras = $this->EntradasFinanceira->find('all', array( | |
| 'contain' => array('PessoasFisica', 'PessoasJuridica.IgrejasCbb', 'Organizacao.IgrejasCbb'), | |
| 'conditions' => array( 'data_entrada_financeira >' => $data_inicio, | |
| 'data_entrada_financeira <' => $data_fim ) | |
| )); | |
| $saidas_financeiras = $this->SaidasFinanceira->find('all', array( | |
| 'contain' => array('PessoasFisica', 'PessoasJuridica.IgrejasCbb', 'Organizacao.IgrejasCbb'), | |
| 'conditions' => array( | |
| 'data_saida_financeira >' => $data_inicio, |
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
| var TableToCSV = { | |
| tableClass : '.relatorio', | |
| tr : function(){ | |
| return document.querySelectorAll( this.tableClass + ' tr '); | |
| }, | |
| getDataInTable : function(){ | |