alerta_numero=0;
function nueva_alerta(html){
alerta_numero=alerta_numero+1;
html='
'+html+'
';
$('#alertas_mensajes').append(html);
accionar_nueva_alerta(alerta_numero);
return;
}
function alerta_estandar(titulo,mensaje){
alerta_numero=alerta_numero+1;
html_template='';
html=html_template.replace('--numero--',alerta_numero);
html=html.replace('--titulo--',titulo);
html=html.replace('--texto--',mensaje);
html=html.replace('--display--','display:none;');
$('#alertas_mensajes').append(html);
accionar_nueva_alerta(alerta_numero);
return;
}
function alerta_error(titulo,mensaje){
alerta_numero=alerta_numero+1;
html_template='';
html=html_template.replace('--numero--',alerta_numero);
html=html.replace('--titulo--',titulo);
html=html.replace('--texto--',mensaje);
html=html.replace('--display--','display:none;');
$('#alertas_mensajes').append(html);
accionar_nueva_alerta(alerta_numero);
return;
}
function alerta_confirmacion(titulo,mensaje){
alerta_numero=alerta_numero+1;
html_template='';
html=html_template.replace('--numero--',alerta_numero);
html=html.replace('--titulo--',titulo);
html=html.replace('--texto--',mensaje);
html=html.replace('--display--','display:none;');
$('#alertas_mensajes').append(html);
accionar_nueva_alerta(alerta_numero);
return;
}
function accionar_nueva_alerta(id_alerta){
$('.alerta'+id_alerta).show(500);
$('.alerta'+id_alerta+' div').each(function(){ $(this).attr("id",'alerta'+id_alerta)});
$('#alerta'+id_alerta+' .cerrar_alerta').click(function(){ var a=$(this).attr("id"); $('.'+a+'.nueva_alerta').hide(500); });
return;
}
function limitChars(textid, limit, infodiv){
var text = $('#'+textid).val();
var textlength = text.length;
if(textlength > limit){
$('#' + infodiv).html('No puedes escribir mas de '+limit+' caracteres!');
$('#'+textid).val(text.substr(0,limit));
return false;
}else{
$('#' + infodiv).html((limit - textlength) +' Caracteres Restantes.');
return true;
}
}
$(document).ready(function(){
$('#boton_login').click(function(){
$('#boton_login').html('
');
var el_nick=$('#nick').attr('value');
var el_pass=$('#pass').attr('value');
$('#cargador_javascript').load("/procesadores/login.php",{nick:el_nick, pass:el_pass},function(){
$('#boton_login').html('
');
});
});
/*
$('.tituloagenda').click(function(){
$('.descripcion_prximasfiestas:visible').slideUp(500);
$(this).parent().find('.descripcion_prximasfiestas').slideToggle(500);
//alert('Ok');
});
*/
});