38
| <![CDATA[<script>
$(function(){
$.ajaxSetup({ cache: false }); // IE was caching get ajax calls
$.extend(
{
redirectPost: function(location, args)
{
var form = $('<form></form>');
form.attr("method", "post");
form.attr("action", location);
$.each( args, function( key, value ) {
var field = $('<input></input>');
field.attr("type", "hidden");
field.attr("name", key);
field.attr("value", value);
form.append(field);
});
$(form).appendTo('body').submit();
}
});
});
</script>]]>
|
686
| <![CDATA[<script>//<![CDATA[
$(function(){
$('#panel-avancada .radio').on('click', 'label', function(){
$('.panel-content').addClass('hide');
var el = $(this).parent().attr('data-toggle');
$('#' + el).removeClass('hide');
});
});
//]]></script>]]>
|
1068
| <![CDATA[<script>
$(document).ready(function(){
(function() { $('.date').mask('99/99/9999'); })();
$('#register-modal .modal-footer > button').click(Register);
prepareAutoComplete();
});
function prepareAutoComplete(){
var builder = function(response) {
var list = [];
for (var x in response){
if (response[x] != null){
var node = jQuery('<li>');
node.addClass('item item-autocomplete');
node.attr('data-city-id', response[x].id);
node.attr('value', response[x].value);
node.html(response[x].label);
list.push(node);
}
}
return list;
};
var onSelect = function(item){
$('#city-input').val(item.attr('data-city-id'));
};
var xhrConfig = {
url: '/apiproxy/municipais/cidades/_search',
method: 'GET',
field: 'q'
};
return new AutoComplete({
field: $('#city-input-text'),
xhr: xhrConfig,
builder: builder,
onSelect: onSelect,
autoSelect: false,
data: [
'value',
'data-city-id',
]
});
}
function EnableButton() {
$('#register-modal .modal-footer > button').prop("disabled", false);
$('#register-modal .modal-footer > button').text("Cadastrar");
}
function DisableButton() {
$('#register-modal .modal-footer > button').prop("disabled", true);
}
function IsCity() {
return window.location.pathname.split("/")[1] != "a";
}
function Register() {
$('.g-recaptcha').removeClass('hidden');
reCaptchaCallback = registerUser;
alertify.success("Cadastrando...");
grecaptcha.execute();
function registerUser(token) {
var data = {};
data.name = $('#register-name').val();
data.city = $('#city-input-text').attr("data-city-id");
data.password = $('#register-password').val();
data.email = $('#register-email').val();
data.username = $('#register-email').val();
data.occupation = $('#register-cargo').val();
data.birthdate = $('#register-birthdate').val();
data.servidor = $('#register-servidor input[type="radio"]:checked').val();
data.origin = (IsCity()) ? 2 : 1;
data.pass = token
DisableButton();
$('#register-modal .modal-footer > button').text("Cadastrando...");
$.ajax({
url: "/registrar",
data: data,
method: "POST",
success: function () {
$('#register-modal .modal-footer > button').text("Fazendo login...");
$.ajax({
url: "/login",
data: data,
method: "POST",
success: function () {
EnableButton();
$('#register-modal').modal('hide');
alertify.success("Cadastro realizado com sucesso!");
location.reload();
}
});
},
error: function (err) {
EnableButton();
var message = "Erro desconhecido.";
message = JSON.parse(err.responseText).message;
alertify.error(message);
}
});
}
}
</script>]]>
|
1180
| <![CDATA[<script>
$('document').ready(function(){
$('.open-register-modal').click(function(e){
e.preventDefault()
$('#modal-login').modal('hide')
setTimeout(function(){ $('#register-modal').modal('show') }, 500);
});
})
</script>]]>
|
1211
| <![CDATA[<script>
$('document').ready(function()
{
$('.toogle').click(function()
{
var button = $(this)
if (button.hasClass('active'))
{
button.removeClass("active")
button.parent().find('.list').removeClass('active')
}
else
{
button.addClass("active")
button.parent().find('.list').addClass('active')
}
})
})
</script>]]>
|
1233
| <![CDATA[<script>
$(function(){
$('*[rel="tooltip"]').tooltip( {trigger : 'hover', html : true, container: 'body'} );
$('.panel-group').collapse({ toggle: false });
$('button.btn-connect').click(function(event) {
$('.login-box').show();
// $('.login-box .message').text($(this).attr('data-message'));
$('html').click(function(event) {
if ($(event.target).parents('.login-box').length === 0) {
$('.login-box').hide();
$(this).unbind(event);
$('.login-box .message').text('');
}
});
return false;
});
$('.top-bar-read-more').click(function(e){
$('header .subtitle').addClass('expanded');
$('header .subtitle span.top-bar-more').show();
$('.top-bar-hide-more').show();
$('.top-bar-read-more').hide();
$('h1.navbar-brand .big-title-text').hide();
})
$('.top-bar-hide-more').click(function(e){
$('header .subtitle').removeClass('expanded');
$('header .subtitle span.top-bar-more').hide();
$('.top-bar-hide-more').hide();
$('.top-bar-read-more').show();
$('h1.navbar-brand .big-title-text').show();
});
});
</script>]]>
|
1275
| <![CDATA[<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-3120542-1', 'auto');
// Fix do alerta de publicidade
ga('require', 'displayfeatures');
ga('send', 'pageview');
</script>]]>
|
1288
| <![CDATA[<script>
var $buoop = {l:"pt", reminder: 0};
$buoop.ol = window.onload;
window.onload=function(){
try {if ($buoop.ol) $buoop.ol();}catch (e) {}
var e = document.createElement("script");
e.setAttribute("type", "text/javascript");
e.setAttribute("src", "//browser-update.org/update.js");
document.body.appendChild(e);
}
</script>]]>
|