This file contains 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
/* Set the defaults for DataTables initialisation */ | |
jQuery.extend(true, jQuery.fn.dataTable.defaults, { | |
"sDom": '<"dt-panelmenu clearfix"lfr>t<"dt-panelfooter clearfix"ip>', //sem TableTools | |
// "sDom": 'T<"dt-panelmenu clearfix"lfr>t<"dt-panelfooter clearfix"ip>', //com TableTools | |
"sPaginationType": "bootstrap", | |
"oLanguage": { | |
"sEmptyTable": "Nenhum registro encontrado", | |
"sInfo": "Exibindo _START_ até _END_ de _TOTAL_ registros", | |
"sInfoEmpty": "Exibindo 0 até 0 de 0 registros", |
This file contains 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 (!isset($this->data[$this->alias]['slug']) || empty($this->data[$this->alias]['slug'])) { | |
$this->data[$this->alias]['slug'] = Inflector::slug(strtolower($this->removeAcentos($this->data[$this->alias]['nome'])), '-'); | |
} else { | |
$this->data[$this->alias]['slug'] = Inflector::slug(strtolower($this->removeAcentos($this->data[$this->alias]['slug'])), '-'); | |
} |
This file contains 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( | |
'Pagina.menu' => 1, | |
'Pagina.habilitar' => 1, | |
'Pagina.pai' => null, | |
'Pagina.slug NOT IN ' => $slug | |
); | |
$fields = array('titulo', 'slug', 'preview'); | |
$order = 'Pagina.lft ASC'; |
This file contains 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
public function beforeSave($options = array()) { | |
if (!isset($this->data[$this->alias]['soft_delete'])) { | |
$this->data[$this->alias]['soft_delete'] = 0; | |
} else { | |
//na duvida, faz um exit(debug($this->data)); | |
$this->data[$this->alias]['soft_delete'] = $this->data[$this->alias]['valor_que_enviar']; | |
} | |
return true; |
This file contains 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
/* BUSCA PAGINATE */ | |
$this->Profissional->recursive = -1; | |
$joins = array(); | |
$joins[] = array( | |
'table' => 'profissionais_subcategorias', | |
'alias' => 'ProfissionaisSubcategorias', | |
'type' => 'INNER', | |
'foreignKey' => false, | |
'conditions' => array( | |
'ProfissionaisSubcategorias.profissional_id = Profissional.id' |
This file contains 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 $this->Form->input('cnpj', array( | |
'between' => '<div class="col-sm-3">', | |
'class' => 'gui-input', | |
'id' => 'cnpj', | |
'label' => 'CNPJ') | |
); | |
echo $this->Html->scriptBlock(" |
This file contains 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
//No Controller | |
$conditions = array('AnunciantesCategoria.anunciante_id' => $id); | |
$fields = array('AnunciantesCategoria.id'); | |
$AnunciantesCategoriaId = $this->AnunciantesCategoria->find('all', compact('conditions', 'fields')); | |
foreach ($AnunciantesCategoriaId as $k => $v) { | |
$selecionadas[] = $v['AnunciantesCategoria']['id']; | |
} | |
$fields = array('Categoria.id', 'Categoria.nome'); |
This file contains 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
public function AdminFileInputNew($position = null, $input = null, $field = null) { | |
$position = !isset($position) ? 0 : $position; | |
$field = !isset($field) ? 'arquivo' : $field; | |
$input = !isset($input) ? 'Imagem' : $input; | |
$fileInput = ' | |
<script type="text/javascript" src="' . $this->params->base . '/media/js/fileinput.js"></script> | |
<div class="form-group"> | |
<label class="col-sm-2 control-label">' . ucfirst($input) . ':</label> |
This file contains 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
import { Directive, HostListener, Input, ElementRef, forwardRef } from '@angular/core'; | |
import { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms'; | |
@Directive({ | |
selector: "[cep]", //selector de atributo | |
providers: [ | |
{ | |
provide: NG_VALUE_ACCESSOR, | |
useExisting: forwardRef(() => CepDirective), | |
multi: true | |
} |
This file contains 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
{ | |
"clinicas": [ | |
{ | |
"Clinica": { | |
"id": "13", | |
"nome": "Instituto Maring\u00e1 de Imagem ", | |
"slug": "instituto-maringa-de-imagem", | |
"arquivo": "logo site 220x220.png", | |
"descricao": " \r\n ", | |
"website": "http:\/\/www.institutoimagem.med.br\/", |
OlderNewer