/**
* Theme: Adminto Admin Template
* Author: Coderthemes
* Component: Datatable
* 
*/

var handleDataTableButtons = function () {
    "use strict";
    0 !== $(".datatable-buttons").length &&  $('.datatable-buttons').DataTable({
        responsive:true , 
        language : {
                "sProcessing":   "جارٍ التحميل...",
                "sLengthMenu":   "أظهر _MENU_ مدخلات",
                "sZeroRecords":  "لم يعثر على أية سجلات",
                "sInfo":         "إظهار _START_ إلى _END_ من أصل _TOTAL_ مدخل",
                "sInfoEmpty":    "يعرض 0 إلى 0 من أصل 0 سجل",
                "sInfoFiltered": "(منتقاة من مجموع _MAX_ مُدخل)",
                "sInfoPostFix":  "",
                "sSearch":       "ابحث:",
                "sUrl":          "",
                "oPaginate": {
                    "sFirst":    "الأول",
                    "sPrevious": "السابق",
                    "sNext":     "التالي",
                    "sLast":     "الأخير"
                }
            } ,
         dom: "Bfrtip",
         buttons: [
                     {extend: "copy", className: "btn-sm"}, 
                     {extend: "csv", className: "btn-sm"}, 
                     {extend: "excel",className: "btn-sm"}, 
                     {extend: "pdf", className: "btn-sm"}, 
                     {extend: "print", className: "btn-sm"}
                 ]
    });
    
}, TableManageButtons = function () {
    "use strict";
    return {
        init: function () {
            handleDataTableButtons()
        }
    }
}();