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
/** | |
* Redireciona para a url anterior | |
*/ | |
public function redirectBack() | |
{ | |
$this->redirect($this->referer()); | |
return $this; | |
} |
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
jQuery(document).ready(function(){ | |
/** | |
* Set ajax Option | |
*/ | |
var statusCodes = { | |
403:function(){ | |
alert('Você não está mais logado, clique em OK para ser redirecionado para a página de Login!'); |
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
//Pega elemento Option de acordo com o atributo value de um select. | |
var elemento = jQuery('select#idFromSelect[value='+value+']'); | |
//texto do elemento | |
element.text(); |
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
[ | |
{ | |
phone:'21999999999', | |
message:'Enviado com Sucesso', | |
status:true | |
}, | |
{ | |
phone: '2199999999', | |
message:'Número inválido, verifique formatação', | |
status:false |
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
<?php | |
/** | |
* Interface para status de Data de Atualização do Imóvel | |
*/ | |
class StatusAtualizacao{ | |
private $label = 'Atualizado de %s a %s dias'; |
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
<?php | |
App::uses('AppController','Controller'); | |
class CaixasController extends AppController{ | |
//inicialize os models junto com o controller | |
public $uses = array('Loja','Caixa'); | |
//Sua Action |
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
<script> | |
window.calcular: function(idCampo1,idCampo2,idResultado) | |
{ | |
//Obtem valor do primeiro campo | |
var fator1 = document.getElementById(idCampo1).value; | |
//Obtem valor do segundo campo | |
var fator2 = document.getElementById(idCampo2).value; | |
//Aplica some e obtem o resultado |
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
<?php | |
//Adiciona style | |
echo $this->Html->css('fullcalendar/fullcalendar.css',array('inline'=>false)); | |
//Adiciona script | |
echo $this->Html->script('lib/jquery.js',array('inline'=>false)); | |
echo $this->Html->script('lib/moment.js',array('inline'=>false)); | |
echo $this->Html->script('fullcalendar/fullcalendar.js',array('inline'=>false)); |
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
<!-- Container de para renderização do FullCalendar --> | |
<div id="Calendar"></div> | |
<?php | |
//Adiciona style | |
echo $this->Html->css('fullcalendar/fullcalendar.css',array('inline'=>false)); | |
//Adiciona script |
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
<!-- Container de para renderização do FullCalendar --> | |
<div id="Calendar"></div> | |
<?php | |
//Adiciona style | |
echo $this->Html->css('fullcalendar/fullcalendar.css',array('inline'=>false)); | |
//Adiciona script |
OlderNewer