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();
|
---|
18 | $('.daterangepicker').daterangepicker({
|
---|
19 | format: 'DD/MM/YYYY'
|
---|
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 | /*$('#keyword').bind('input', function(){
|
---|
36 | filter();
|
---|
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();
|
---|
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 | });
|
---|
78 | }
|
---|
79 |
|
---|
80 | function filter()
|
---|
81 | {
|
---|
82 | var daterange = $('input[name="daterange"]').val();
|
---|
83 | $.ajax({
|
---|
84 | url: '<?php echo base_url();?>admin/nguoi_dung/trang/1',
|
---|
85 | type: "POST",
|
---|
86 | data: $("#user").serialize(),
|
---|
87 | success: function (data, textStatus, jqXHR)
|
---|
88 | {
|
---|
89 | $('#loading').css('display', 'none');
|
---|
90 | $('#table_content').show();
|
---|
91 | $("#content").html(data);
|
---|
92 | $("#keyword").focus();
|
---|
93 | $("#keyword").setCursorToTextEnd();
|
---|
94 | $('.daterangepicker').daterangepicker({
|
---|
95 | format: 'DD/MM/YYYY'
|
---|
96 | });
|
---|
97 | $('input[name="daterange"]').val(daterange);
|
---|
98 | init_page();
|
---|
99 | },
|
---|
100 | error: function (jqXHR, textStatus, errorThrown)
|
---|
101 | {
|
---|
102 | $(".ajaxloading").hide();
|
---|
103 | }
|
---|
104 | });
|
---|
105 | }
|
---|
106 |
|
---|
107 | </script>
|
---|
108 |
|
---|
109 | <div class="main-content" id="content">
|
---|
110 | <?php echo $content; ?>
|
---|
111 | </div><!-- /.main-content -->
|
---|
112 | </div><!-- /.main-container-inner -->
|
---|
113 |
|
---|
114 | <a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
|
---|
115 | <i class="icon-double-angle-up icon-only bigger-110"></i>
|
---|
116 | </a>
|
---|
117 | </div><!-- /.main-container -->
|
---|
118 |
|
---|
119 | <div id="addUser" class="modal fade in" tabindex="-1">
|
---|
120 | <div class="modal-dialog">
|
---|
121 | <div class="modal-content">
|
---|
122 | <div class="modal-header no-padding">
|
---|
123 | <div class="table-header">
|
---|
124 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
|
---|
125 | <span class="white">Ã</span>
|
---|
126 | </button>
|
---|
127 | Thêm ngưá»i dùng
|
---|
128 | </div>
|
---|
129 | </div>
|
---|
130 |
|
---|
131 | <div class="modal-body">
|
---|
132 | <form id="add_frm" onsubmit="return false;" class="form-horizontal" role="form">
|
---|
133 | <div class="form-group">
|
---|
134 | <label class="col-sm-3 control-label no-padding-right" for="form-field-1"> Sá» Äiá»n thoại </label>
|
---|
135 |
|
---|
136 | <div class="col-sm-9">
|
---|
137 | <span class="input-icon">
|
---|
138 | <input name="phone" type="text" id="form-field-1" placeholder="Phone">
|
---|
139 | <i class="icon-user blue"></i>
|
---|
140 | </span>
|
---|
141 | </div>
|
---|
142 | <div class="help-block"> </div>
|
---|
143 | </div>
|
---|
144 | <div class="form-group">
|
---|
145 | <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> Tên ÄÄng nháºp </label>
|
---|
146 |
|
---|
147 | <div class="col-sm-9">
|
---|
148 | <span class="input-icon">
|
---|
149 | <input name="login_name" type="text" id="form-field-2" placeholder="Tà i khoản">
|
---|
150 | <i class="icon-user blue"></i>
|
---|
151 | </span>
|
---|
152 | </div>
|
---|
153 | <div class="help-block"> </div>
|
---|
154 | </div>
|
---|
155 |
|
---|
156 | <div class="form-group">
|
---|
157 | <label class="col-sm-3 control-label no-padding-right" for="form-field-2"> Máºt khẩu </label>
|
---|
158 |
|
---|
159 | <div class="col-sm-9">
|
---|
160 | <span class="input-icon">
|
---|
161 | <input type="password" name="passwd" id="form-field-3" placeholder="Máºt khẩu">
|
---|
162 | <i class="icon-lock blue"></i>
|
---|
163 | </span>
|
---|
164 | </div>
|
---|
165 | <div class="help-block"> </div>
|
---|
166 | </div>
|
---|
167 | <div class="form-group">
|
---|
168 | <label class="col-sm-3 control-label no-padding-right" for="form-field-4"> Xác nháºn máºt khẩu </label>
|
---|
169 |
|
---|
170 | <div class="col-sm-9">
|
---|
171 | <span class="input-icon">
|
---|
172 | <input type="password" name="passwd2" id="form-field-4" placeholder="Nháºp lại máºt khẩu">
|
---|
173 | <i class="icon-lock blue"></i>
|
---|
174 | </span>
|
---|
175 | </div>
|
---|
176 | <div class="help-block"> </div>
|
---|
177 | </div>
|
---|
178 |
|
---|
179 | <div class="space-4"></div>
|
---|
180 | <div class="form-group errors" id="add_user">
|
---|
181 |
|
---|
182 | </div>
|
---|
183 | <div class="clearfix form-actions">
|
---|
184 | <div class="col-md-offset-3 col-md-9">
|
---|
185 | <button class="btn btn-info" id="add_user" type="button">
|
---|
186 | <i class="icon-ok bigger-110"></i>
|
---|
187 | Hoà n tất
|
---|
188 | </button>
|
---|
189 |
|
---|
190 |
|
---|
191 | <button class="btn" type="reset">
|
---|
192 | <i class="icon-undo bigger-110"></i>
|
---|
193 | Xóa hết
|
---|
194 | </button>
|
---|
195 | </div>
|
---|
196 | </div>
|
---|
197 |
|
---|
198 | </form></div>
|
---|
199 |
|
---|
200 | </div>
|
---|
201 | </div><!-- /.modal-content -->
|
---|
202 | </div><!-- /.modal-dialog -->
|
---|
203 |
|
---|
204 | <?php
|
---|
205 | $this->load->view('layout/admin/footer', array('base_url' => $base_url, 'adminjs' => array('assets/js/admin/user.js')));
|
---|
206 | ?> |
---|