[426] | 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: $("#smslog").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 | console.log("sort clicked");
|
---|
| 32 | var current_class=$( this ).attr('class');
|
---|
| 33 | $(".sorting_desc").attr("class","sorting");
|
---|
| 34 | $(".sorting_asc").attr("class","sorting");
|
---|
| 35 |
|
---|
| 36 | if(current_class=='sorting')
|
---|
| 37 | {
|
---|
| 38 | $(this).attr("class","sorting_desc");
|
---|
| 39 | }
|
---|
| 40 | else
|
---|
| 41 | {
|
---|
| 42 | if(current_class=='sorting_desc')
|
---|
| 43 | {
|
---|
| 44 | $(this).attr("class","sorting_asc");
|
---|
| 45 | }
|
---|
| 46 | else
|
---|
| 47 | {
|
---|
| 48 | if(current_class=='sorting_asc')
|
---|
| 49 | {
|
---|
| 50 | $(this).attr("class","sorting");
|
---|
| 51 | }
|
---|
| 52 | }
|
---|
| 53 | }
|
---|
| 54 | $("#sorting_field").val($(this).attr("id"));
|
---|
| 55 | $("#sorting_order").val($(this).attr("class"));
|
---|
| 56 | filter();
|
---|
| 57 | });
|
---|
| 58 | }
|
---|
| 59 |
|
---|
| 60 | function filter()
|
---|
| 61 | {
|
---|
| 62 | $.ajax({
|
---|
[461] | 63 | url: '<?php echo base_url();?>admin/sms_log/trang/1',
|
---|
[426] | 64 | type: "POST",
|
---|
| 65 | data: $("#smslog").serialize(),
|
---|
| 66 | success: function (data, textStatus, jqXHR)
|
---|
| 67 | {
|
---|
| 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 | ?> |
---|