source: pro-violet-viettel/sourcecode/application/modules/admin/views/home/index.php @ 747

Last change on this file since 747 was 585, checked in by quyenla, 10 years ago

homew view

File size: 5.6 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
10        $(".ajax_paging").click(function () {
11            $.ajax({
12                url: $(this).attr("href"),
13                type: "POST",
14                data: $("#collaborator").serialize(),
15                success: function (data, textStatus, jqXHR)
16                {
17                    // $result = jQuery.parseJSON(data);
18                    $("#content").html(data);
19                    init_page();
20
21                },
22                error: function (jqXHR, textStatus, errorThrown)
23                {
24                    $(".ajaxloading").hide();
25                }
26            });
27            return false;
28        })
29        $('#keyword').keyup(function (event) {
30            if (event.keyCode == '13') {
31                filter();
32            }
33            return false;
34        });
35       
36       
37        $( '.sorting, .sorting_desc, .sorting_asc' ).click(function( index ) {
38            var current_class=$( this ).attr('class');
39            $(".sorting_desc").attr("class","sorting");
40            $(".sorting_asc").attr("class","sorting");
41     
42            if(current_class=='sorting')
43            {
44                $(this).attr("class","sorting_desc");
45            }
46            else
47            {
48                if(current_class=='sorting_desc')
49                {
50                    $(this).attr("class","sorting_asc");
51                }
52                else
53                    {
54                    if(current_class=='sorting_asc')
55                    {
56                        $(this).attr("class","sorting");
57                    }
58                }
59            }
60            $("#sorting_field").val($(this).attr("id"));
61            $("#sorting_order").val($(this).attr("class"));
62            filter();
63        });
64        $('[data-toggle="ajaxModal"]').on('click',
65              function(e) {
66                $('#ajaxModal').remove();
67                e.preventDefault();
68                var $this = $(this)
69                  , $remote = $this.data('remote') || $this.attr('href')
70                  , $modal = $('<div class="modal" id="ajaxModal"><div class="modal-body"></div></div>');
71                $('body').append($modal);
72                $modal.modal({backdrop: 'static', keyboard: false});
73                $modal.load($remote);
74              }
75            );
76
77
78 
79                                $('#sales-charts').css({'width':'100%' , 'height':'200px'});
80                                $.plot("#sales-charts", <?php echo json_encode($chard) ?>, {
81                                        hoverable: true,
82                                        shadowSize: 0,
83                                        series: {
84                                                lines: { show: true },
85                                                points: { show: true }
86                                        },
87                                        xaxis: {
88                                                tickLength: 0
89                                        },
90                                        yaxis: {
91                                                ticks: 10,
92                                                min: 0,
93                                                max:<?php echo $max;?>,
94                                                tickDecimals: 0
95                                        },
96                                        grid: {
97                                                backgroundColor: { colors: [ "#fff", "#fff" ] },
98                                                borderWidth: 1,
99                                                borderColor:'#555'
100                                        }
101                                });
102    }
103
104
105    function filter()
106    {
107        $.ajax({
108            url: '<?php echo base_url();?>admin/doanh_thu_tong_hop/trang/1',
109            type: "POST",
110            data: $("#collaborator").serialize(),
111            success: function (data, textStatus, jqXHR)
112            {
113                // $result = jQuery.parseJSON(data);
114                $("#content").html(data);
115                init_page();
116                $("#keyword").focus();
117                $("#keyword").setCursorToTextEnd();
118
119            },
120            error: function (jqXHR, textStatus, errorThrown)
121            {
122                $(".ajaxloading").hide();
123            }
124        });
125    }
126
127
128</script>
129<style type="text/css" media="screen">
130                        .widget-header-flat {
131                                background: #307ecc;
132                                color: #fff
133                        }
134                        .widget-toolbar>[data-action="collapse"], .header-color-dark>.widget-toolbar>[data-action="collapse"] {
135                                color: #fff
136                        }
137                        .widget-header, .widget-content {
138                                width: auto
139                        }
140                        .widget-body .table thead:first-child tr {
141                                background: #EDECEC;
142                            color: #707070;
143                            font-weight: normal;
144                        }
145                </style>
146             
147<div class="main-content" >
148    <div id="breadcrumbs" class="breadcrumbs">
149
150    <ul class="breadcrumb">
151        <li>
152            <i class="icon-home home-icon"></i>
153            <a href="<?php echo $base_url;?>/admin/home">Trang chá»§</a>
154        </li>
155
156        <li>
157            <a href="<?php echo $base_url;?>/admin/home"">Bảng điều khiển</a>
158        </li>
159       
160    </ul><!-- .breadcrumb -->
161
162    <div id="nav-search" class="nav-search">
163        <form class="form-search">
164            <span class="input-icon">
165                <input type="text" autocomplete="off" id="nav-search-input" class="nav-search-input" placeholder="Tìm kiếm ...">
166                <i class="icon-search nav-search-icon"></i>
167            </span>
168        </form>
169    </div><!-- #nav-search -->
170</div>
171   
172   
173   
174   
175<div class="page-content">
176   
177    <div class="page-header">
178       
179    </div><!-- /.page-header -->
180   
181     <div class="row"> 
182    <?php echo $statistics; ?>   
183     </div>
184     <div class="row" id="content">   
185    <?php echo $content; ?>
186     </div>
187    </div>
188</div><!-- /.main-content -->
189</div><!-- /.main-container-inner -->
190
191<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
192    <i class="icon-double-angle-up icon-only bigger-110"></i>
193</a>
194</div><!-- /.main-container -->
195
196
197
198</div><!-- /.modal-dialog -->
199<?php
200$this->load->view('layout/admin/footer', array('base_url' => $base_url));
201?>
Note: See TracBrowser for help on using the repository browser.