<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		
		<title> THOMSON REUTERS | ARGENTINA </title>
		
		<link rel="stylesheet" href="../libs/bootstrap-3.3.7-dist/css/bootstrap.min.css">
		<link rel="stylesheet" href="../libs/bootstrap-3.3.7-dist/css/bootstrap-theme.min.css">
		
		<script src="../libs/jquery-1.12.4.min.js" type="text/javascript"></script>
		<script src="../libs/bootstrap-3.3.7-dist/js/bootstrap.min.js" type="text/javascript"></script>
		
		<style type="text/css" media="screen">
			@font-face {
				font-family: Knowledge-Light;
				src: url(../recursos/FONT/Knowledge-Light.ttf);
			}
			@font-face {
				font-family: Knowledge-Regular;
				src: url(../recursos/FONT/Knowledge-Regular.ttf);
			}
			@font-face {
				font-family: Montserrat-Light;
				src: url(../recursos/FONT/Montserrat-Light.otf);
			}
			*, body{
				font-family: "Arial" ;
			}
			.navbar{
				min-height: 80px;
			}
			#logo_navbar{
				margin-top: 7px;
				margin-left: 55px;
				width: 370px;
			}

			#body{
				margin-top: 60px;
			}
			#titulo_evento{
				font-size: 40px;
				color: #555555;
				font-family: Knowledge-Light;
			}

			#btn-enviar{
				background: none;
				border: none;
				padding: 0px; 
			}

			#footer{
				background-color: #555555;
				height: 40px;
				font-family: Montserrat-Light;
				color: #B3B3B3;
				font-size: 11px;
				width: 100%;
				text-align: center;
				
			}

			/* Estilo esclusivo celular */
			@media (max-width: 767px) { 
				.navbar{
					min-height: 50px;
				}
				#logo_navbar{
					margin-top: 1px;
					margin-left: 0px;
					width: 200px;
				}
				#div_login{
					margin-top: 30px;
				}
				#footer{
					margin-top: 100px;
					padding-top: 6px;
				}
			}
	
			/* Estilo resolucion mayor a un celular */
			@media (min-width: 768px) { 
				#footer{
					position: fixed;
					bottom: 0;
					padding-top:13px; 
				}
			}
			
	
			/* Clases asistentes */
			.aria-bold{
				font-family: "Arial";
			}
			.texto-naranja{
				color: #FF6C0C;
			}
			.texto-gris{
				color: #555555;
			} 
			.texto-azul{
				color: #0099C4;
			}

			.bold{
				font-weight: bold;
			}

			.px16{
				font-size: 16px;
			}
			.px15{
				font-size: 15px;	
			}
			.input{
				width: 100%;
				border-top: none;
				border-right: none;
				border-left: none;
				border-bottom: 1px solid #cccc;
				padding: 9px 0px; 
				margin-bottom: 7px;
				margin-top: 11px;

			}
			.input:placeholder{
				color: #999;
			}
			.margin-bottom-15{
				margin-bottom:15px;
			}
			.margin-right-10{
				margin-right:10px;
			}
			.progress-big{
				height: 40px !important;
			}
			.progress-big > div{
				font-size: 30px;
				line-height: 37px;
			}
		</style>
		<script type="text/javascript">
			var html_procesando = '<div class="progress progress-big">'+
									  '<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%">'+
									    'Procesando...<span class="sr-only">100% Complete</span>'+
									  '</div>'+
									'</div>';
		

			$(document).ready(function() {
				$('#btn-enviar-lista-1').click(function(event) {

					$('#btn-enviar-lista-1').button("loading");

					$('#resultado').html(html_procesando);
					$.post('php/enviar_correos.php', {lista: "1"}, function(data, textStatus, xhr) {
						$('#resultado').html(data);
					}).always(function(){
						$('#btn-enviar-lista-1').button("reset");
					});
				});

				$('#btn-enviar-lista-2').click(function(event) {
					$('#btn-enviar-lista-2').button("loading");

					$('#resultado').html(html_procesando);
					$.post('php/enviar_correos.php', {lista: "2"}, function(data, textStatus, xhr) {
						$('#resultado').html(data);
					}).always(function(){
						$('#btn-enviar-lista-2').button("reset");
					});
				});
			});

		</script>
	</head>
	<body>
		<nav class="navbar navbar-default">
		  	<div class="container-fluid">
		    	<!-- Brand and toggle get grouped for better mobile display -->
		    	<div class="navbar-header">
			      	<!-- 
			      	<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
			        	<span class="sr-only">Toggle navigation</span>
			        	<span class="icon-bar"></span>
			        	<span class="icon-bar"></span>
			        	<span class="icon-bar"></span>
			      	</button>
					 -->
			      	<a class="navbar-brand" href="index.php">
			      		<img alt="Thimsin Reuters" src="../recursos/logo.png" id="logo_navbar">
			      	</a>
		    	</div>
	
		  	</div><!-- /.container-fluid -->
		</nav>
		
		<div class="container" id="body">
			<div class="row">
				<div class="col-sm-12 " id="div_principal">
					<div class="row">
						
						<div class="col-sm-12">
							<h1 id="titulo_evento"> Despachador de correos </h1>
						</div>
						<div class="col-sm-12 texto-gris px15 margin-bottom-15">
							<button class="btn btn-primary btn-lg margin-right-10" data-loading-text="Enviando... a lista 1" id="btn-enviar-lista-1">
								Enviar a lista 1
							</button>
							<button class="btn btn-primary btn-lg" data-loading-text="Enviando... a lista 2" id="btn-enviar-lista-2">
								Enviar a lista 2
							</button>
						</div>
						<div class="col-sm-12" id="resultado">

						</div>
					</div>
				</div>
				
			</div>	
		</div>

		<div class="container-fluid" id="footer">
			<!-- Licencia: www.diabetes.org.ar <span class="hidden-xs">| </span> <br class="visible-xs-block">  Streaming: www.livedirecto.com -->
			Licencia: www.thomsonreuters.com.ar <span class="hidden-xs">| </span> <br class="visible-xs-block"> Streaming: www.livedirecto.com
		</div>
	</body>
</html>