 <?php include_once PUBLIC_PATH. '/files_to_include/header_content.php'; ?>
<!-- =============================================== -->

  <!-- Left side column. contains the sidebar -->
  <aside class="main-sidebar" id="aside_menu" >
      <section class="sidebar">
          <ul class="sidebar-menu">
            <?php include_once PUBLIC_PATH. '/files_to_include/menu.php'; ?>
          </ul>
      </section>
  </aside>
   <!-- Content Wrapper. Contains page content -->
   <div class="content-wrapper " style="background-color: white; td{border: solid  2px #000; }">
   

    <!-- Main content -->
    <section class="content">
        <div class="row">
         <div class="col-lg-12">
              
              <div id="connectheader">
                <div class="page-header">                    
                  <h3><span class="glyphicon glyphicon-th-list"></span> Calendrier des commandes de produit</h3>
                </div>
                 
              </div>
            
              
                <div id="calendar"></div>
            </div>
          </div>
      </div>
     

    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->
 <?php include_once PUBLIC_PATH. '/files_to_include/footer_content.php'; ?>
  
    <script src="<?php echo $this->baseUrl('script/jquery.min.js');?>"></script>
    <script src="<?php echo $this->baseUrl('script/bootstrap.min.js');?>"></script>
    <script src="<?php echo $this->baseUrl('script/app.min.js');?>"></script>
    <script src="<?php echo $this->baseUrl('script/i18next-1.7.1.min.js');?>"></script>
    <script src="<?php echo $this->baseUrl('script/pdfmake.min.js');?>"></script>
    <script src="<?php echo $this->baseUrl('script/metisMenu.min.js');?>"></script>
    <script src="<?php echo $this->baseUrl('script/sb-admin-2.js');?>"></script>
    <script src="<?php echo $this->baseUrl("script/vfs_fonts.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/jquery.toast.min.js");?>"></script>
    <script src="<?php echo $this->baseUrl('script/loadingoverlay.min.js');?>"></script>
    <script src="<?php echo $this->baseUrl("script/jquery.datetimepicker.full.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/bootstrap.select.min.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/moment.js");?>"></script>
    <script src="<?php echo $this->baseUrl("script/daterangepicker.js");?>"></script>
<!-- bootstrap datepicker -->
<script src="<?php echo $this->baseUrl("script/jquery-confirm.min.js");?>"></script>
    <!-- FastClick -->
<script src="<?php echo $this->baseUrl('script/fullcalendar.min.js');?>"></script>
<script src="<?php echo $this->baseUrl('script/fastclick.js');?>"></script>
<!-- AdminLTE App -->
<script src="<?php echo $this->baseUrl('script/adminlte.min.js');?>"></script>
<script src="<?php echo $this->baseUrl('script/demo.js');?>"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl('script/jquery.autocomplete.js');?>"></script>:
    <script type="text/javascript">
        
        $(document).ajaxSend(function(event, jqxhr, settings){
            $.LoadingOverlay("show");
        });
        
        $(document).ajaxComplete(function(event, jqxhr, settings){
            $.LoadingOverlay("hide");
        }); 
  params = {text:"text"};
  $.ajax({
              url : "<?php echo $this->url(array('controller' => 'Produit', 'action' => 'calendrier')); ?>",
              data : params,
              dataType : "json",
              type : "POST",
              error: function() {
                            $.toast({
                                    heading: "serveut inactif",
                                    text: "MVOLYEMANAGER n'arrive pas à accéder au serveur , si cela persiste veuillez contacter le groupe MELLCO ",
                                    icon: "error",
                                    hideAfter: false,
                                    stack: false,
                                    position: 'mid-center'
                            });
              },
              success: function(data) {
                            if (data.type === "success") {
                                $('#calendar').fullCalendar({
      header    : {
        left  : 'prev,next today',
        center: 'title',
        right : 'month,agendaWeek,agendaDay'
      },
      buttonText: {
        today: 'today',
        month: 'month',
        week : 'week',
        day  : 'day'
      },events:data.data}); 
                              //$calendar.fullCalendar("renderEvent",data,true);
                               
                       
                            } else {
                                $.toast({
                                    heading: "erreur",
                                    text: data.msg,
                                    icon: "error",
                                    hideAfter: false,
                                    stack: false,
                                    position: 'mid-center'
                                });
                            }
              }        
          });
    </script>

</body>

</html>