<?php

global $config;

?>

<!DOCTYPE html>

<html>

   <head>

		<title><? section("titre,title","Backoffice") ?></title>

		<meta charset="utf-8" />

		<meta http-equiv="X-UA-Compatible" content="IE=edge">

		<!--<meta content="width=device-width, initial-scale=1" name="viewport" />-->
		<meta name="viewport" content="width=1024">
		<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/angular_material/1.1.0/angular-material.min.css">

		<link href="//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700&subset=all" rel="stylesheet" type="text/css" />

		<link href="//fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

		<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

		<link rel="icon" href="<?= $config["favicon"] ?>" />

		<link href="https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,700" rel="stylesheet">
		<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
		<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.21/css/dataTables.bootstrap.min.css" />
    	<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/buttons/1.6.2/css/buttons.bootstrap.min.css" />
		<link href="//use.fontawesome.com/releases/v5.11.0/css/all.css" rel="stylesheet">
		<style>
			.ui-autocomplete {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}
    .treeview.w-20 {
  width: 20rem;
}
.treeview .rotate {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  vertical-align: text-top;
  cursor: pointer;
  user-select: none;
  transition: all 0.1s linear;
}
.treeview .rotate.down {
  transform: rotate(90deg);
}
.treeview .nested {
  display: none;
}
.treeview .active {
  display: block;
}
.treeview ul {
  list-style-type: none;
  padding-left:20px;
}
.treeview .ic-w {
  width: 1.3rem;
}

.treeview-animated.w-20 {
  width: 20rem;
}
.treeview-animated ul {
  position: relative;
  padding-left: 1em;
  list-style: none;
}
.treeview-animated .treeview-animated-list li {
  padding: 0.2em 0 0 0.2em;
}
.treeview-animated .treeview-animated-list .treeview-animated-items .nested::before {
  position: absolute;
  left: 5px;
  display: block;
  width: 5px;
  height: 100%;
  content: "";
  background-color: #808080;
}
.treeview-animated .treeview-animated-list .treeview-animated-items .closed {
  display: block;
  padding: 0.2em 0.2em 0.2em 0.4em;
  margin-right: 0;
  border-top-left-radius: 0.3em;
  border-bottom-left-radius: 0.3em;
}
.treeview-animated .treeview-animated-list .treeview-animated-items .closed:hover {
  background-color: #8cb9ff;
}
.treeview-animated .treeview-animated-list .treeview-animated-items .closed .fa-angle-right {
  font-size: 0.8rem;
  transition: all 0.1s linear;
}
.treeview-animated .treeview-animated-list .treeview-animated-items .closed .fa-angle-right.down {
  position: relative;
  color: #f8f9fa;
  transform: rotate(90deg);
}
.treeview-animated .treeview-animated-list .treeview-animated-items .open {
  background-color: #32a0ff;
  transition: all 0.1s linear;
}
.treeview-animated .treeview-animated-list .treeview-animated-items .open:hover {
  color: #f8f9fa;
  background-color: #32a0ff;
}
.treeview-animated .treeview-animated-list .treeview-animated-items .open span {
  color: #f8f9fa;
}
.treeview-animated .treeview-animated-list .treeview-animated-element {
  padding: 0.2em 0.2em 0.2em 0.6em;
  cursor: pointer;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  transition: all 0.1s linear;
}
.treeview-animated .treeview-animated-list .treeview-animated-element:hover {
  background-color: #8cb9ff;
}
.treeview-animated .treeview-animated-list .treeview-animated-element.opened {
  color: #f8f9fa;
  background-color: #32a0ff;
}
.treeview-animated .treeview-animated-list .treeview-animated-element.opened:hover {
  color: #f8f9fa;
  background-color: #32a0ff;
}

