[375] | 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));
|
---|
| 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: $("#user").serialize(),
|
---|
| 14 | success: function (data, textStatus, jqXHR)
|
---|
| 15 | {
|
---|
| 16 | $("#content").html(data);
|
---|
| 17 | init_page();
|
---|
[742] | 18 | $('.daterangepicker').daterangepicker({
|
---|
| 19 | format: 'DD/MM/YYYY'
|
---|
| 20 | });
|
---|
[375] | 21 | },
|
---|
| 22 | error: function (jqXHR, textStatus, errorThrown)
|
---|
| 23 | {
|
---|
| 24 | $(".ajaxloading").hide();
|
---|
| 25 | }
|
---|
| 26 | });
|
---|
| 27 | return false;
|
---|
| 28 | });
|
---|
[690] | 29 | $('#keyword').keyup(function (event) {
|
---|
| 30 | if (event.keyCode == '13') {
|
---|
| 31 | filter();
|
---|
| 32 | }
|
---|
| 33 | return false;
|
---|
| 34 | });
|
---|
| 35 | /*$('#keyword').bind('input', function(){
|
---|
[396] | 36 | filter();
|
---|
[690] | 37 | });*/
|
---|
| 38 | $('#daterange').keyup(function (event) {
|
---|
| 39 | if (event.keyCode == '13') {
|
---|
| 40 | filter();
|
---|
| 41 | }
|
---|
| 42 | return false;
|
---|
| 43 | });
|
---|
| 44 |
|
---|
| 45 | $(document).on('click', '.applyBtn', function(){
|
---|
| 46 | $('#loading').css('display', 'block');
|
---|
| 47 | $('#table_content').hide();
|
---|
| 48 | filter();
|
---|
[396] | 49 | });
|
---|
| 50 |
|
---|
| 51 | $( '.sorting, .sorting_desc, .sorting_asc' ).click(function( index ) {
|
---|
| 52 | var current_class=$( this ).attr('class');
|
---|
| 53 | $(".sorting_desc").attr("class","sorting");
|
---|
| 54 | $(".sorting_asc").attr("class","sorting");
|
---|
| 55 |
|
---|
| 56 | if(current_class=='sorting')
|
---|
| 57 | {
|
---|
| 58 | $(this).attr("class","sorting_desc");
|
---|
| 59 | }
|
---|
| 60 | else
|
---|
| 61 | {
|
---|
| 62 | if(current_class=='sorting_desc')
|
---|
| 63 | {
|
---|
| 64 | $(this).attr("class","sorting_asc");
|
---|
| 65 | }
|
---|
| 66 | else
|
---|
| 67 | {
|
---|
| 68 | if(current_class=='sorting_asc')
|
---|
| 69 | {
|
---|
| 70 | $(this).attr("class","sorting");
|
---|
| 71 | }
|
---|
| 72 | }
|
---|
| 73 | }
|
---|
| 74 | $("#sorting_field").val($(this).attr("id"));
|
---|
| 75 | $("#sorting_order").val($(this).attr("class"));
|
---|
| 76 | filter();
|
---|
| 77 | });
|
---|
[375] | 78 | }
|
---|
| 79 |
|
---|
| 80 | function filter()
|
---|
| 81 | {
|
---|
[773] | 82 | var daterange = $('input[name="daterange"]').val();
|
---|
[375] | 83 | $.ajax({
|
---|
[461] | 84 | url: '<?php echo base_url();?>admin/nguoi_dung/trang/1',
|
---|
[375] | 85 | type: "POST",
|
---|
| 86 | data: $("#user").serialize(),
|
---|
| 87 | success: function (data, textStatus, jqXHR)
|
---|
| 88 | {
|
---|
[690] | 89 | $('#loading').css('display', 'none');
|
---|
| 90 | $('#table_content').show();
|
---|
[375] | 91 | $("#content").html(data);
|
---|
[742] | 92 | $('.daterangepicker').daterangepicker({
|
---|
| 93 | format: 'DD/MM/YYYY'
|
---|
| 94 | });
|
---|
[883] | 95 | $("#keyword").focus();
|
---|
| 96 | $("#keyword").setCursorToTextEnd();
|
---|
| 97 | init_page();
|
---|
[690] | 98 | $('input[name="daterange"]').val(daterange);
|
---|
[375] | 99 | },
|
---|
| 100 | error: function (jqXHR, textStatus, errorThrown)
|
---|
| 101 | {
|
---|
| 102 | $(".ajaxloading").hide();
|
---|
| 103 | }
|
---|
| 104 | });
|
---|
| 105 | }
|
---|
[883] | 106 | //$(document).ready(function(){
|
---|
[375] | 107 |
|
---|
[883] | 108 | //});
|
---|
| 109 |
|
---|
| 110 |
|
---|
[375] | 111 | </script>
|
---|
| 112 |
|
---|
| 113 | <div class="main-content" id="content">
|
---|
| 114 | <?php echo $content; ?>
|
---|
| 115 | </div><!-- /.main-content -->
|
---|
| 116 | </div><!-- /.main-container-inner -->
|
---|
| 117 |
|
---|
| 118 | <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
|
---|
| 119 | <i class="icon-double-angle-up icon-only bigger-110"></i>
|
---|
| 120 | </a>
|
---|
| 121 | </div><!-- /.main-container -->
|
---|
| 122 |
|
---|
| 123 | <div id="addUser" class="modal fade in" tabindex="-1">
|
---|
| 124 | <div class="modal-dialog">
|
---|
| 125 | <div class="modal-content">
|
---|
| 126 | <div class="modal-header no-padding">
|
---|
| 127 | <div class="table-header">
|
---|
| 128 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
|
---|
| 129 | <span class="white">Ã</span>
|
---|
| 130 | </button>
|
---|
| 131 | Thêm ngưá»i dùng
|
---|
| 132 | </div>
|
---|
| 133 | </div>
|
---|
| 134 |
|
---|
| 135 | <div class="modal-body">
|
---|
[408] | 136 | <form id="add_frm" onsubmit="return false;" class="form-horizontal" role="form">
|
---|
[375] | 137 | <div class="form-group">
|
---|
| 138 | <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Sá» Äiá»n thoại </label>
|
---|
| 139 |
|
---|
| 140 | <div class="col-sm-9">
|
---|
| 141 | <span class="input-icon">
|
---|
[378] | 142 | <input name="phone" type="text" id="form-field-1" placeholder="Phone">
|
---|
[375] | 143 | <i class="icon-user blue"></i>
|
---|
| 144 | </span>
|
---|
| 145 | </div>
|
---|
| 146 | <div class="help-block"> </div>
|
---|
| 147 | </div>
|
---|
| 148 | <div class="form-group">
|
---|
[378] | 149 | <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> Tên ÄÄng nháºp </label>
|
---|
[375] | 150 |
|
---|
| 151 | <div class="col-sm-9">
|
---|
| 152 | <span class="input-icon">
|
---|
[378] | 153 | <input name="login_name" type="text" id="form-field-2" placeholder="Tà i khoản">
|
---|
[375] | 154 | <i class="icon-user blue"></i>
|
---|
| 155 | </span>
|
---|
| 156 | </div>
|
---|
| 157 | <div class="help-block"> </div>
|
---|
| 158 | </div>
|
---|
| 159 |
|
---|
| 160 | <div class="form-group">
|
---|
| 161 | <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> Máºt khẩu </label>
|
---|
| 162 |
|
---|
| 163 | <div class="col-sm-9">
|
---|
| 164 | <span class="input-icon">
|
---|
[378] | 165 | <input type="password" name="passwd" id="form-field-3" placeholder="Máºt khẩu">
|
---|
[375] | 166 | <i class="icon-lock blue"></i>
|
---|
| 167 | </span>
|
---|
| 168 | </div>
|
---|
| 169 | <div class="help-block"> </div>
|
---|
| 170 | </div>
|
---|
| 171 | <div class="form-group">
|
---|
[378] | 172 | <label class="col-sm-3 control-label no-padding-right" for="form-field-4"> Xác nháºn máºt khẩu </label>
|
---|
[375] | 173 |
|
---|
| 174 | <div class="col-sm-9">
|
---|
| 175 | <span class="input-icon">
|
---|
[378] | 176 | <input type="password" name="passwd2" id="form-field-4" placeholder="Nháºp lại máºt khẩu">
|
---|
[375] | 177 | <i class="icon-lock blue"></i>
|
---|
| 178 | </span>
|
---|
| 179 | </div>
|
---|
| 180 | <div class="help-block"> </div>
|
---|
| 181 | </div>
|
---|
| 182 |
|
---|
| 183 | <div class="space-4"></div>
|
---|
| 184 | <div class="form-group errors" id="add_user">
|
---|
| 185 |
|
---|
| 186 | </div>
|
---|
| 187 | <div class="clearfix form-actions">
|
---|
| 188 | <div class="col-md-offset-3 col-md-9">
|
---|
| 189 | <button class="btn btn-info" id="add_user" type="button">
|
---|
| 190 | <i class="icon-ok bigger-110"></i>
|
---|
| 191 | Hoà n tất
|
---|
| 192 | </button>
|
---|
| 193 |
|
---|
| 194 |
|
---|
| 195 | <button class="btn" type="reset">
|
---|
| 196 | <i class="icon-undo bigger-110"></i>
|
---|
| 197 | Xóa hết
|
---|
| 198 | </button>
|
---|
| 199 | </div>
|
---|
| 200 | </div>
|
---|
| 201 |
|
---|
| 202 | </form></div>
|
---|
| 203 |
|
---|
| 204 | </div>
|
---|
| 205 | </div><!-- /.modal-content -->
|
---|
| 206 | </div><!-- /.modal-dialog -->
|
---|
| 207 |
|
---|
| 208 | <?php
|
---|
[396] | 209 | $this->load->view('layout/admin/footer', array('base_url' => $base_url, 'adminjs' => array('assets/js/admin/user.js')));
|
---|
[883] | 210 | ?>
|
---|