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
navigator.geolocation.getCurrentPosition(function(position){ | |
var latitude = position.coords.latitude; | |
var longitude = position.coords.longitude; | |
var request = new XMLHttpRequest(); | |
request.responseType = 'json'; | |
request.onreadystatechange = function(){ | |
console.log(request.response.results[0].formatted_address); | |
} | |
request.open("GET","https://maps.googleapis.com/maps/api/geocode/json?latlng="+latitude+", "+longitude+"&sensor=true",true); | |
request.send(null); |
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
.modal-mensagens { | |
position: absolute; | |
top: 0px; | |
left: 0px; | |
width: 100%; | |
height: 100%; | |
.backdrop-modal { | |
background: rgba(0, 0, 0, 0.6); | |
position: fixed; | |
top: 0px; |
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
define([], function () { | |
return { | |
abrir: function (conteudo, callback) { | |
var self = this; | |
self.fechar(); | |
var modal = self.modalGenerica.replace('#CONTEUDO#', conteudo); | |
$("body").append(modal); | |
$("body").scrollTop(0); |
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
@Component | |
public class EntityManagerProxy implements InvocationHandler { | |
private Logger log = LogManager.getLogger(EntityManagerProxy.class); | |
/** | |
* Read-only db mirror for increased performance on select queries. |
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
var modalGenerico = { | |
abrir: function (conteudo, callback) { | |
var self = this; | |
self.fechar(); | |
var modal = self.modalGenerica.replace('#CONTEUDO#', conteudo); | |
$("body").append(modal); | |
$("body").scrollTop(0); | |
$(document).off("click", "#modal-default .backdrop-modal, #modal-default .fechar-modal") |
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
window.alert = function(message, title, opts){ | |
if(opts) | |
{ | |
myCustomMessage = '<br /><ul id="minha-assinatura-buttons">' + | |
'<li class="atendimento-online">' + | |
'<p>Atendimento On-Line</p>' + | |
'<a href="#" target="_blank" title="" class="atendimento-online">' + | |
'<img src="#" class="ico">' + | |
'<span>Clique aqui para falar com um de nossos atendentes</span>' + | |
'</a>' + |
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 br.com.infoglobo.consumidor.monitor.configuration.JBrowserConfiguration | |
import br.com.infoglobo.consumidor.monitor.model.JBrowser | |
import br.com.infoglobo.consumidor.monitor.model.TipoDispositivo | |
import com.machinepublishers.jbrowserdriver.JBrowserDriver | |
import com.machinepublishers.jbrowserdriver.Settings | |
import spock.lang.Specification | |
class JBrowserSpec extends Specification { | |
JBrowser browser |
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
def lista = [] | |
def mapa = [:] |
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
def novoUsuario = new Usuario( | |
email: form.email, | |
nome: form.nome, | |
senha: protetor.encode(form.senha), | |
provedor: Provedor.FORM.name(), | |
ativo: true, | |
cadastro: new Date() | |
) |
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
bindResult.fieldErrors.each { erro -> | |
erros.push("${erro.getField()}: ${erro.defaultMessage}") | |
} |