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