<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ include file="validar.jsp" %>
<!DOCTYPE html>
<html lang="es">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<title>:::SISTEMA DE HORARIOS:::</title>

		<meta name="description" content="overview &amp; stats" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
               
		<link rel="stylesheet" href="../assets/css/bootstrap.css" />
		<link rel="stylesheet" href="../assets/css/font-awesome.css" />
                <link rel="stylesheet" href="../assets/css/jquery-ui.css" />
		<link rel="stylesheet" href="../assets/css/ace-fonts.css" />
		<link rel="stylesheet" href="../assets/css/ace.css" class="ace-main-stylesheet" id="main-ace-style" />
		<script src="../assets/js/ace-extra.js"></script>              
        
		
	</head>

	<body class="no-skin" onLoad="cargar();">
		<!-- #section:basics/navbar.layout -->
		<div id="navbar" class="navbar navbar-default">
			<script type="text/javascript">
				try{ace.settings.check('navbar' , 'fixed')}catch(e){}
			</script>

			<div class="navbar-container" id="navbar-container">
            <%@ include file="banner.jsp" %>
			</div><!-- /.navbar-container -->
		</div>

		<!-- /section:basics/navbar.layout -->
		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<!-- #section:basics/sidebar -->
			<div id="sidebar" class="sidebar                  responsive">
				<script type="text/javascript">
					try{ace.settings.check('sidebar' , 'fixed')}catch(e){}
				</script>
                                <input id="codModulo" type="hidden" value="<%=menu!=null?menu.getCodModulo():""%>">
                                <input id="codCategoria" type="hidden" value="<%=menu!=null?menu.getCodCategoria():""%>">
                                <%@ include file="menu.jsp" %>
				<p id="lblUsuario" style="visibility: hidden;"><%=usuario!=null?usuario.getCodigoTipoUsuario():""%></p>
				<!-- #section:basics/sidebar.layout.minimize -->
				<div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
					<i class="ace-icon fa fa-angle-double-left" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
				</div>
				<!-- /section:basics/sidebar.layout.minimize -->
				<script type="text/javascript">
					try{ace.settings.check('sidebar' , 'collapsed')}catch(e){}
				</script>
			</div>

			<!-- /section:basics/sidebar -->
			<div class="main-content">
				<div class="main-content-inner">
					<!-- #section:basics/content.breadcrumbs -->
					<div class="breadcrumbs" id="breadcrumbs">
						<script type="text/javascript">
							try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
						</script>

						<ul class="breadcrumb">
							<li>
								<i class="ace-icon fa fa-home home-icon"></i>
								<a href="principal.jsp">INICIO</a>
							</li>
							<li class="active">INFORME</li>
						</ul><!-- /.breadcrumb -->
					</div>

					<!-- /section:basics/content.breadcrumbs -->
					<div class="page-content">
						
						<div class="page-header">
							<h1>
								Informe
								<small>
									<i class="ace-icon fa fa-angle-double-right"></i>
									Bandeja
								</small>
							</h1>
						</div><!-- /.page-header -->

						<div class="row">
							
                                                    
                                                    
                                                    
                                                    
                                                    <!-- ----------- CONTENEDOR DE FORMULARIOS--------INI----- -->
                                                    <div class="col-sm-12" style="width:100%;">
                                                        
                                                        <div  class="col-sm-12">
                                                            <div id='divBandeja'></div>
                                                        </div>
                                                        
                                                        
                                                        
                                                    </div>
                                                    <div class="col-sm-12" style="width:100%; height: 40px;"></div>
                                                    <div  class="col-sm-12" style="width:100%;">
                                                        <div  class="col-sm-2" ></div>
                                                        <div  class="col-sm-8">
                                                            <!-- -------------TABLA---INI------------ -->
                                                            <div id='divListadoArea'>
                                                                
                                                            </div>
                                                            <!-- -------------TABLA---FIN------------ -->
                                                        </div>
                                                        <div  class="col-sm-2"></div>
                                                    </div>
                                                    <!-- ----------- CONTENEDOR DE FORMULARIOS--------FIN----- -->
                                                    
                                                    
                                                    
                                                   
                                                    <!-- ::::::::::-ALERTAS-::::::::::::::: -->
                                                    
                                                    <div id="dialog-confirm" class="hide">
                                                        <br>
                                                            ¿Está seguro de registrar una nueva área?
                                                        <br><br>
                                                    </div>
                                                    
                                                    <div id="dialog-ver" class="hide">
                                                        <br>
                                                        <form id="informe" class="formular" method="post">
                                                            <div id="divFormulario"></div> 
                                                       </form>
                                                        <br><br>
                                                    </div>
                                                    
                                                    <div id="dialog-cargando" class="hide">
                                                        <table cellpadding="0" cellspacing="0" width="100%">
                                                            <tr><td align="center"><img src="imagenes/cargando.gif" border=0></td></tr>
                                                        </table>
                                                    </div>
                                                    
                                                    
                                                    
                                                    <!-- ::::::::::-ALERTAS-::::::::::::::: -->
                                                    
                                                    
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div>
			</div><!-- /.main-content -->

			<div class="footer">
				<%@ include file="footer.jsp" %>
			</div>

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->

		<!-- basic scripts -->

		<!--[if !IE]> -->
		<script type="text/javascript">
			window.jQuery || document.write("<script src='../assets/js/jquery.js'>"+"<"+"/script>");
		</script>

		<!-- <![endif]-->

		<!--[if IE]>
