[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 | });
|
---|
[769] | 26 | /*
|
---|
[426] | 27 | $('#keyword').bind('input', function(){
|
---|
| 28 | filter();
|
---|
[769] | 29 | });*/
|
---|
| 30 | $('#keyword').keyup(function (event) {
|
---|
| 31 | if (event.keyCode == '13') {
|
---|
| 32 | filter();
|
---|
| 33 | }
|
---|
| 34 | return false;
|
---|
| 35 | });
|
---|
[426] | 36 |
|
---|
| 37 | $( '.sorting, .sorting_desc, .sorting_asc' ).click(function( index ) {
|
---|
| 38 | console.log("sort clicked");
|
---|
| 39 | var current_class=$( this ).attr('class');
|
---|
| 40 | $(".sorting_desc").attr("class","sorting");
|
---|
| 41 | $(".sorting_asc").attr("class","sorting");
|
---|
| 42 |
|
---|
| 43 | if(current_class=='sorting')
|
---|
| 44 | {
|
---|
| 45 | $(this).attr("class","sorting_desc");
|
---|
| 46 | }
|
---|
| 47 | else
|
---|
| 48 | {
|
---|
| 49 | if(current_class=='sorting_desc')
|
---|
| 50 | {
|
---|
| 51 | $(this).attr("class","sorting_asc");
|
---|
| 52 | }
|
---|
| 53 | else
|
---|
| 54 | {
|
---|
| 55 | if(current_class=='sorting_asc')
|
---|
| 56 | {
|
---|
| 57 | $(this).attr("class","sorting");
|
---|
| 58 | }
|
---|
| 59 | }
|
---|
| 60 | }
|
---|
| 61 | $("#sorting_field").val($(this).attr("id"));
|
---|
| 62 | $("#sorting_order").val($(this).attr("class"));
|
---|
| 63 | filter();
|
---|
| 64 | });
|
---|
| 65 | }
|
---|
| 66 |
|
---|
| 67 | function filter()
|
---|
| 68 | {
|
---|
| 69 | $.ajax({
|
---|
[461] | 70 | url: '<?php echo base_url();?>admin/sms_log/trang/1',
|
---|
[426] | 71 | type: "POST",
|
---|
| 72 | data: $("#smslog").serialize(),
|
---|
| 73 | success: function (data, textStatus, jqXHR)
|
---|
| 74 | {
|
---|
| 75 | $("#content").html(data);
|
---|
| 76 | init_page();
|
---|
| 77 | $("#keyword").focus();
|
---|
| 78 | $("#keyword").setCursorToTextEnd();
|
---|
| 79 | },
|
---|
| 80 | error: function (jqXHR, textStatus, errorThrown)
|
---|
| 81 | {
|
---|
| 82 | console.log("ERROR");
|
---|
| 83 | $(".ajaxloading").hide();
|
---|
| 84 | }
|
---|
| 85 | });
|
---|
| 86 | }
|
---|
| 87 |
|
---|
| 88 | </script>
|
---|
| 89 |
|
---|
| 90 | <div class="main-content" id="content">
|
---|
| 91 | <?php echo $content; ?>
|
---|
| 92 | </div><!-- /.main-content -->
|
---|
| 93 | </div><!-- /.main-container-inner -->
|
---|
| 94 |
|
---|
| 95 | <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
|
---|
| 96 | <i class="icon-double-angle-up icon-only bigger-110"></i>
|
---|
| 97 | </a>
|
---|
| 98 | </div><!-- /.main-container -->
|
---|
| 99 |
|
---|
| 100 | <?php
|
---|
| 101 | $this->load->view('layout/admin/footer', array('base_url' => $base_url, 'adminjs'=>array('assets/js/admin/smslog.js')));
|
---|
| 102 | ?> |
---|