frm_backup_nubefact.jsp 25.7 KB
Newer Older
Angel Flores Chombile committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417
<%-- 
    Document   : index
    Created on : 31/10/2015, 10:10:43 AM
    Author     : fcelestino
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ include file="validar.jsp" %>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->

    <!-- START @HEAD -->
    <head>

        <!-- START @META SECTION -->
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <meta name="description" content="Blankon is a theme fullpack admin template powered by Twitter bootstrap 3 front-end framework. Included are multiple example pages, elements styles, and javascript widgets to get your project started.">
        <meta name="keywords" content="admin, admin template, bootstrap3, clean, fontawesome4, good documentation, lightweight admin, responsive dashboard, webapp">
        <meta name="author" content="Djava UI">
        <title>CREACIÓN DE MENÚ</title>
        <link rel="icon" type="image/png" sizes="16x16" href="images/helicoide.png" />
        <!--/ END META SECTION -->

        <!-- START @FAVICONS -->
        <!--<link href="../img/ico/apple-touch-icon-144x144-precomposed.png" rel="apple-touch-icon-precomposed" sizes="144x144">-->
        <!--<link href="../img/ico/apple-touch-icon-114x114-precomposed.png" rel="apple-touch-icon-precomposed" sizes="114x114">-->
        <!--<link href="../img/ico/apple-touch-icon-72x72-precomposed.png" rel="apple-touch-icon-precomposed" sizes="72x72">-->
        <!--<link href="../img/ico/apple-touch-icon-57x57-precomposed.png" rel="apple-touch-icon-precomposed">-->
        <!--<link href="../img/ico/apple-touch-icon.png" rel="shortcut icon">-->
        <!--/ END FAVICONS -->

        <!-- START @FONT STYLES -->
        <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700" rel="stylesheet">
        <link href="http://fonts.googleapis.com/css?family=Oswald:700,400" rel="stylesheet">
        <!--/ END FONT STYLES -->

        <!-- START @GLOBAL MANDATORY STYLES -->
        <link href="../assets/global/plugins/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
        <!--/ END GLOBAL MANDATORY STYLES -->

        <!-- START @PAGE LEVEL STYLES -->
        <link href="../assets/global/plugins/bower_components/fontawesome/css/font-awesome.min.css" rel="stylesheet">
        <link href="../assets/global/plugins/bower_components/animate.css/animate.min.css" rel="stylesheet">
        <link href="../assets/global/plugins/bower_components/dropzone/downloads/css/dropzone.css" rel="stylesheet">
        <link href="../assets/global/plugins/bower_components/jquery.gritter/css/jquery.gritter.css" rel="stylesheet">
        <!--/ END PAGE LEVEL STYLES -->

        <!-- START @THEME STYLES -->
        <link href="../assets/admin/css/reset.css" rel="stylesheet">
        <link href="../assets/admin/css/layout.css" rel="stylesheet">
        <link href="../assets/admin/css/components.css" rel="stylesheet">
        <link href="../assets/admin/css/plugins.css" rel="stylesheet">
        <link href="../assets/admin/css/themes/red.theme.css" rel="stylesheet" id="theme">
        <link href="../assets/admin/css/custom.css" rel="stylesheet">
        <link href="validar/css/components.css" rel="stylesheet" type="text/css"/>
        <link href="validar/css/tippy.css" rel="stylesheet" type="text/css"/>
        <!--/ END THEME STYLES -->

        <!-- START @IE SUPPORT -->
        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
        <script src="../assets/global/plugins/bower_components/html5shiv/dist/html5shiv.min.js"></script>
        <script src="../assets/global/plugins/bower_components/respond-minmax/dest/respond.min.js"></script>
        <![endif]-->
        <!--/ END IE SUPPORT -->
    </head>
    <!--/ END HEAD -->

    <!--

    |=========================================================================================================================|
    |  TABLE OF CONTENTS (Use search to find needed section)                                                                  |
    |=========================================================================================================================|
    |  01. @HEAD                        |  Container for all the head elements                                                |
    |  02. @META SECTION                |  The meta tag provides metadata about the HTML document                             |
    |  03. @FAVICONS                    |  Short for favorite icon, shortcut icon, website icon, tab icon or bookmark icon    |
    |  04. @FONT STYLES                 |  Font from google fonts                                                             |
    |  05. @GLOBAL MANDATORY STYLES     |  The main 3rd party plugins css file                                                |
    |  06. @PAGE LEVEL STYLES           |  Specific 3rd party plugins css file                                                |
    |  07. @THEME STYLES                |  The main theme css file                                                            |
    |  08. @IE SUPPORT                  |  IE support of HTML5 elements and media queries                                     |
    |=========================================================================================================================|
    |  09. @BODY                        |  Contains all the contents of an HTML document                                      |
    |  10. @WRAPPER                     |  Wrapping page section                                                              |
    |  11. @HEADER                      |  Header page section contains about logo, top navigation, notification menu         |
    |  12. @SIDEBAR LEFT                |  Sidebar page section contains all sidebar menu left                                |
    |  13. @PAGE CONTENT                |  Contents page section contains breadcrumb, content page, footer page               |
    |  14. @SIDEBAR RIGHT               |  Sidebar page section contains all sidebar menu right                               |
    |  15. @BACK TOP                    |  Element back to top and action                                                     |
    |=========================================================================================================================|
    |  16. @CORE PLUGINS                |  The main 3rd party plugins script file                                             |
    |  17. @PAGE LEVEL PLUGINS          |  Specific 3rd party plugins script file                                             |
    |  18. @PAGE LEVEL SCRIPTS          |  The main theme script file                                                         |
    |=========================================================================================================================|

    START @BODY
    |=========================================================================================================================|
        |  TABLE OF CONTENTS (Apply to body class)                                                                                |
        |=========================================================================================================================|
    |  01. page-boxed                   |  Page into the box is not full width screen                                         |
        |  02. page-header-fixed            |  Header element become fixed position                                               |
        |  03. page-sidebar-fixed           |  Sidebar element become fixed position with scroll support                          |
        |  04. page-sidebar-minimize        |  Sidebar element become minimize style width sidebar                                |
        |  05. page-footer-fixed            |  Footer element become fixed position with scroll support on page content           |
        |  06. page-sound                   |  For playing sounds on user actions and page events                                 |
        |=========================================================================================================================|

    -->
    <body class=" page-sound page-header-fixed page-sidebar-fixed " onload="cargar();">

        <!--[if lt IE 9]>
        <p class="upgrade-browser">Upps!! You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/" target="_blank">upgrade your browser</a> to improve your experience.</p>
        <![endif]-->

        <!-- START @WRAPPER -->
        <section id="wrapper">

            <!-- START @HEADER -->



            <%@ include file="banner.jsp" %>
            <!--/ END HEADER -->

            <!--

            START @SIDEBAR LEFT
            |=========================================================================================================================|
            |  TABLE OF CONTENTS (Apply to sidebar left class)                                                                        |
            |=========================================================================================================================|
            |  01. sidebar-box               |  Variant style sidebar left with box icon                                              |
            |  02. sidebar-rounded           |  Variant style sidebar left with rounded icon                                          |
            |  03. sidebar-circle            |  Variant style sidebar left with circle icon                                           |
            |=========================================================================================================================|

            -->


            <!--        <input id="codModulo" type="hidden" value="< %=menu!=null?menu.getCodModulo():""%>">
                        <input id="codCategoria" type="hidden" value="< %=menu!=null?menu.getCodCategoria():""%>">-->
            <input id="codTitulo" type="hidden" value="">
            <input id="codModulo" type="hidden" value="">
            <input id="codCategoria" type="hidden" value="">
            <input id="codSubCategoria" type="hidden" value="">


            <%@ include file="menu.jsp" %>

            <!-- /#sidebar-left -->
            <!--/ END SIDEBAR LEFT -->

            <!-- START @PAGE CONTENT -->
            <section id="page-content">

                <!-- Start page header -->
                <div class="header-content">
                    <h2><i class="fa fa-home"></i>Principal <span></span></h2>
                    <div class="breadcrumb-wrapper hidden-xs">
                        <!--                        <span class="label">You are here:</span>
                                                <ol class="breadcrumb">
                                                    <li class="active">Dashboard</li>
                                                </ol>-->
                    </div>
                </div><!-- /.header-content -->
                <!--/ End page header -->

                <!-- Start body content -->
                <div class="body-content animated fadeIn">
                    <center>
                        <!--<h2>Sistema de Cuotas Pago Academia</h2>-->
                        <br>

                    </center>


                    <div class="content">

                        <!-- Ace code editor -->
                        <div class="panel panel-flat">
                            <div class="panel-heading">
                                <h5 class="panel-title">Ace code editor</h5>
                                <div class="heading-elements">
                                    <ul class="icons-list">
                                        <li><a data-action="collapse"></a></li>
                                        <li><a data-action="reload"></a></li>
                                        <li><a data-action="close"></a></li>
                                    </ul>
                                </div>
                            </div>

                            <div class="panel-body">
                                <!--<p class="content-group">Ace is an embeddable code editor written in JavaScript. It matches the features and performance of native editors such as Sublime, Vim and TextMate. It can be easily embedded in any web page and JavaScript application. Ace is maintained as the primary editor for Cloud9 IDE and is the successor of the Mozilla Skywriter (Bespin) project.</p>-->

                                <div class="row">
                                    <div class="col-md-12">
                                        <table id="tblErrorNubeFact" class="table table-striped table-saco">
                                            <thead>                                                  
                                                <tr>       
                                                    <th class="text-center" >Codigo</th>
                                                    <th class="text-center" >motivo</th>
                                                    <th class="text-center" >Sede</th>
                                                    <!--<th class="text-center" >CuotasPago</th>-->
                                                    <th class="text-center" >Acciónes</th>
                                                </tr>                                              
                                            </thead> 
                                            <tbody>

                                            </tbody>
                                        </table>
                                        <div id="json-nubefact" class="hidden row">
                                            <div class="col-md-6">
                                                <div class="content-group">
                                                    <p><span class="text-semibold">JSON</span> Backup Error</p>
                                                    <div id="json_editor">
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-6">
                                                <div class="content-group ">
                                                    <p><span class="text-semibold">JSON</span> Respuesta NubeFact</p>
                                                    <input id="cargarNubeFactJson" value="Cargar NubeFact" type="button" class=" btn btn-primary">

                                                    <div class="hidden" id="json_editor_respuesta">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>


                                    </div>
                                </div>
                            </div>
                            <input type="button" value="Enviar" id="prueba">
                            <!-- ace code editor -->


                            <!-- Footer -->

                            <!-- /footer -->

                        </div>
                    </div><!-- /.body-content -->
                    <!--/ End body content -->

                    <!-- Start footer content -->

                    <%@ include file="footer.jsp" %>
                    <!--/ End footer content -->

            </section><!-- /#page-content -->
            <!--/ END PAGE CONTENT -->

            <!-- START @SIDEBAR RIGHT -->

            <!--/ END SIDEBAR RIGHT -->

        </section><!-- /#wrapper -->
        <!--/ END WRAPPER -->

        <!-- START @BACK TOP -->
        <div id="back-top" class="animated pulse circle">
            <i class="fa fa-angle-up"></i>
        </div><!-- /#back-top -->
        <!--/ END BACK TOP -->

        <!-- START JAVASCRIPT SECTION (Load javascripts at bottom to reduce load time) -->
        <!-- START @CORE PLUGINS -->
        <script src="../assets/global/plugins/bower_components/jquery/dist/jquery.min.js"></script>
        <script src="../assets/global/plugins/bower_components/jquery-cookie/jquery.cookie.js"></script>
        <script src="../assets/global/plugins/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
        <script src="../assets/global/plugins/bower_components/typehead.js/dist/handlebars.js"></script>
        <script src="../assets/global/plugins/bower_components/typehead.js/dist/typeahead.bundle.min.js"></script>
        <script src="../assets/global/plugins/bower_components/jquery-nicescroll/jquery.nicescroll.min.js"></script>
        <script src="../assets/global/plugins/bower_components/jquery.sparkline.min/index.js"></script>
        <script src="../assets/global/plugins/bower_components/jquery-easing-original/jquery.easing.1.3.min.js"></script>
        <script src="../assets/global/plugins/bower_components/ionsound/js/ion.sound.min.js"></script>
        <script src="../assets/global/plugins/bower_components/bootbox/bootbox.js"></script>
        <!--/ END CORE PLUGINS -->

        <!--         START @PAGE LEVEL PLUGINS 
                <script src="../assets/global/plugins/bower_components/bootstrap-session-timeout/dist/bootstrap-session-timeout.min.js"></script>
                <script src="../assets/global/plugins/bower_components/jquery.gritter/js/jquery.gritter.min.js"></script>
                <script src="../assets/global/plugins/bower_components/underscore/underscore-min.js"></script>
                <script src="../assets/global/plugins/bower_components/jsTimezoneDetect/jstz.min.js"></script>
                <script src="../assets/global/plugins/bower_components/bootstrap-calendar/js/calendar.min.js"></script>
                <script src="../assets/global/plugins/bower_components/raphael/raphael-min.js"></script>
                <script src="../assets/global/plugins/bower_components/horizontal-chart/build/js/jquery.horizBarChart.min.js"></script>
                / END PAGE LEVEL PLUGINS -->

        <!-- START @PAGE LEVEL SCRIPTS -->
        <!--<script src="validar/js/app.js" type="text/javascript"></script>-->
        <script src="validar/js/tables/datatables/datatables.min.js" type="text/javascript"></script>
        <script src="validar/js/tables/datatables/extensions/fixed_header.min.js" type="text/javascript"></script>
        <script src="validar/js/tables/datatables/extensions/select.min.js" type="text/javascript"></script>
        <script src="validar/js/editors/ace/ace.js" type="text/javascript"></script>

        <script src="validar/js/tippy.min.js" type="text/javascript"></script>
        <script src="validar/js/editor_code.js" type="text/javascript"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ace.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.6.8/beautify.js"></script>
        <link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css" rel="stylesheet"/>
        <script src="../assets/admin/js/apps.js"></script>
        <script src="../assets/admin/js/demo.js"></script>

        <script>