.treeview-colorful {
  font-size: 16px;
  font-weight: 400;
  background: rgba(224, 127, 178, 0.2);
}
.treeview-colorful.w-20 {
  width: 20rem;
}
.treeview-colorful hr {
  border-color: #a2127a;
}
.treeview-colorful h6 {
  font-size: 1.4em;
  font-weight: 500;
  color: #a2127a;
}
.treeview-colorful ul {
  position: relative;
  padding-left: 0;
  list-style: none;
}
.treeview-colorful .treeview-colorful-list ul {
  padding-left: 1em;
  margin-top: 0.1em;
  background: rgba(224, 127, 178, 0.2);
}
.treeview-colorful .treeview-colorful-element {
  padding: 0.2em 0.2em 0.2em 1em;
  cursor: pointer;
  border: 2px solid transparent;
  border-right: 0 solid transparent;
  transition: all 0.1s linear;
}
.treeview-colorful .treeview-colorful-element:hover {
  background-color: #e07fb2;
}
.treeview-colorful .treeview-colorful-element.opened {
  color: #ffac47;
  background-color: #a2127a;
  border: 2px solid #ffac47;
  border-right: 0 solid transparent;
}
.treeview-colorful .treeview-colorful-element.opened:hover {
  color: #ffac47;
  background-color: #a2127a;
}
.treeview-colorful .treeview-colorful-items-header {
  display: block;
  padding: 0.4em;
  margin-right: 0;
  border-bottom: 2px solid transparent;
  transition: all 0.1s linear;
}
.treeview-colorful .treeview-colorful-items-header:hover {
  background-color: #e07fb2;
}
.treeview-colorful .treeview-colorful-items-header.open {
  background-color: #a2127a;
  border-bottom: 2px solid #ffac47;
  transition: all 0.1s linear;
}
.treeview-colorful .treeview-colorful-items-header.open span {
  color: #ffac47;
}
.treeview-colorful .treeview-colorful-items-header.open:hover {
  color: #ffac47;
  background-color: #a2127a;
}
.treeview-colorful .treeview-colorful-items-header.open div:hover {
  background-color: #a2127a;
}
.treeview-colorful .treeview-colorful-items-header .fa-angle-right {
  font-size: 0.8rem;
  transition: all 0.2s linear;
}
.treeview-colorful .treeview-colorful-items-header .fas {
  position: relative;
  color: #ffac47;
  transition: all 0.2s linear;
  transform: rotate(90deg);
}
.treeview-colorful .treeview-colorful-items-header .fa-minus-circle {
  position: relative;
  color: #ffac47;
  transition: all 0.2s linear;
  transform: rotate(180deg);
}
    .treeview{
        line-height: 2.4rem; font-size: 1.6rem;
    }
    .spfas{
        margin-left:6px;
    }
    .ifas{
        font-size:1.6rem!important;
        margin-top:0px!important;
    }
	.ful{
		padding-left:0px!important;
	}
	</style>
		<style type="text/css">

		html{

			overflow: hidden !important;

		}
		.imgmenu{
			filter:invert(1) drop-shadow(0px 0px 0px white);
		}
		.dropdown-submenu .imgmenu{
			filter: invert(0) drop-shadow(0px 0px 0px black);
		}
		.dddd .modal-dialog{
			width:fit-content;
		}
		body,html{

			background: #e9ecf3;

		}

		body, html {

		    background: url(<?= $config["bgApp"] ?>); /* #e9ecf3 */

		    background-size: 100% 100%;

		}
		legend{
			border-bottom: unset;
			margin-bottom: unset;
		}
		.iii a{
				color:white;
				text-decoration: underline;
			}
			.iii a:link {
			color: white;
			text-decoration: underline;
			}

			/* visited link */
			.iii a:visited {
			color: white;
			text-decoration: underline;
			}

			/* mouse over link */
			.iii a:hover {
			color: white;
			text-decoration: underline;
			}

			/* selected link */
			.iii a:active {
			color: white;
			text-decoration: underline;
			}
		.separatorx {
			display: inline-block;
			background-color: black;
			width: 5px;
			height: 5px;
			border-radius: 45px;
			vertical-align: middle;
			margin-right: 6px;
			margin-left : 6px;
   		 }
		hr{

			border-top: 1px solid #337ab7 !important;

		}

		*{

			/*color: #697882;*/

			font-family: 'Roboto', sans-serif;

		}

		.form-control,.btn{

			border-radius: 0 !important;

			box-shadow: none !important;

		}

		.table td,input{

			font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;

		}	

		.table td,.table th{

			outline: none;

		}

		label:first-letter {

    		text-transform: uppercase;

		}

		.vakata-context{

			z-index: 15000;

		}

		.modal-content{

			background: url(<?= $config["bgApp"] ?>);

			background-size: 100% 100%;

			border: 1px solid #255d8e;



		}

		.modal-header,.modal-footer{

			background: <?= $config["bg"] ?>;

			color:#000;

		}

		.modal-body{

			background: #fff;

		}

		.tablepagination table{

			background: #fff;

		}

		.pagecontent{

			min-height: 100vh;

			background:<?= $config["bg"] ?>;

		}

		.modal.fade .modal-dialog {

		    -webkit-transition: -webkit-transform .1s ease-out !important;

		    -o-transition: -o-transform .1s ease-out !important;

		    transition: transform .1s ease-out !important;

		}

		.modal{

			/*background: rgba(0, 0, 0, 0.33);*/

			overflow-y: scroll !important;

		}

		@media only screen and (max-width: 600px){

			body{

				/*zoom:0.8;*/

			}

			.h1, h1 {

		    	font-size: 29px;

			}

			.pagecontent{

				min-height: 125vh;

			}

		}



		.container {

			//zoom: 0.94;
		    width: 100% !important;

		}	



		@media (max-width: 1270px){

			.container {
				//zoom: 0.94;
			    width: 100% !important;

			}	

		}



		input:focus{

			background: #f8ffdb;

		}



		.cercleblue{

			display:none;

			height: 10px;

			width: 10px;

			border-radius: 50%;

			background: blue;

		}

		.cerclerouge{

			display: none;

			height: 10px;

			width: 10px;

			border-radius: 50%;

			background: crimson;

		}

		article-form .cercleblue,article-form .cerclerouge{

			display: inline-block !important;

		}



		.table-striped>tbody>tr:nth-of-type(odd) {

		    /*background-color: #e0e0e0;*/

		}

		@media print{

			.hideonprint{

				display: none !important;

			}

		}
		.info {
			padding: 6px 8px;
			font: 14px/16px Arial, Helvetica, sans-serif;
			background: white;
			background: rgba(255, 255, 255, 0.8);
			box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
			border-radius: 5px;
		}

		.info>h2 {
			font-size: 18px!important;
    		margin: 0px!important;
		}
		.zza{
			width:100%;
			display: flex;
    		align-items: center;
		}
		.dataTables_length{
			float:left;
		}
		#srctc,#srctc2{
			zoom:0.9;
		}

		#xparc_processing {
			background: #9b9895;
			border-color: #000;
			font-size: 15px;
		}
		
		</style>

		<? section("css-lib") ?>

	</head>

	<body ng-app="app">









		<store-data ng-model="$root.config" name="config" widget="storeConfig"></store-data>

		<div style="display: flex;flex-direction: column;" class="pagecontent">

			<div style="flex:1;display: flex;flex-direction: column;">

				<? section("content") ?>

			</div>

		</div>

        <script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
		<script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script>

        <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"></script>

        <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js"></script>

        <script>(function(orig) {angular.modules = []; angular.module = function() {if (arguments.length > 1) {angular.modules.push(arguments[0]); } return orig.apply(null, arguments); } })(angular.module);</script>

        <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-sanitize.min.js"></script>

        <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-animate.min.js"></script>

        <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-aria.min.js"></script>

        <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-messages.min.js"></script>

        <script src="//ajax.googleapis.com/ajax/libs/angular_material/1.1.0/angular-material.min.js"></script>

		<script src="//cdnjs.cloudflare.com/ajax/libs/Chart.js/2.3.0/Chart.bundle.js"></script>
		<script src="//cdn.jsdelivr.net/angular.chartjs/latest/angular-chart.min.js"></script>

        <script src="/public/libs/ui-bootstrap.min.js"></script>

        <script type="text/javascript" src="/public/angucomplete-alt.js?v=<?= uniqid() ?>"></script>

		<script type="text/javascript" src="/public/node_modules/ui-select/dist/select.min.js"></script>
    	<script src="//cdnjs.cloudflare.com/ajax/libs/fabric.js/3.4.0/fabric.js"></script>
		<link rel="stylesheet" type="text/css" href="/public/node_modules/ui-select/dist/select.min.css">
		<script type="text/javascript" src="/public/jquery.dataTables.js"></script>
		<script type="text/javascript" src="//cdn.datatables.net/1.10.21/js/dataTables.bootstrap.min.js"></script>
		<script type="text/javascript" src="/public/dataTables.buttons.min.js"></script>
		<script type="text/javascript" src="//cdn.datatables.net/buttons/1.6.2/js/buttons.bootstrap.min.js"></script>
		<script type="text/javascript" src="/public/buttons.html5.js"></script>
		<script src="/public/mdb.min.js"></script>
		<link rel="stylesheet" type="text/css" href="/public/node_modules/ui-select/dist/select.min.css">

        <? section("js-lib-0") ?>

        <? section("js-lib") ?>

		<? section("js") ?>
		<script>
			var tabsrctc=null,tabsrctc2=null;
			function getpcsloc(x,y,w){
				document.querySelectorAll('.ahref').forEach(function(s) {
					s.style.color=""; 
				});
				document.getElementById(x+"-"+y).style.color="red";
				angular.element(document.getElementsByTagName(w)).scope().$$childTail.getpcloc2(x,y);
			}
			function getpcsloz(x,y,w,z){
				document.querySelectorAll('.ahref').forEach(function(s) {
					s.style.color=""; 
				});
				document.getElementById(x+"-"+y).style.color="red";
				angular.element(document.getElementsByTagName(w)).scope().$$childTail.getpcloz2(x,y,z);
			}
			function gor(x,y){
				switch(x.charAt(0)) {
					case 'h': xmg(x.substring(1),y);break;
					case 's': xsg(x.substring(1),y);break;
					default: xpc(x.substring(1),y);break;
				}
			}
			function xmg(x,y){
				angular.element(document.getElementsByTagName(y)).scope().$$childTail.xfetch("GenArtMaingroupHtml",{"mainGroupId": x});
			}
			function xsg(x,y){
				angular.element(document.getElementsByTagName(y)).scope().$$childTail.xfetch("GenArtSubgroupHtml",{"subGroupId": x,"subGroupQualCol":0});
			}
			function xpc(x,y){
				angular.element(document.getElementsByTagName(y)).scope().$$childTail.xpiece(x);
			}
			function hsy(){
				if(rrr.className=="ng-hide"){
					rrr.className="";fff.className="";
					chevron.className="glyphicon glyphicon-chevron-left";
				}
				else{
					rrr.className="ng-hide";fff.className="ng-hide";
					chevron.className="glyphicon glyphicon-chevron-right";
				}
			}

			var tabparc, chartabarr = [];
			var cozlor = ["#304ffe", "#2e7d32", "#9e9e9e", "#5fafaf", "#ffaf5f", "#626262", "#87afff", "#ffd7d7", "#8a8a8a", "#ff5faf", "#ffaf00", "#af5f00", "#87005f", "#ff875f", "#afffaf", "#d7af00", "#afafd7", "#800000", "#121212", "#d7ffaf", "#800080", "#87875f", "#ff5f87", "#005f87", "#005f00", "#ffff00", "#875f87", "#0000af", "#87af00", "#ff0000", "#87d75f", "#afd700", "#ffaf87", "#d787ff", "#af00af", "#e4e4e4", "#afaf87", "#8787ff", "#ff00af", "#008000", "#5faf00", "#5fd700", "#ff87d7", "#ffd700", "#af00ff", "#ff8787", "#87afaf", "#d700d7", "#585858", "#8787af", "#00ffaf", "#5fafff", "#af5faf", "#b2b2b2", "#87d700", "#af00d7", "#d7005f", "#5fd7af", "#d700ff", "#ff0087", "#5f5fd7", "#ffafff", "#af8787", "#87d7af", "#ffd7af", "#5faf87", "#d7afff", "#af87af", "#00d700", "#00ffd7", "#d7ffd7", "#eeeeee", "#005fff", "#00ffff", "#87afd7", "#5fd787", "#000087", "#d7ffff", "#d70000", "#c0c0c0", "#ffd787", "#87ffaf", "#5f875f", "#af5fff", "#d700af", "#00ff00", "#ffafaf", "#d75fff", "#d7d7d7", "#afff00", "#005fd7", "#d7afd7", "#af875f", "#875fff", "#ff00d7", "#949494", "#ffff87", "#767676", "#8700af", "#00ff5f", "#5fff5f", "#d7d787", "#808000", "#5fd75f", "#afff87", "#afd787", "#d75f5f", "#d75f87", "#5f00af", "#ff5f5f", "#d78700", "#a8a8a8", "#005f5f", "#0000d7", "#afaf00", "#008787", "#ff005f", "#d7ff00", "#00afd7", "#1c1c1c", "#d0d0d0", "#00af5f", "#5fff87", "#008700", "#5fd7d7", "#3a3a3a", "#000080", "#ff5fd7", "#c6c6c6", "#ff00ff", "#d7ff87", "#ffd7ff", "#d787d7", "#ffd75f", "#5fffff", "#afd7ff", "#d75f00", "#ffff5f", "#5f87ff", "#870000", "#87d7d7", "#875f5f", "#00d7ff", "#8787d7", "#5f5f5f", "#5fd7ff", "#af005f", "#444444", "#d7d75f", "#d75fd7", "#8700ff", "#875faf", "#afafff", "#afff5f", "#ffffd7", "#afd75f", "#d7875f", "#8700d7", "#af5f5f", "#0087d7", "#87d7ff", "#bcbcbc", "#87ff00", "#0087af", "#afafaf", "#262626", "#87ff5f", "#080808", "#00d7d7", "#5f005f", "#dadada", "#d7ff5f", "#afffd7", "#87d787", "#ff5fff", "#00d787", "#878787", "#d7d700", "#87ff87", "#d7af5f", "#5f0000", "#0000ff", "#ff87af", "#afd7d7", "#00d7af", "#005faf", "#00ff87", "#5f0087", "#5fff00", "#ff5f00", "#af0087", "#5fffd7", "#5fafd7", "#00d75f", "#87ffd7", "#875fd7", "#ff8700", "#af5fd7", "#5f8787", "#00af00", "#af0000", "#6c6c6c", "#d75faf", "#808080", "#00afff", "#d7af87", "#d7d7ff", "#5faf5f", "#d787af", "#5f87af", "#303030", "#5f5f00", "#ff87ff", "#af87ff", "#870087", "#afffff", "#5f5faf", "#af5f87", "#00005f", "#ffffaf", "#d7afaf", "#87af87", "#00875f", "#d78787", "#00af87", "#af87d7", "#87ffff", "#5f00d7", "#afd7af", "#af8700", "#878700", "#d7d7af", "#afaf5f", "#5fffaf", "#5f5f87", "#ffafd7", "#5f00ff", "#0087ff", "#5f87d7", "#00afaf", "#5f5fff", "#5f8700", "#4e4e4e", "#87af5f", "#875f00", "#008080", "#d70087"];

			function chartab(x = 0) {
				refchartab.disabled = true;
				for (var i = 0; i < chartabarr.length; i++) {
					chartabarr[i].destroy();
				}
				chartabarr = [];
				api("chartpe", {
					x: x
				}, function(rep) {
					var dataw = new Array(rep.length).fill(null),
						pie = new Array(rep.length).fill(null),
						ctx = new Array(rep.length).fill(null);
					for (i = 0; i < rep.length; i++) {
						ctx[i] = document.getElementById('chart-areape-' + i).getContext('2d');
						dataw[i] = {
							datasets: [{
								data: rep[i]["data"],
								backgroundColor: cozlor.slice(0, rep[i]["data"].length - 1)
							}],
							labels: rep[i]["label"]
						};
						pie[i] = new Chart(ctx[i], {
							type: 'pie',
							options: {
								responsive: true,
								title: {
									display: true,
									text: rep[i]["title"]
								}
							},
							data: dataw[i]
						});
						chartabarr.push(pie[i]);
					}
					refchartab.disabled = false;
				});
			} 

		function oou2() {
			api('gtSelect',{ from:{CD_SERIE:{tab:'API__MAT',col:'CD_SERIE'},MARQUE:{tab:'API__MAT',col:'MARQUE'},GOV:{tab:'API__MAT',col:'GOV'}} },function(rep){
			chartab();
			$('#xparc thead th').each(function() {
				if (this.textContent == "CD_SERIE"){
					$(this).html('<select id="stabparcserie" style="margin-bottom: 4px; width: 100%; height: 24px;"><option value="">Tout</option>'+rep.CD_SERIE+'<option value="^">VIDE</option></select><br>' + $(this).html());
				}
				else if (this.textContent == "MARQUE"){
					$(this).html('<select id="stabparcmarque" style="margin-bottom: 4px; width: 100%; height: 24px;"><option value="">Tout</option>'+rep.MARQUE+'<option value="^">VIDE</option></select><br>' + $(this).html());
				}
				else if (this.textContent == "GOV")
					$(this).html('<select id="stabparcgov" style="margin-bottom: 4px; width: 90px; height: 24px;"><option value="">Tout</option>'+rep.GOV+'<option value="^">VIDE</option></select><br>' + $(this).html());
				else if (this.textContent == "GAUCHE")
					$(this).html('<input type="text" style="margin-right: -21px;margin-bottom:4px;width:90px" list="mpty"/><datalist id="mpty"><option>^</option></datalist><br>' + $(this).html());
				else
					$(this).html('<input type="text" style="margin-right: -21px;margin-bottom:4px;width:auto" list="mpty"/><datalist id="mpty"><option>^</option></datalist><br>' + $(this).html());
			});
			tabparc = $("#xparc").DataTable({
				language: {
					"sEmptyTable":     "Aucune donnée disponible dans le tableau",
					"sInfo":           "Affichage de l'élément _START_ à _END_ sur _TOTAL_ éléments",
					"sInfoEmpty":      "Affichage de l'élément 0 à 0 sur 0 élément",
					"sInfoFiltered":   "(filtré à partir de _MAX_ éléments au total)",
					"sInfoPostFix":    "",
					"sInfoThousands":  ",",
					"sLengthMenu":     "Afficher _MENU_ éléments",
					"sLoadingRecords": "Chargement...",
					"sProcessing":     "Veuillez patienter...",
					"sSearch":         "Rechercher :",
					"sZeroRecords":    "Aucun élément correspondant trouvé",
					"oPaginate": {
						"sFirst":    "Premier",
						"sLast":     "Dernier",
						"sNext":     "Suivant",
						"sPrevious": "Précédent"
					},
					"oAria": {
						"sSortAscending":  ": activer pour trier la colonne par ordre croissant",
						"sSortDescending": ": activer pour trier la colonne par ordre décroissant"
					},
					"select": {
							"rows": {
								"_": "%d lignes sélectionnées",
								"0": "Aucune ligne sélectionnée",
								"1": "1 ligne sélectionnée"
							}  
					}

				},
				processing: true,
				serverSide: true,
				ajax: {
					url: "/public/parc.php",
					type: "POST"
				},
				lengthMenu: [
					[10, 25, 50, 100, 200, 300, 500, -1],
					[10, 20, 50, 100, 200, 300, 500, "Tout"]
				],
				order: [
					[0, "desc"]
				],
				buttons: [{
					extend: "csv",
					filename: function() {
						return "parc";
					},
					text: "Export CSV",
					exportOptions: {
						modifier: {
							search: "applied",
							order: "applied"
						}
					},
					action: function(e, dt, button, config) {
						dt.one('draw', function() {
							$.fn.dataTable.ext.buttons.csvHtml5.action.call(
								dt.button(button),
								e,
								dt,
								button,
								config
							);
							faza(false, dt);
						});
						faza(true, dt);
						dt.page.len(-1).draw();
					}
				}],
				columnDefs: [{
					render: function(data, type, row) {
						if (data)
							return '<a href="javascript:angular.element(document.getElementsByTagName(\'parc\')).scope().$$childTail.ijk(\'' + data + '\');">' + data + '</a>';
						else return '';
					},
					targets: 0
				}],
				pageLength: 10,
			});
			setTimeout(function() {
				tabparc
					.buttons()
					.container()
					.appendTo("#xparc_wrapper #xparc_filter");
			}, 2000);
			$('#stabparcserie').on('change', function() {
				tabparc.columns(10).search((this.value != "" && this.value != "^" ? "^" + this.value : this.value), true, false).draw();
			});
			$('#stabparcmarque').on('change', function() {
				tabparc.columns(1).search((this.value != "" && this.value != "^" ? "^" + this.value : this.value), true, false).draw();
			});
			$('#stabparcgov').on('change', function() {
				tabparc.columns(2).search((this.value != "" && this.value != "^" ? "^" + this.value : this.value), true, false).draw();
			});
			tabparc.columns().every(function() {
				var that = this;
				if (!["MARQUE","CD_SERIE","GOV"].includes(this.header().textContent))
				$('input', this.header()).on('keyup change', function() {
					if (that.search() !== this.value) {
						that
							.search(this.value)
							.draw();
					}
				});
			});
			
			});
		}
			
		</script>
	</body>
</html>