source: pro-violet-viettel/sourcecode/application/modules/admin/views/cardlog/index.php

Last change on this file was 461, checked in by quyenla, 11 years ago

Thong ke cong tac vien

File size: 2.8 KB
Line 
1<?php
2$base_url = base_url();
3$this->load->view('layout/admin/header', array('base_url' => $base_url));
4$this->load->view('layout/admin/sidebar', array('base_url' => $base_url, 'method'=>$this->router->method, 'class'=>$this->router->class  ));
5?>
6<script type="text/javascript">
7    function init_page()
8    {
9        $(".ajax_paging").click(function () {
10            $.ajax({
11                url: $(this).attr("href"),
12                type: "POST",
13                data: $("#cardlog").serialize(),
14                success: function (data, textStatus, jqXHR)
15                {
16                    $("#content").html(data);
17                    init_page();
18                },
19                error: function (jqXHR, textStatus, errorThrown)
20                {
21                    $(".ajaxloading").hide();
22                }
23            });
24            return false;
25        });
26                $('#keyword').bind('input', function(){
27                        filter();
28                });
29               
30                $( '.sorting, .sorting_desc, .sorting_asc' ).click(function( index ) {
31            var current_class=$( this ).attr('class');
32            $(".sorting_desc").attr("class","sorting");
33            $(".sorting_asc").attr("class","sorting");
34     
35            if(current_class=='sorting')
36            {
37                $(this).attr("class","sorting_desc");
38            }
39            else
40            {
41                if(current_class=='sorting_desc')
42                {
43                    $(this).attr("class","sorting_asc");
44                }
45                else
46                    {
47                    if(current_class=='sorting_asc')
48                    {
49                        $(this).attr("class","sorting");
50                    }
51                }
52            }
53            $("#sorting_field").val($(this).attr("id"));
54            $("#sorting_order").val($(this).attr("class"));
55            filter();
56        });
57        }
58       
59        function filter()
60        {
61                $.ajax({
62                        url: '<?php echo base_url();?>admin/card_log/trang/1',
63                        type: "POST",
64                        data: $("#cardlog").serialize(),
65                        success: function (data, textStatus, jqXHR)
66                        {
67                                console.log(data);
68                                $("#content").html(data);
69                                init_page();
70                                $("#keyword").focus();
71                                $("#keyword").setCursorToTextEnd();
72                        },
73                        error: function (jqXHR, textStatus, errorThrown)
74                        {
75                                console.log("ERROR");
76                                $(".ajaxloading").hide();
77                        }
78        });
79        }
80               
81</script>
82
83<div class="main-content" id="content">
84    <?php echo $content; ?>
85</div><!-- /.main-content -->
86</div><!-- /.main-container-inner -->
87
88<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
89    <i class="icon-double-angle-up icon-only bigger-110"></i>
90</a>
91</div><!-- /.main-container -->
92
93<?php
94$this->load->view('layout/admin/footer', array('base_url' => $base_url, 'adminjs'=>array('assets/js/admin/smslog.js')));
95?>
Note: See TracBrowser for help on using the repository browser.