//json
        function segundaCarga() {
            listarErrorNubeFact.listarErrores();
        }
        var table;
        var listarErrorNubeFact = {
            listarErrores: function () {
                table = $('#tblErrorNubeFact').DataTable({
                    "bSort": false,
                    "bFilter": false,
                    "serverSide": true,
                    "processing": true,
                    "iDisplayLength": 10,
                    "aaSorting": [],
                    "ordering": false,
                    "bLengthChange": false,
                    "bInfo": true,
                    "paging": true,
                    "columnDefs": [
                        {"targets": [0], className: "text-center"},
                        {"targets": [1], className: "text-center"},
                        {"targets": [2], className: "text-center"},
                        {"targets": [3], className: "text-center"}
                    ], "oLanguage": {
                        sInfo: "Mostrando _START_ a _END_ de _TOTAL_ Alumnos",
                        sInfoEmpty: "Monstrando 0 a 0 de 0 Alumnos"
                    },
                    "scrollX": false,
                    "ScrollCollapse": true,
                    "ajax": {
                        "url": "../ServletPension?accion=listarBackupErrorNubeFact",
                        data: null,
                        beforeSend: function () {
                        }, complete: function () {
                            tippy('.icotippy', {
                                position: 'right',
                                animation: 'scale',
                                duration: 500,
                                arrow: true,
                                size: 'small'
                            });
                        }
                    }, "columns": [
//              "codNubeFact"
//             	"jsonNubeFact"
//             	"motivoErrorNubeFact"
//             	"nomSede"
//              "codCuotasPago"
//              "estadoNubeFact"
                        {data: 'codNubeFact'},
                        {data: 'motivoErrorNubeFact'},
                        {data: 'nomSede'},
//                        {data: 'codCuotasPago'},
                        {"data": null,
                            "render": function (data) {
                                return '<a class=" icotippy fa fa-edit editarAlumno" title="Editar Alumno" ></a><a class="icotippy fa fa-pencil matriculaAlumno" title="Matrícula Alumno"></a>';
                            }
                        }
                    ], "fnRowCallback": function (row, data) {
//                        console.log(data);
                    }, "fnPreDrawCallback": function () {
                    }, "fnDrawCallback": function () {
                    }, "createdRow": function (row, data, index) {
                    }, "initComplete": function (settings, json) {
                    }

                });
            }, CargarErrorNubeFact: function () {
//                $.ajax({
//                    type: 'POST',
//                    dataType: 'JSON',
//                    url: "../AlumnoServlet?Accion=registrarAlumno",
//                    data: {
//                        'jsonAlumno': JSON.stringify(jsonAlumno),
//                        'myJsonApoderado': JSON.stringify(myJsonApoderado),
//                        'myJsonHermanos': JSON.stringify(myJsonHermanos),
//                        'myJsonEnfermedades': JSON.stringify(myJsonEnfermedades),
//                        'myJsonAlergias': JSON.stringify(myJsonAlergias),
//                        'myJsonSeguro': JSON.stringify(myJsonSeguro)
//                    },
//                    success: function (resultado) {
////                console.log(resultado.length);
//                        if (resultado.length >= 1 && isConfirm == true) {
//                            modals.confirmaSuccess();
//                            window.name = JSON.stringify(resultado[0]);
//                        } else {
//                            modals.confirmaCancelado();
//                        }
//                    },
//                    complete: function () {
//                    }
//                });
            }
        };

        var data;
        $('#tblErrorNubeFact tbody').on('click', '.editarAlumno', function () {
            data = table.row($(this).parents('tr')).data();
//            console.log(JSON.stringify(JSON.parse(data.jsonNubeFact).jsonNubeFact));
            $("#json-nubefact").removeClass("hidden");
            console.log("DaTA0000000000000->>>>>>>>>>>>>>" + JSON.stringify(data));
            var jsonresultado = JSON.stringify(JSON.parse(data.jsonNubeFact).jsonNubeFact);
            syncEditor(jsonresultado);
        });

        $("#prueba").click(function () {
            console.log(JSON.parse(json_editor.getValue()));
        });
        $("#cargarNubeFactJson").click(function () {
Angel Flores Chombile committed
418 419 420 421
//            console.log(JSON.stringify(json_editor.getValue()));
//            console.log(JSON.stringify(JSON.parse(data.jsonNubeFact).TOKEN));
//            console.log(data.accionNubefact);
            console.log(data.codCuotasPago);
Angel Flores Chombile committed
422 423 424

            $.ajax({
//                accionNubefact
Angel Flores Chombile committed
425
                type: 'POST',
Angel Flores Chombile committed
426 427 428 429 430
                dataType: 'JSON',
                url: "../ServletPension?accion=cargarNubeFact",
                data: {
                    'jsonBackupNubeFact': JSON.stringify(json_editor.getValue()),
                    'token': JSON.stringify(JSON.parse(data.jsonNubeFact).TOKEN),
Angel Flores Chombile committed
431 432 433
                    'accionNubefact': data.accionNubefact,
                    'codCuotasPago': data.codCuotasPago,
                    'codNubeFact':data.codNubeFact
Angel Flores Chombile committed
434 435
                },
                success: function (resultado) {
Angel Flores Chombile committed
436
                    console.log(JSON.stringify(resultado));
Angel Flores Chombile committed
437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463
                },
                complete: function () {
                }
            });
        });
        </script>

        <!--/ END PAGE LEVEL SCRIPTS -->
        <!--/ END JAVASCRIPT SECTION -->

        <!-- START GOOGLE ANALYTICS - ->
        <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-55892530-1', 'auto');
            ga('send', 'pageview');

        </script>
        <!- -/ END GOOGLE ANALYTICS -->

    </body>
    <!--/ END BODY -->

</html>