<!--
<script>
    // to remove many digits after the period
    $(function(){$(".ValSpan").each(function(){$(this).html(AddCommas(parseFloat($.trim($(this).text())).toXFixed(3))).animate({opacity:1})})})
</script>-->
<script src="<?php echo THEME_PATH; ?>plugins/jquery-validation/js/jquery.validate.min.js"></script>
<style>
    .table thead tr >th{
        background-color: #ed9421;
        color:#fff;
    }
    .table thead tr th[class*='sorting_'] {
        color: #FFFFFF;
    }
    .bg-master-lighter {
        border:none;
        background-color:#fff;
        border-top:1px solid #ddd;
    }
    .dropdown-menu>li>a {
        cursor:pointer;
    }
    .inputIcon{
        width:30px;}
    .DropDownForForms > .dropdown-menu {
        height: auto;
        cursor: pointer;
        overflow-y: auto;
        width:100%;
    }
    #tableWithSearch tbody >tr>td >div.Arrow{
        cursor:pointer;
    }
    #tableWithSearch tbody >tr>td >div.Arrow:before{
        content: "\f054";
        display: inline-block;
        margin-right: 8px;
        font-family: 'FontAwesome';
        -webkit-transition: all 0.12s linear;
        transition: all 0.12s linear;
    }
    #tableWithSearch tbody >tr.shown>td >div.Arrow:before {
        -webkit-transform: rotate(90deg);
        -ms-transform: rotate(90deg);
        transform: rotate(90deg);
    }
    .NameCenter{
        margin-left: 60px;
    }
    .table-responsive {
        overflow-x: visible;
    }
</style>
<div class="container-fluid container-fixed-lg bg-white">
    <div class="panel panel-transparent">
        <div class="panel-heading">
            <div class="panel-title"> <?php print CommonLanguage::getMessage('vehicle_maintenance');?></div>

            <div class="clearfix"></div>
        </div>
        <div class="panel-body">
            <table class="table table-detailed" id="tableWithSearch" >
                <thead>
                    <tr>
                        <th class="text-center" ><?php print CommonLanguage::getMessage('maker');?></th>
                        <th class="text-center" ><?php print CommonLanguage::getMessage('reg_nb');?></th>
                        <th class="text-center" > <?php print CommonLanguage::getMessage('current');?></th>
                        <th class="text-center"><?php print CommonLanguage::getMessage('counter');?></th>
                        <th class="text-center"><?php print CommonLanguage::getMessage('maintenance');?></th>
                        <th class="text-center" style="width:5%" ><?php print CommonLanguage::getMessage('Status');?></th>
                        <th class="text-center no-print" style="width:15%"><?php print CommonLanguage::getMessage('Action');?></th>
                    </tr>
                </thead>
                <tbody>
               
                </tbody>
            </table>
        </div>
    </div>
</div>

<script>

var title = <?php echo json_encode(CommonLanguage::getMessage('vehicle_maintenance'));?>;
    $(function(){
        RebuildDataTable(title,[0,1,2,3,4,5],'GarageAjax/VehicleMaintenanceRequest',1)
        $("#tableWithSearch").on("click",".Maintenance_Status>li",function(e){
            e.preventDefault();
            var Data={
                Maintenance_Status : $(this).attr("value"),
                Vehicle_ID     : $(this).parent().attr("data-id")
            },me = $(this);
            $.ajax({
                url:"GarageAjax/VehicleMaintenanceAjax",
                data:Data,
                complete:function(v1,v2){
                    if(v2 == "success" && v1.responseText == "OK"){
                                RebuildDataTable(title,[0,1,2,3,4,5],'GarageAjax/VehicleMaintenanceRequest',1)

                    }
                }
            });
        });
       
     
    })

</script>
