<%@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" />
        <link href="css/success.css" rel="stylesheet" type="text/css"/>
        <script src="../assets/js/ace-extra.js"></script>



        <!-- inline scripts related to this page -->
        <script type="text/javascript" language="javascript">

            /*$(document).ready( function() {
             jQuery("#registroEncuesta").validationEngine();
             });*/
        </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" %>
                <!-- #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>
                        <table width='100%'>
                            <tr>
                                <td>
                                    <ul class="breadcrumb">
                                        <li>
                                            <i class="ace-icon fa fa-home home-icon"></i>
                                            <a href="principal.jsp">INICIO</a>
                                        </li>
                                        <li class="active">HORARIO</li>
                                    </ul><!-- /.breadcrumb -->
                                </td>
                                <td align='right'>

                                </td>
                            </tr>
                        </table>

                    </div>

                    <!-- /section:basics/content.breadcrumbs -->
                    <div class="page-content">
                        <!-- /section:settings.box -->
                        <div class="page-header">
                            <h1>
                                Horario
                                <small>
                                    <i class="ace-icon fa fa-angle-double-right"></i>
                                    Verificar horario
                                </small>
                            </h1>
                        </div><!-- /.page-header -->

                        <div class="row">




                            <!-- ----------- CONTENEDOR DE FORMULARIOS--------INI----- -->

                            <div class="col-sm-12" style="width:100%; height: 40px;"></div>
                            <div  class="col-sm-12" style="width:100%;">

                                <div  class="">
                                    <!-- -------------TABLA---INI------------ -->
                                    <div id='divListaAula'>

                                    </div>
                                    <!-- -------------TABLA---FIN------------ -->
                                </div>
                            </div>
                            <!-- ----------- CONTENEDOR DE FORMULARIOS--------FIN----- -->




                            <!-- ::::::::::-ALERTAS-::::::::::::::: -->

                            <div id="dialog-activo" class="hide">
                                ¿Esta seguro de activar/desactivar?
                            </div>

                            <div id="dialog-estado" class="hide">
                                ¿Esta seguro de cambiar el estado?
                            </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>


                            <div id="dialog-responsable"  class="hide" >
                                <form id='asignarResponsable'  method='post'>
                                    <div id="divResposable"></div>
                                </form>
                            </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>
        <script src="../assets/js/bootstrap.js"></script>

        <!-- page specific plugin scripts -->
        <script src="../assets/js/jquery-ui.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>


        <link rel="stylesheet" href="css/validationEngine.jquery.css" type="text/css"/>
        <!--<link rel="stylesheet" href="css/template.css" type="text/css"/>-->


        <!-- inline scripts related to this page -->
        <script type="text/javascript">


         //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

            $(document).ready(function () {
                jQuery("#registroEncuesta").validationEngine();
            });


            function validar_registro() {
                var estado = $('#registroEncuesta').validationEngine('validate');
                if (estado) {
                    alerta1();
                }
            }

            function alerta1() {
                $("#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 blue'></i> Alerta</h4></div>",
                    title_html: true,
                    buttons: [
                        {
                            html: "<i class='ace-icon fa fa-times bigger-110'></i>&nbsp; Cancelar",
                            "class": "btn btn-danger btn-xs",
                            click: function () {
                                $(this).dialog("close");
                            }
                        }, {
                            html: "<i class='ace-icon fa fa-check bigger-110'></i>&nbsp; Aceptar",
                            "class": "btn btn-success btn-xs",
                            click: function () {
                                registrarEncuesta();
                            }
                        }
                    ]
                });
            }

            function segundaCarga() {
                listarAula();
            }

            function listarAula() {
                var codLocal = "<%=usuario!=null?usuario.getCodigoSede():""%>";
                var codPeriodo =<%=periodo!=null?periodo.getCodigoPeriodo():""%>;

                $.ajax({
                    type: 'POST',
                    url: '../ServletAula?Accion=listarTablaAula',
                    data: 'codigoSede=' + codLocal + '&codigoPeriodo=' + codPeriodo,
                    beforeSend: function () {
                        cargando();
                    }, success: function (resultado) {
                        cerrar_cargando();
                        $('#divListaAula').html(resultado);
                    }, complete: function () {
                    }
                });
            }

            function verificarHorario(codigoAula) {
                $.ajax({
                    type: 'POST',
                    url: '../ServletAula?Accion=crearSession',
                    data: 'codalua=' + codigoAula,
                    success: function (resultado) {

                    }, complete: function () {
                        window.location = "verificarHorario.jsp";
                    }
                });
            }


            function cargando() {
                $.blockUI({
                    message: '<div class="thecube"> <div class="cube c1"></div> <div class="cube c2"></div> <div class="cube c4"></div> <div class="cube c3"></div> </div>',
//        message: '<div class="loading" id="g-spinner" style="zoom: 1;"><div class="circle c1"></div><div class="circle c2"></div><div class="circle c3"></div><div class="circle c4"></div></div>',
//        message: '<div class="js-loading-indicator triple" style="width: 192px; height: 192px; top: 64px; left: 208px;"></div>',

                    baseZ: 9000,
                    overlayCSS: {
                        backgroundColor: '#1b2024',
                        opacity: 0.8,
                        cursor: 'wait'
                    },
                    css: {
                        zindex: '9999',
                        border: 0,
                        color: '#fff',
                        padding: 0,
                        backgroundColor: 'transparent'
                    }
                });
            }

            function cerrar_cargando() {
                $.unblockUI();
            }



        </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="js/blockui.min.js" type="text/javascript"></script>
        <script src="js/bootbox.min.js" type="text/javascript"></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>

        <div id="formulario1" title="ALERTA" style="display:none;">
            <span class="sttxt2">
                ¿Está seguro de activar/desactivar?
            </span>
        </div>
        <div id="formulario2" title="ALERTA" style="display:none;">
            <span class="sttxt2">
                ¿Está seguro de cambiar estado?
            </span>
        </div>
    </body>
</html>
