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