Skip to content

Instantly share code, notes, and snippets.

View emanueljtc's full-sized avatar
🏠
Working from home

Emanuel Torres Clemente emanueljtc

🏠
Working from home
View GitHub Profile
/* CODIGO QUE PERMITE DARLE A X CHECKBOX EL COLOR DE FONDO QUE SE NECESITE SOLO
REMPLAZANDO EL COLOR DE LA VARIABLE $bg-color. */
@import "./mixins/mixins";
$speed: 0.6s;
$gray-dark: #252525;
$bg-color: #c29a69;
$default-spacing: 1rem;
@keyframes effect-in {
var asd = document.querySelectorAll('span.MaterialContent-duration')
window.counter = 0;
asd.forEach(function(el){
var strel = el.innerHTML.split(':')[0];
if(strel.length > 0){
window.counter += parseInt(strel, 10)
} else {
return
}
});
<script type="text/javascript">
function confirmar() {
confirmar = confirm("¿Desea Actualiza el Paciente?")
if(confirmar) {
document.Person.submit()
return true;
}else{
location.reload(true);
return false;
public $virtualFields = array(
'full_name' => 'CONCAT(name, " ", last_name)',
'idcargo' => 'Personal.position_id',
'idpersonal' => 'Personal.id',
'cedula' => 'Personal.dni',
'estatus' => 'Personal.status',
);
@emanueljtc
emanueljtc / Function Buscar
Created November 21, 2016 01:32
Funcion buscar
public function getPalabraByPersonal() {
if ($this->request->is('ajax')) {
$cedula = $this->params['data']['dni'];
$personal = $this->Personal->find('all',array(
'fields' => array('Personal.idpersonal','Personal.full_name','Personal.cedula'),
'conditions'=>array('Personal.cedula LIKE'=>'%'. $cedula. '%')));
$this->RequestHandler->respondAs('json');
<?php
/**
* Helper de CakePHP para añadir lista de paises y generos de sexo en cualquier input necesario
* Devolpers: Emanuel Torres Clemente
* https://github.com/emanueljtc
* LLamado $this->General->Genero;
* $this->General->Paises;
*/
App::uses('AppHelper', 'View/Helper');