{literal}
<script>
    var otable_wishes;

    function draw_wishList_table() {
        if ($('#wishList_table').length > 0) {
            var wishList_table = $('#wishList_table');
            if ($.fn.dataTable.isDataTable('#wishList_table')) {
                otable_wishes.ajax.reload();
            } else {
                otable_wishes = wishList_table.DataTable({
                    "processing": true,
                    "stateSave": true,
                    "serverSide": true,
                    "ajax": {
                        url: 'wishList.php?do=showallajax', type: 'POST',
                        "data": {
//                            datefrom: $('#datefrom').val(),
//                            dateto: $('#dateto').val(),
//                            userid: $('#userid').val(),
                            "del": function () {
                                return 0;
                            },
                            // etc..
                        }
                    }, //  server side processing
                    dom: 'Bfrtip',
                    buttons: [//'csv', 'pdf'
                        {
                            extend: "print",
                            title: '',
                            className: "btn dark btn-outline",
                            text: "طباعه<i class='fa fa-print'></i>",
                            exportOptions: {
                                //columns: '.show-print'
                                columns: [0, 1, 2, 3, 4, 5, 6, 7, 8],
                            },
                            customize: function (win) {
                                $(win.document.body).find('table')
                                        //.addClass('compact')
                                        .css('direction', 'rtl');
                            }
                        }, {
                            extend: "copy",
                            className: "btn red btn-outline",
                            text: "نسخ",
                            exportOptions: {
                                //columns: '.show-print'
                                columns: ':visible'
                            }
                        }, {
                            extend: "excel",
                            className: "btn yellow btn-outline ",
                            text: "اكسل",
                            exportOptions: {
                                //columns: '.show-print'
                                columns: ':visible'
                            }
                        }, {
                            extend: "colvis",
                            className: "btn dark btn-outline",
                            text: "المكونات"
                        }
                    ], "bStateSave": true,
                    "language": {
                        "aria": {
                            "sortAscending": ": Used to order Ascending",
                            "sortDescending": ": Used to order Descending"
                        },
                        "emptyTable": "لا يوجد بيانات",
                        "info": "عرض من  _START_ إلى  _END_  - عدد عملاء البحث _TOTAL_",
                        "infoEmpty": "لا يوجد بيانات",
                        "infoFiltered": "(تنقيه  من عدد عملاء كلى _MAX_)",
                        "lengthMenu": " _MENU_ عنصر",
                        "search": "البحث:",
                        "zeroRecords": "لا يوجد بيانات تشابه البحث"
                    },
                    responsive: !0,
                    "columnDefs": [
                        //{"className": "hidden-print", "targets": [0, 9, 10, 11, 12, 13, 14]}
                        ////            {// set default column settings //                "orderable": false,
                        //                "searchable": false,
                        //                "targets": [lstone],
                        //                "className": 'hide-print'
                        //            },
                        //            {// set default column settings
                        //                "orderable": false,
                        //                "searchable": false,
                        //                "targets": [belastone],
                        //                "className": 'hide-print'
                        //            },
                        //            {// set default column settings
                        //                "orderable": false,
                        //                "searchable": false, //                "targets": [thrdone],
                        //                "className": 'hide-print'
                        //            },
                        //                {targets: '_all', "className": 'show-print'}
                    ],
                    order: [
                        [0, "asc"]
                    ],
                    paging: true,
                    lengthMenu: [
                        [5, 10, 25, 50, 100, 300, 500, -1],
                        [5, 10, 25, 50, 100, 300, 500, "All"]
                    ],
                    pageLength: 10,
                    dom: "<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>"
                });

                //when draw is comlete cal total of column using datatable api sum func
//                wishList_table.on('draw', function (e, ajaxdata) {
//                });
            }
        }
    }
</script>
{/literal}
<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="#">المتجر اونلاين</a></li>
            <li><a href="wishList.php?do=show">المنتجات المفضلة</a></li>
            <li class="active">عرض</li>
        </ol>
        <div class="panel panel-default panel-m">
            <!-- Default panel contents -->
            <div class="panel-heading" style="padding:5px 15px 15px">
                <h3 class="panel-title" style="display: inline-block;">عرض</h3>
                <a href="{$youtubes[47]->url}" target="_blank" class="hidden-print"><img src="../views/default/assets/img/youtube.png" class="pull-left" alt="Youtube" style="width: 2%;"></a>
                <!--<a href="wishList.php" class="hidden-print"><input type="button"  id="submit" style="margin-left: 12px" class="btn btn-primary pull-left " value="اضافة جديد"/></a>-->
            </div>
            <!--            <div class="panel-body">
                            <div id="outputString" class="alert alert-block alert-success fade in" style="display:none">
                                <button type="button" class="close pull-left" data-dismiss="alert" aria-hidden="true">&times;</button>
                                <p id="outputStringValue">
                                    {$outputString}
                                </p>
                                <div class="clearfix"></div>
                            </div>
                        </div>
                        <hr/>-->

            <!-- Table -->
            {literal}
            <form method="post" action="slider.php?do=executeOperation" onsubmit="if (Spry.Widget.Form.validate(this)) {
                        return true;
                    } else {
                        return false;
                    }">
                {/literal}
                <table class="table table-black" id="wishList_table">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>العميل</th>
                            <th>المنتج</th>
                            <th>تاريخ التفضيل</th>
                            <!--                            <th class="hidden-print">تعديل</th>
                                                        <th class="hidden-print">حذف </th>-->
                        </tr>
                    </thead>
                    <tbody>
                    </tbody>
                </table>
                <div class="clearfix"></div>

            </form>
        </div>

    </div>
</div>
{literal}
<script type="text/javascript">
    $(function () {
        draw_wishList_table();
    });
</script>
{/literal}