Changeset 371 for pro-violet-viettel/sourcecode/application
- Timestamp:
- Nov 3, 2014 9:51:10 AM (11 years ago)
- Location:
- pro-violet-viettel/sourcecode/application/modules/admin
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/admin/controllers/collaborator.php
r366 r371 29 29 $data['perpage'] = 10; 30 30 $data['keyword'] = ""; 31 31 $data['sorting_order']="sorting_desc"; 32 $data['sorting_field']="created_time"; 33 34 if ($this->input->post('sorting_order')) { 35 if ($this->input->post('sorting_order') != "sorting") 36 { 37 $data['sorting_order']=$this->input->post('sorting_order'); 38 $data['sorting_field']=$this->input->post('sorting_field'); 39 } 40 } 32 41 if ($this->input->post('items')) { 33 42 $data['perpage'] = $this->input->post('items'); -
pro-violet-viettel/sourcecode/application/modules/admin/models/collabolator_model.php
r366 r371 20 20 $sql.=" WHERE (full_name LIKE '%".$data['keyword']."%' OR login_name LIKE '%".$data['keyword']."%') "; 21 21 } 22 return $this->db->query($sql." ORDER BY id DESC LIMIT ".$data['start'].", ".$data['perpage']." ")->result_array(); 22 $order=""; 23 if ($data['sorting_order'] != "sorting") 24 { 25 if ($data['sorting_field'] != "money") 26 { 27 $sort="DESC"; 28 if ($data['sorting_order']=="sorting_asc") $sort = "ASC"; 29 $order="ORDER BY ".$data['sorting_field']." ".$sort; 30 } 31 } 32 33 return $this->db->query($sql." ".$order." LIMIT ".$data['start'].", ".$data['perpage']." ")->result_array(); 23 34 24 35 } -
pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/index.php
r366 r371 33 33 return false; 34 34 }); 35 36 37 $( '.sorting, .sorting_desc, .sorting_asc' ).click(function( index ) { 38 var current_class=$( this ).attr('class'); 39 $(".sorting_desc").attr("class","sorting"); 40 $(".sorting_asc").attr("class","sorting"); 41 42 if(current_class=='sorting') 43 { 44 $(this).attr("class","sorting_desc"); 45 } 46 else 47 { 48 if(current_class=='sorting_desc') 49 { 50 $(this).attr("class","sorting_asc"); 51 } 52 else 53 { 54 if(current_class=='sorting_asc') 55 { 56 $(this).attr("class","sorting"); 57 } 58 } 59 } 60 $("#sorting_field").val($(this).attr("id")); 61 $("#sorting_order").val($(this).attr("class")); 62 filter(); 63 }); 64 65 35 66 } 36 67 -
pro-violet-viettel/sourcecode/application/modules/admin/views/collaborator/listview.php
r359 r371 71 71 </div> 72 72 </div> 73 <input type="text" name="sorting_order" id="sorting_order" value="<?php echo $sorting_order;?>" /> 74 <input type="text" name="sorting_field" id="sorting_field" value="<?php echo $sorting_field;?>"/> 73 75 </form> 74 76 <table class="table table-striped table-bordered table-hover dataTable" id="sample-table-2" aria-describedby="sample-table-2_info"> … … 81 83 </label> 82 84 </th> 83 <th class=" sorting" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Sá» Äiá»n thoại: activate to sort column ascending">Sá» Äiá»n thoại</th>84 <th class=" sorting" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 183px;" aria-label="Há» tên: activate to sort column ascending">Há» tên</th>85 <th class=" hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 122px;" aria-label="Tiá»n: activate to sort column ascending">Tiá»n</th>86 <th class=" sorting" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 209px;" aria-label="Ngà y ÄÄng kÜ: activate to sort column ascending">85 <th class="<?php if ($sorting_field == 'cellphone') {echo $sorting_order;} else {echo "sorting";}?>" id="cellphone" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Sá» Äiá»n thoại: activate to sort column ascending">Sá» Äiá»n thoại</th> 86 <th class="<?php if ($sorting_field == 'full_name') {echo $sorting_order;} else {echo "sorting";}?>" id="full_name" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 183px;" aria-label="Há» tên: activate to sort column ascending">Há» tên</th> 87 <th class="sorting" id="money" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 122px;" aria-label="Tiá»n: activate to sort column ascending">Tiá»n</th> 88 <th class="<?php if ($sorting_field == 'created_time') {echo $sorting_order;} else {echo "sorting";}?>" id="created_time" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 209px;" aria-label="Ngà y ÄÄng kÜ: activate to sort column ascending"> 87 89 <i class="icon-time bigger-110 hidden-480"></i> 88 90 Ngà y ÄÄng kÜ 89 91 </th> 90 <th class=" hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 158px;" aria-label="Trạng thái: activate to sort column ascending">Trạng thái</th><th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 133px;" aria-label=""></th></tr>92 <th class="<?php if ($sorting_field=='activated') {echo $sorting_order;} else {echo "sorting";}?>" id="activated" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 158px;" aria-label="Trạng thái: activate to sort column ascending">Trạng thái</th><th class="sorting_disabled" role="columnheader" rowspan="1" colspan="1" style="width: 133px;" aria-label=""></th></tr> 91 93 </thead> 92 94
Note: See TracChangeset
for help on using the changeset viewer.