<script type="text/javascript">
 window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/script>");
</script>
<![endif]-->
                
                
		<script type="text/javascript">
			if('ontouchstart' in document.documentElement) document.write("<script src='../assets/js/jquery.mobile.custom.js'>"+"<"+"/script>");
		</script>
                
		<!-- page specific plugin scripts -->
                 <script src="../assets/js/ionsound/js/ion.sound.min.js" type="text/javascript"></script>
                <script src="../assets/js/jquery-ui.js"></script>
                <script src="../assets/js/bootstrap.js"></script>
		<script src="../assets/js/jquery.ui.touch-punch.js"></script>
                
		<!--[if lte IE 8]>
		  <script src="../assets/js/excanvas.js"></script>
		<![endif]-->
		<script src="../assets/js/jquery-ui.custom.js"></script>
		<script src="../assets/js/jquery.ui.touch-punch.js"></script>
		<script src="../assets/js/jquery.easypiechart.js"></script>
		<script src="../assets/js/jquery.sparkline.js"></script>
		<script src="../assets/js/flot/jquery.flot.js"></script>
		<script src="../assets/js/flot/jquery.flot.pie.js"></script>
		<script src="../assets/js/flot/jquery.flot.resize.js"></script>
               

		<!-- ace scripts -->
		<script src="../assets/js/ace/elements.scroller.js"></script>
		<script src="../assets/js/ace/elements.colorpicker.js"></script>
		<script src="../assets/js/ace/elements.fileinput.js"></script>
		<script src="../assets/js/ace/elements.typeahead.js"></script>
		<script src="../assets/js/ace/elements.wysiwyg.js"></script>
		<script src="../assets/js/ace/elements.spinner.js"></script>
		<script src="../assets/js/ace/elements.treeview.js"></script>
		<script src="../assets/js/ace/elements.wizard.js"></script>
		<script src="../assets/js/ace/elements.aside.js"></script>
		<script src="../assets/js/ace/ace.js"></script>
		<script src="../assets/js/ace/ace.ajax-content.js"></script>
		<script src="../assets/js/ace/ace.touch-drag.js"></script>
		<script src="../assets/js/ace/ace.sidebar.js"></script>
		<script src="../assets/js/ace/ace.sidebar-scroll-1.js"></script>
		<script src="../assets/js/ace/ace.submenu-hover.js"></script>
		<script src="../assets/js/ace/ace.widget-box.js"></script>
		<script src="../assets/js/ace/ace.settings.js"></script>
		<script src="../assets/js/ace/ace.settings-rtl.js"></script>
		<script src="../assets/js/ace/ace.settings-skin.js"></script>
		<script src="../assets/js/ace/ace.widget-on-reload.js"></script>
		<script src="../assets/js/ace/ace.searchbox-autocomplete.js"></script>
		<script src="../assets/js/ace/ace.searchbox-autocomplete.js"></script>
                
                
		<!-- inline scripts related to this page -->
		<script type="text/javascript">
                        
			
                        
                        jQuery(function($) {
                            
                            //override dialog's title function to allow for HTML titles
				$.widget("ui.dialog", $.extend({}, $.ui.dialog.prototype, {
					_title: function(title) {
						var $title = this.options.title || '&nbsp;'
						if( ("title_html" in this.options) && this.options.title_html == true )
							title.html($title);
						else title.text($title);
					}
				}));
			
				
			
				$( "#id-btn-dialog2" ).on('click', function(e) {//--
					e.preventDefault();
                                    $( "#dialog-confirm" ).removeClass('hide').dialog({
                                        resizable: false,
                                        modal: true,
                                        title: "<div class='widget-header'><h4 class='smaller'><i class='ace-icon fa fa-exclamation-triangle red'></i> Empty the recycle bin?</h4></div>",
                                        title_html: true,
                                        buttons: [
                                            {
                                                html: "<i class='ace-icon fa fa-trash-o bigger-110'></i>&nbsp; Delete all items",
                                                "class" : "btn btn-danger btn-xs",
                                                click: function() {
                                                    $( this ).dialog( "close" );
                                                }
                                            }
                                            ,
                                            {
                                                html: "<i class='ace-icon fa fa-times bigger-110'></i>&nbsp; Cancel",
                                                "class" : "btn btn-xs",
                                                click: function() {
                                                    $( this ).dialog( "close" );
                                                }
                                            }
                                        ]
                                    });
				});
				/**
				$('#myTab a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
				  //console.log(e.target.getAttribute("href"));
				})
					
				$('#accordion').on('shown.bs.collapse', function (e) {
					//console.log($(e.target).is('#collapseTwo'))
				});
				*/
				
				$('#myTab a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
					if($(e.target).attr('href') == "#home") drawChartNow();
				})
			
				
				/**
					//go to next tab, without user clicking
					$('#myTab > .active').next().find('> a').trigger('click');
				*/
			
			
				$('#accordion-style').on('click', function(ev){
					var target = $('input', ev.target);
					var which = parseInt(target.val());
					if(which == 2) $('#accordion').addClass('accordion-style2');
					 else $('#accordion').removeClass('accordion-style2');
				});
				
				//$('[href="#collapseTwo"]').trigger('click');
			
			
				var oldie = /msie\s*(8|7|6)/.test(navigator.userAgent.toLowerCase());
				$('.easy-pie-chart.percentage').each(function(){
					$(this).easyPieChart({
						barColor: $(this).data('color'),
						trackColor: '#EEEEEE',
						scaleColor: false,
						lineCap: 'butt',
						lineWidth: 8,
						animate: oldie ? false : 1000,
						size:75
					}).css('color', $(this).data('color'));
				});
			
				$('[data-rel=tooltip]').tooltip();
				$('[data-rel=popover]').popover({html:true});
			
			
				$('#gritter-regular').on(ace.click_event, function(){
					$.gritter.add({
						title: 'This is a regular notice!',
						text: 'This will fade out after a certain amount of time. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et <a href="#" class="blue">magnis dis parturient</a> montes, nascetur ridiculus mus.',
						image: $path_assets+'/avatars/avatar1.png',
						sticky: false,
						time: '',
						class_name: (!$('#gritter-light').get(0).checked ? 'gritter-light' : '')
					});
			
					return false;
				});
			
				$('#gritter-sticky').on(ace.click_event, function(){
					var unique_id = $.gritter.add({
						title: 'This is a sticky notice!',
						text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et <a href="#" class="red">magnis dis parturient</a> montes, nascetur ridiculus mus.',
						image: $path_assets+'/avatars/avatar.png',
						sticky: true,
						time: '',
						class_name: 'gritter-info' + (!$('#gritter-light').get(0).checked ? ' gritter-light' : '')
					});
			
					return false;
				});
			
			
				$('#gritter-without-image').on(ace.click_event, function(){
					$.gritter.add({
						// (string | mandatory) the heading of the notification
						title: 'This is a notice without an image!',
						// (string | mandatory) the text inside the notification
						text: 'This will fade out after a certain amount of time. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et <a href="#" class="orange">magnis dis parturient</a> montes, nascetur ridiculus mus.',
						class_name: 'gritter-success' + (!$('#gritter-light').get(0).checked ? ' gritter-light' : '')
					});
			
					return false;
				});
			
			
				$('#gritter-max3').on(ace.click_event, function(){
					$.gritter.add({
						title: 'This is a notice with a max of 3 on screen at one time!',
						text: 'This will fade out after a certain amount of time. Vivamus eget tincidunt velit. Cum sociis natoque penatibus et <a href="#" class="green">magnis dis parturient</a> montes, nascetur ridiculus mus.',
						image: $path_assets+'/avatars/avatar3.png',
						sticky: false,
						before_open: function(){
							if($('.gritter-item-wrapper').length >= 3)
							{
								return false;
							}
						},
						class_name: 'gritter-warning' + (!$('#gritter-light').get(0).checked ? ' gritter-light' : '')
					});
			
					return false;
				});
			
			
				$('#gritter-center').on(ace.click_event, function(){
					$.gritter.add({
						title: 'This is a centered notification',
						text: 'Just add a "gritter-center" class_name to your $.gritter.add or globally to $.gritter.options.class_name',
						class_name: 'gritter-info gritter-center' + (!$('#gritter-light').get(0).checked ? ' gritter-light' : '')
					});
			
					return false;
				});
				
				$('#gritter-error').on(ace.click_event, function(){
					$.gritter.add({
						title: 'This is a warning notification',
						text: 'Just add a "gritter-light" class_name to your $.gritter.add or globally to $.gritter.options.class_name',
						class_name: 'gritter-error' + (!$('#gritter-light').get(0).checked ? ' gritter-light' : '')
					});
			
					return false;
				});
					
			
				$("#gritter-remove").on(ace.click_event, function(){
					$.gritter.removeAll();
					return false;
				});
					
			
				///////
			
			
				$("#bootbox-regular").on(ace.click_event, function() {
					bootbox.prompt("What is your name?", function(result) {
						if (result === null) {
							
						} else {
							
						}
					});
				});
					
				$("#bootbox-confirm").on(ace.click_event, function() {
					bootbox.confirm("Are you sure?", function(result) {
						if(result) {
							//
						}
					});
				});
				
			/**
				$("#bootbox-confirm").on(ace.click_event, function() {
					bootbox.confirm({
						message: "Are you sure?",
						buttons: {
						  confirm: {
							 label: "OK",
							 className: "btn-primary btn-sm",
						  },
						  cancel: {
							 label: "Cancel",
							 className: "btn-sm",
						  }
						},
						callback: function(result) {
							if(result) alert(1)
						}
					  }
					);
				});
			**/
					
				$("#bootbox-options").on(ace.click_event, function() {
					bootbox.dialog({
						message: "<span class='bigger-110'>I am a custom dialog with smaller buttons</span>",
						buttons: 			
						{
							"success" :
							 {
								"label" : "<i class='ace-icon fa fa-check'></i> Success!",
								"className" : "btn-sm btn-success",
								"callback": function() {
									//Example.show("great success");
								}
							},
							"danger" :
							{
								"label" : "Danger!",
								"className" : "btn-sm btn-danger",
								"callback": function() {
									//Example.show("uh oh, look out!");
								}
							}, 
							"click" :
							{
								"label" : "Click ME!",
								"className" : "btn-sm btn-primary",
								"callback": function() {
									//Example.show("Primary button");
								}
							}, 
							"button" :
							{
								"label" : "Just a button...",
								"className" : "btn-sm"
							}
						}
					});
				});
			
			
			
				$('#spinner-opts small').css({display:'inline-block', width:'60px'})
			
				var slide_styles = ['', 'green','red','purple','orange', 'dark'];
				var ii = 0;
				$("#spinner-opts input[type=text]").each(function() {
					var $this = $(this);
					$this.hide().after('<span />');
					$this.next().addClass('ui-slider-small').
					addClass("inline ui-slider-"+slide_styles[ii++ % slide_styles.length]).
					css('width','125px').slider({
						value:parseInt($this.val()),
						range: "min",
						animate:true,
						min: parseInt($this.attr('data-min')),
						max: parseInt($this.attr('data-max')),
						step: parseFloat($this.attr('data-step')) || 1,
						slide: function( event, ui ) {
							$this.val(ui.value);
							spinner_update();
						}
					});
				});
			
			
			
				//CSS3 spinner
				$.fn.spin = function(opts) {
					this.each(function() {
					  var $this = $(this),
						  data = $this.data();
			
					  if (data.spinner) {
						data.spinner.stop();
						delete data.spinner;
					  }
					  if (opts !== false) {
						data.spinner = new Spinner($.extend({color: $this.css('color')}, opts)).spin(this);
					  }
					});
					return this;
				};
			
				function spinner_update() {
					var opts = {};
					$('#spinner-opts input[type=text]').each(function() {
						opts[this.name] = parseFloat(this.value);
					});
					opts['left'] = 'auto';
					$('#spinner-preview').spin(opts);
				}
			
			
			
				$('#id-pills-stacked').removeAttr('checked').on('click', function(){
					$('.nav-pills').toggleClass('nav-stacked');
				});
			
				
				
				
				
				
				///////////
				$(document).one('ajaxloadstart.page', function(e) {
					$.gritter.removeAll();
					$('.modal').modal('hide');
				});
			
			});
                        
                    //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
                    
                        $(document).ready( function() {
                            //jQuery("#registroEncuesta").validationEngine();
                        });
                        
                       
                        function cargando(){
                            $( "#dialog-cargando" ).removeClass('hide').dialog({
                                resizable: false,
                                modal: true,
                                title: "Cargando...",
                                title_html: true
                            });
                        }
                        
                        function close_carga(){
                            $( "#dialog-cargando" ).dialog( "close" );
                        }
                        
                        function conMayusculas(field) {
                            field.value = field.value.toUpperCase()
                        }
                        
                        function segundaCarga(){
                            listarBandeja();
                        }
                        
                        function listarBandeja(){
													let usuario=''
                            $.ajax({
                                type:'POST',
                                url:'../ServletDocente?Accion=listarBandeja',
                                data: null,
                                beforeSend: function() {
                                    cargando();
                                },success:function(resultado){
                                    close_carga();
                                    $('#divBandeja').html(resultado);
																		usuario=$("#lblUsuario").text();
																		if(usuario == "6"){
																			$("#divBandeja #btnAccion").hide();
																		}
																		
                                },complete:function(){ 
                                    $('[data-rel=tooltip]').tooltip();
                                }
                            });
                        }
                        
                        function armarPopUpInforme(codDocente,codSede){
                            $.ajax({
                                type:'POST',
                                url:'../ServletDocente?Accion=armarPopUpInforme',
                                data: 'codigoDocente='+codDocente+'&codigoSede='+codSede,
                                beforeSend: function() {
                                    cargando();
                                },success:function(resultado){
                                    close_carga();
                                    $('#divFormulario').html(resultado);
                                },complete:function(){ 
                                    popUpInforme();
                                }
                            });
                        }
                        
                        function popUpInforme(){
                            $( "#dialog-ver" ).removeClass('hide').dialog({
                                resizable: false,
                                width: 800,
                                modal: true,
                                title: "<div class='widget-color-blue' ><div class='widget-header white' ><h4 class='smaller' ><i class='ace-icon fa fa-check-circle white'></i> <span class='white'>Detalle de informe</span></h4></div></div>",
                                title_html: true,
                                buttons: [
                                    {
                                        html: "<i class='ace-icon fa fa-times bigger-110'></i>&nbsp; CERRAR",
                                        "class" : "btn btn-danger btn-xs",
                                        click: function() {
                                            $( this ).dialog( "close" ); 
                                        }
                                    }
                                ]
                            });
                        }
                        
                        function respuesta(codInforme,accion){
                            $.ajax({
                                    type:'POST',
                                    url:'../ServletDocente?Accion=respuesta',
                                    data: 'codInforme='+codInforme+'&accion='+accion,
                                    beforeSend: function() {
                                        cargando();
                                    },success:function(resultado){
                                        close_carga();
                                        //$('#divBandeja').html(resultado);
                                    },complete:function(){ 
                                        listarBandeja();
                                }
                            });
                        }
                                  
                        
                        $('input').keypress(function(e){
                            if(e.which == 13){
                                return false;
                            }
                        });
                        
                        
                        
		</script>

		<!-- the following scripts are used in demo only for onpage help and you don't need them -->
               
		<link rel="stylesheet" href="../assets/css/ace.onpage-help.css" />
		<link rel="stylesheet" href="../docs/assets/js/themes/sunburst.css" />
                
		<script type="text/javascript"> ace.vars['base'] = '..'; </script>
		<script src="../assets/js/ace/elements.onpage-help.js"></script>
		<script src="../assets/js/ace/ace.onpage-help.js"></script>
		<script src="../docs/assets/js/rainbow.js"></script>
		<script src="../docs/assets/js/language/generic.js"></script>
		<script src="../docs/assets/js/language/html.js"></script>
		<script src="../docs/assets/js/language/css.js"></script>
		<script src="../docs/assets/js/language/javascript.js"></script>
                <script src="../assets/js/chosen.jquery.js"></script>
                
		
                
                <script src="js/languages/jquery.validationEngine-es.js" type="text/javascript" charset="utf-8"></script>
                <script src="js/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>

</html>
