<?php 
require '../config/adminconstant.php';
?>
<!DOCTYPE html>
<html>
<head>
    <?php require 'meta.php';  ?>
    <title>User Menu List</title>
    <?php require 'header.php'; ?>
    
<style>
     
      div.header {
          
          /*background-color: #c9c6cbba;*/
          border: 1px solid #e7e7e7;
      }
      
    </style>
</head>
<body>
    <?php require 'adminmenu.php' ?>
<div class="container-fluid">
 
    <form class="form-horizontal" action="usermenulist_MasterInsert.php" method="post">
    <div class="form-group">
      <label class="control-label col-sm-2" for="email">Add New Menu filenames</label>
      <div class="col-sm-5">
        <input type="text" class="form-control input-lg" placeholder="Enter Menu Name" name="filenames" autocomplete="off" required> 
      </div>
      <label class="label-command col-sm-4" for="email">Example : master,sale,purchase..</label>
    </div>
    <div class="form-group">        
      <div class="col-sm-12 text-center">
        <button type="submit" class="btn btn-default input-lg">Submit</button>
      </div>
    </div>
  </form> 

</div>


<div class="container">
  <div class="header"><h1>Menu List Master</h1>
    <table id="menulistMaster" class="table table-striped table-bordered dt-responsive nowrap" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th>Name List</th>
                <th>Action</th>
            </tr>
        </thead>
        <tbody>
       
           
        </tbody>
       
    </table>
  </div>  
</div>



    <?php require 'footer.php'; ?>

    <script>
$(document).ready(function() {
			   var dataTable =  $('#menulistMaster').DataTable( {
			   	    responsive: {
					details: {
					    renderer: function ( api, rowIdx ) {
						var data = api.cells( rowIdx, ':hidden' ).eq(0).map( function ( cell ) {
						    var header = $( api.column( cell.column ).header() );
						    return  '<p style="color:#00A">'+header.text()+' : '+api.cell( cell ).data()+'</p>';
						} ).toArray().join('');
 
						return data ?    $('<table/>').append( data ) :    false;
					    }
					}
				    },
			   	processing: true,
				serverSide: true,
				//ajax: "test.js", // json datasource
				ajax: {
                    url: "admin/usermenulist_Griddata.php",
                    type: 'POST',
                    
                
                }

			    } );
} );

</script>
</body>
</html>