JezK
Edit File: rating.php
<?php include("./app/checkSession.php"); if(empty($_SESSION['admin_name'])&&$_SESSION['admin_name']==""){ echo "<script>window.location.href='index.php'</script>"; } include("header.php"); include_once("../master_admin/app/adminObj.php"); ?> <style> .export_csv{ position: absolute; right: -20px !important; bottom: 25px !important; } @media(max-width:767px){ /* #example_filter label:after { right: 63px !important; } */ .tophead { margin-top: 31px !important; } .export_csv{ position: absolute; right: -22px !important; bottom: 25px !important; } td.ratingClass{ text-overflow: unset !important; max-width: 130px !important; } } .sorting_1{ text-transform:capitalize; } </style> <div class="container px-lg-5 px-md-0 px-0"> <div class="container mt-3"> <div class="tophead"> <h6><?php echo $lang['RATING'];?></h6> </div> </div> <div class="container mt-3"> <!-- <div class="bg-white tbl-border"> --> <div class="table-responsive p-md-2 myquotation-table"> <table id="example" class="display bg-white tbl-border table-borderless ratingTable" style="width:100%"> <thead> <tr class="mb-2"> <th><?php echo $lang['WAREHOUSE_NAME'];?></th> <th><?php echo $lang['QUOTATION_ID'];?></th> <th><?php echo $lang['REQUEST_TYPE'];?></th> <th><?php echo $lang['RATINGS'];?></th> </tr> </thead> </table> </div> <!-- </div> --> </div> <div class="container position-relative mt-3"> <div class="row export_csv butRes"> <div class="col-md-3 pl-2 rating mr-2"> <a id="export1" href="export-ratings.php" class="btn btn-primary"><i class="fa fa-download"></i><span class="pl-0"> <?php echo $lang['EXPORT.XLSX']; ?></span></a> </div> </div> </div> <?php include("footer.php"); ?> <script> // let $ =jQuery; $(document).ready(function() { $('#example').DataTable({ "processing": true, "dataSrc": "", "dom": 'Bfrtip', "dom": 'Rlfrtlip', language: { search: '', searchPlaceholder: "<?php echo $lang['SEARCH'];?>", paginate: {previous: '<?php echo $lang['PREV']; ?>',next:'<?php echo $lang['NEXT'];?>'} }, "pagingType": "full_numbers", "bProcessing": true, "bServerSide": true, "fnDrawCallback": function( oSettings ) { rowCount=oSettings.json.iTotalRecords; if(rowCount<1){ $("#export1").addClass("d-none") } }, "sAjaxSource": "app/rating_ajax.php", // "ordering": false, "aoColumns": [{ mData: 'warehouse_name' }, { mData: 'quotation_id' }, { mData: 'request_status' }, { mData: 'rating', sClass:"ratingClass" } ] }); }); $('[data-star]').on('click', function(e) { e.preventDefault(); $(this).addClass('select'); $(this).prevAll('[data-star]').addClass('select'); $(this).nextAll('[data-star]').removeClass('select'); $(this).parent().find('input').val($(this).data('star')); }); $('[data-star]').on('mouseover', function(e) { e.preventDefault(); $(this).addClass('highlight'); $(this).prevAll('[data-star]').addClass('highlight'); $(this).nextAll('[data-star]').removeClass('highlight'); }); $('[data-star]').on('mouseout', function(e) { e.preventDefault(); $(this).removeClass('highlight'); $(this).prevAll('[data-star]').removeClass('highlight'); }); </script>