<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?= __NAME ?></title>

    <!-- Bootstrap -->
    <link href="<?= __SITEBASE ?>/theme/<?= __THEME ?>/resources/css/bootstrap.min.css" rel="stylesheet">
    
     <link href="<?= __SITEBASE ?>/theme/<?= __THEME ?>/resources/css/sb-admin.css" rel="stylesheet">
    <link rel="stylesheet" href="<?= __SITEBASE ?>/theme/<?= __THEME ?>/resources/font-awesome/css/font-awesome.min.css">
    <!-- Page Specific CSS -->
    <link rel="stylesheet" href="<?= __SITEBASE ?>/theme/<?= __THEME ?>/resources/css/morris-0.4.3.min.css">
    
    <!-- datepicker -->
    <link rel="stylesheet" href="<?= __SITEBASE ?>/theme/<?= __THEME ?>/resources/css/zebra_datepicker/bootstrap.css">
    
    <!--  datatables -->
    <link rel="stylesheet" href="<?= __SITEBASE ?>/theme/<?= __THEME ?>/resources/css/jquery.dataTables.min.css">
    
    <!-- mosy css -->
    <link rel="stylesheet" href="<?= __SITEBASE ?>/theme/<?= __THEME ?>/resources/css/style.css">
    
    <script src="<?= __SITEBASE ?>/theme/<?= __THEME ?>/resources/js/jquery-1.11.0.js"></script>
   
    <!-- datepicker -->
	<script type="text/javascript" src="<?= __SITEBASE ?>/theme/<?= __THEME ?>/resources/js/zebra_datepicker.js"></script>
	
  </head>
  <body>
  <div id="wrapper">
	  <div id="page-wrapper">
	   	<?php $this->load("sidebar"); ?>
	   	<?php $this->load(); ?>
	   	 </div>
  </div>	
     <script src="<?= __SITEBASE ?>/theme/<?= __THEME ?>/resources/js/bootstrap.min.js"></script>
     <!-- Page Specific Plugins -->

    <!-- <script src="<?= __SITEBASE ?>/theme/<?= __THEME ?>/resources/js/morris/chart-data-morris.js"></script> -->
    <script src="<?= __SITEBASE ?>/theme/<?= __THEME ?>/resources/js/tablesorter/jquery.tablesorter.js"></script>
    <script src="<?= __SITEBASE ?>/theme/<?= __THEME ?>/resources/js/tablesorter/tables.js"></script>
    
	<script type="text/javascript" src="<?= __SITEBASE ?>/theme/<?= __THEME ?>/resources/js/jquery.dataTables.min.js"></script>
    
  </body>
<?php  



if (Authorization::context_access_mode() == __ACCESS_READ) { ?>
<script type="text/javascript">
$(document).ready(function() {
     $("input[type!='hidden']").attr('disabled','disabled');
     $('select').attr('disabled','disabled');
     $('textarea').attr('disabled','disabled');
     $('button').attr('disabled','disabled');
     $("[permissions='true']").attr('disabled','disabled');
     $("[permissions='false']").removeAttr('disabled');
});	   	
</script>
<?php }?>

<script>
//data tables  
$(document).ready(function(){
    $('#table1').dataTable({
      pageLength:40,
      stateSave: true,
      ordering:  false });
   $('#table1_length').hide();
   $('[type="search"]').css("border","1px solid #ccc");
   $('[type="search"]').css("border-radius","4px");
   $('[type="search"]').css("height","34px");
  
   //$('[type="search"]').attr("class","form-control");
});

// end datatables

//white spaces
$(document).ready(function(){
	$('[type="text"]').attr("pattern","\\S+|((\\S+\\s*).+\\S)");
	$('[type="password"]').attr("pattern","\\S+|((\\S+\\s*).+\\S)");
	$('[type="email"]').attr("pattern","\\S+|((\\S+\\s*).+\\S)");
});
</script> 
</html>
