[345] | 1 | <?php |
---|
| 2 | $base_url = base_url(); |
---|
| 3 | $this->load->view('layout/admin/header', array('base_url' => $base_url)); |
---|
[401] | 4 | $this->load->view('layout/admin/sidebar', array('base_url' => $base_url, 'method'=>$this->router->method, 'class'=>$this->router->class )); |
---|
[345] | 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(); |
---|
[690] | 20 | $('.daterangepicker').daterangepicker(); |
---|
[345] | 21 | }, |
---|
| 22 | error: function (jqXHR, textStatus, errorThrown) |
---|
| 23 | { |
---|
| 24 | $(".ajaxloading").hide(); |
---|
| 25 | } |
---|
| 26 | }); |
---|
| 27 | return false; |
---|
| 28 | }) |
---|
| 29 | $('#keyword').keyup(function (event) { |
---|
[359] | 30 | if (event.keyCode == '13') { |
---|
[345] | 31 | filter(); |
---|
| 32 | } |
---|
| 33 | return false; |
---|
| 34 | }); |
---|
[371] | 35 | |
---|
[690] | 36 | $(document).on('click', '.applyBtn', function(){ |
---|
| 37 | //$('#loading').css('display', 'block'); |
---|
| 38 | //$('#table_content').hide(); |
---|
| 39 | filter(); |
---|
| 40 | }); |
---|
[371] | 41 | |
---|
[401] | 42 | $( '.sorting, .sorting_desc, .sorting_asc' ).click(function( index ) { |
---|
[371] | 43 | var current_class=$( this ).attr('class'); |
---|
| 44 | $(".sorting_desc").attr("class","sorting"); |
---|
| 45 | $(".sorting_asc").attr("class","sorting"); |
---|
| 46 | |
---|
| 47 | if(current_class=='sorting') |
---|
| 48 | { |
---|
| 49 | $(this).attr("class","sorting_desc"); |
---|
| 50 | } |
---|
| 51 | else |
---|
| 52 | { |
---|
| 53 | if(current_class=='sorting_desc') |
---|
| 54 | { |
---|
| 55 | $(this).attr("class","sorting_asc"); |
---|
| 56 | } |
---|
| 57 | else |
---|
| 58 | { |
---|
| 59 | if(current_class=='sorting_asc') |
---|
| 60 | { |
---|
| 61 | $(this).attr("class","sorting"); |
---|
| 62 | } |
---|
| 63 | } |
---|
| 64 | } |
---|
| 65 | $("#sorting_field").val($(this).attr("id")); |
---|
| 66 | $("#sorting_order").val($(this).attr("class")); |
---|
| 67 | filter(); |
---|
| 68 | }); |
---|
[401] | 69 | $('[data-toggle="ajaxModal"]').on('click', |
---|
| 70 | function(e) { |
---|
| 71 | $('#ajaxModal').remove(); |
---|
| 72 | e.preventDefault(); |
---|
| 73 | var $this = $(this) |
---|
| 74 | , $remote = $this.data('remote') || $this.attr('href') |
---|
| 75 | , $modal = $('<div class="modal" id="ajaxModal"><div class="modal-body"></div></div>'); |
---|
| 76 | $('body').append($modal); |
---|
| 77 | $modal.modal({backdrop: 'static', keyboard: false}); |
---|
| 78 | $modal.load($remote); |
---|
| 79 | } |
---|
| 80 | ); |
---|
[371] | 81 | |
---|
| 82 | |
---|
[345] | 83 | } |
---|
[359] | 84 | |
---|
| 85 | |
---|
[345] | 86 | function filter() |
---|
| 87 | { |
---|
| 88 | $.ajax({ |
---|
[461] | 89 | url: '<?php echo base_url();?>admin/cong_tac_vien/trang/1', |
---|
[345] | 90 | type: "POST", |
---|
| 91 | data: $("#collaborator").serialize(), |
---|
| 92 | success: function (data, textStatus, jqXHR) |
---|
| 93 | { |
---|
| 94 | // $result = jQuery.parseJSON(data); |
---|
| 95 | $("#content").html(data); |
---|
| 96 | init_page(); |
---|
| 97 | $("#keyword").focus(); |
---|
| 98 | $("#keyword").setCursorToTextEnd(); |
---|
[690] | 99 | $('.daterangepicker').daterangepicker(); |
---|
[345] | 100 | |
---|
| 101 | }, |
---|
| 102 | error: function (jqXHR, textStatus, errorThrown) |
---|
| 103 | { |
---|
| 104 | $(".ajaxloading").hide(); |
---|
| 105 | } |
---|
| 106 | }); |
---|
| 107 | } |
---|
| 108 | |
---|
| 109 | |
---|
| 110 | </script> |
---|
| 111 | <div class="main-content" id="content"> |
---|
[354] | 112 | <?php echo $content; ?> |
---|
[345] | 113 | </div><!-- /.main-content --> |
---|
| 114 | </div><!-- /.main-container-inner --> |
---|
| 115 | |
---|
| 116 | <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse"> |
---|
| 117 | <i class="icon-double-angle-up icon-only bigger-110"></i> |
---|
| 118 | </a> |
---|
| 119 | </div><!-- /.main-container --> |
---|
[359] | 120 | |
---|
| 121 | |
---|
| 122 | <div id="addUser" class="modal fade in" tabindex="-1"> |
---|
| 123 | <div class="modal-dialog"> |
---|
| 124 | <div class="modal-content"> |
---|
| 125 | <div class="modal-header no-padding"> |
---|
| 126 | <div class="table-header"> |
---|
| 127 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> |
---|
| 128 | <span class="white">Ã</span> |
---|
| 129 | </button> |
---|
| 130 | Thêm cá»ng tác viên |
---|
| 131 | </div> |
---|
| 132 | </div> |
---|
| 133 | |
---|
| 134 | <div class="modal-body"> |
---|
| 135 | <form id="add_user" onsubmit="return false;" class="form-horizontal" role="form"> |
---|
[906] | 136 | <div class="row"> |
---|
| 137 | <div class="col-sm-9"> |
---|
| 138 | <div class="form-group"> |
---|
| 139 | <label for="cellphone" class="col-sm-4 control-label no-padding-right">Sá» Äiá»n thoại</label> |
---|
| 140 | |
---|
| 141 | <div class="col-sm-8"> |
---|
| 142 | <input type="text" name="cellphone" placeholder="Sá» Äiá»n thoại" id="cellphone" class="col-xs-12 col-sm-10"> |
---|
| 143 | </div> |
---|
| 144 | <label class="block clearfix has-error"> |
---|
| 145 | <small><div class="col-sm-8 help-block error" id="cellphone"> </div></small> |
---|
| 146 | </label> |
---|
| 147 | </div> |
---|
| 148 | </div> |
---|
[359] | 149 | </div> |
---|
[906] | 150 | |
---|
[359] | 151 | <div class="clearfix form-actions"> |
---|
| 152 | <div class="col-md-offset-3 col-md-9"> |
---|
| 153 | <button class="btn btn-info" id="add_user" type="button"> |
---|
| 154 | <i class="icon-ok bigger-110"></i> |
---|
| 155 | Hoà n tất |
---|
| 156 | </button> |
---|
| 157 | |
---|
| 158 | |
---|
| 159 | <button class="btn" type="reset"> |
---|
| 160 | <i class="icon-undo bigger-110"></i> |
---|
| 161 | Xóa hết |
---|
| 162 | </button> |
---|
| 163 | </div> |
---|
| 164 | </div> |
---|
| 165 | |
---|
| 166 | </form></div> |
---|
| 167 | |
---|
| 168 | </div> |
---|
| 169 | </div><!-- /.modal-content --> |
---|
| 170 | </div><!-- /.modal-dialog --> |
---|
[345] | 171 | <?php |
---|
| 172 | $this->load->view('layout/admin/footer', array('base_url' => $base_url, 'adminjs' => array('assets/js/admin/collaborator.js'))); |
---|
| 173 | ?> |
---|