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