Ignore:
Timestamp:
Jan 9, 2015 10:35:30 AM (10 years ago)
Author:
namnd
Message:
 
Location:
pro-violet-viettel/sourcecode/application/modules/admin/views/user
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/admin/views/user/index.php

    r461 r690  
    1616                    $("#content").html(data);
    1717                    init_page();
     18                                        $('.daterangepicker').daterangepicker();
    1819                },
    1920                error: function (jqXHR, textStatus, errorThrown)
     
    2425            return false;
    2526        });
    26                 $('#keyword').bind('input', function(){
     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();
    2746                        filter();
    2847                });
     
    5978        function filter()
    6079        {
     80                daterange = $('input[name="daterange"]').val();
    6181                $.ajax({
    6282                        url: '<?php echo base_url();?>admin/nguoi_dung/trang/1',
     
    6585                        success: function (data, textStatus, jqXHR)
    6686                        {
     87                                $('#loading').css('display', 'none');
     88                                $('#table_content').show();
    6789                                $("#content").html(data);
    6890                                init_page();
    6991                                $("#keyword").focus();
    7092                                $("#keyword").setCursorToTextEnd();
    71 
     93                                $('.daterangepicker').daterangepicker();
     94                                $('input[name="daterange"]').val(daterange);
    7295                        },
    7396                        error: function (jqXHR, textStatus, errorThrown)
  • pro-violet-viettel/sourcecode/application/modules/admin/views/user/listview.php

    r644 r690  
    6666                                <div class="dataTables_filter" id="sample-table-2_filter">
    6767                                    <label>Tìm kiếm:
    68                                         <input type="text" name="keyword" id="keyword" value='<?php echo $keyword;?>' aria-controls="sample-table-2"></label>
     68                                        <input type="text" name="keyword" id="keyword" value='<?php echo $keyword;?>' style="width: 162px; height: 18px;" aria-controls="sample-table-2"></label>
    6969                                </div>
    7070                                                                <div class="dataTables_status" style="float: right;" id="sample-table-2_status"><label>Lọc:
    71                                                                         <select onchange="filter();" name="status" size="1" style="width: 139px; height: 28px;" aria-controls="sample-table-2" class="">                                     
     71                                                                        <select onchange="filter();" name="status" size="1" style="width: 176px; height: 28px;">                                     
    7272                                                                                <?php foreach ($statusoptions as $key=>$option):?>
    7373                                                                                <option <?php if ($key == $status) echo "selected"; ?> value="<?php echo $key; ?>"><?php echo $option; ?></option>
    7474                                                                                <?php endforeach; ?>
    7575                                                                        </select>
     76                                                                </div>
     77                                                                <div style="clear: both;"></div>
     78                                                                <div id="daterangepicker" class="selectbox pull-right">
     79                                                                        <i class="icon-calendar"></i>
     80                                                                        <input id="daterange" type="text" name="daterange" class="daterangepicker" style="background: #ffffff; width: 176px; height: 28px; position: inherit;">
     81                                                                               
     82                                                                        </span>
     83                                                                </div>
    7684                                                                </div>
    7785                            </div>
     
    8290                                                <input type="hidden" name="sorting_field" id="sorting_field" value="<?php echo $sorting_field;?>"/>
    8391                    </form>
     92                                        <!-- Table Content -->
     93                                        <center><div id="loading" style="display:none;"><img src="<?php echo base_url();?>/assets/img/loading.gif"/></div></center>
     94                                        <div id="table_content">
    8495                    <table class="table table-striped table-bordered table-hover dataTable" id="sample-table-2" aria-describedby="sample-table-2_info">
    8596                        <thead>
     
    91102                                    </label>
    92103                                </th>
    93                                                                 <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="Tài khoản: activate to sort column ascending">Username</th>
    94                                 <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>
    95                                 <th class="<?php if ($sorting_field == 'acc_balanced') {echo $sorting_order;} else {echo "sorting";}?>" id="acc_balanced" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;" aria-label="Tiền: activate to sort column ascending">Tài khoản (VNĐ)</th>
    96                                 <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: 150px;" aria-label="Ngày đăng kÜ: activate to sort column ascending">
     104                                                                <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: 156px;" aria-label="Tài khoản: activate to sort column ascending">Username</th>
     105                                <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: 156px;" aria-label="Số điện thoại: activate to sort column ascending">Số điện thoại</th>
     106                                <th class="<?php if ($sorting_field == 'acc_balanced') {echo $sorting_order;} else {echo "sorting";}?>" id="acc_balanced" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 156px;" aria-label="Tiền: activate to sort column ascending">Tài khoản (VNĐ)</th>
     107                                                                <th style="width: 140px;">Quận/Huyện</th>
     108                                                                <th style="width: 140px;">Tỉnh/TP</th>
     109                                <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: 156px;" aria-label="Ngày đăng kÜ: activate to sort column ascending">
    97110                                    <i class="icon-time bigger-110 hidden-480"></i>
    98111                                    Ngày đăng kÜ
    99112                                </th>
    100                                                                 <th class="<?php if ($sorting_field == 'expire_date') {echo $sorting_order;} else {echo "sorting";}?>" id="expire_date" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 150px;" aria-label="Ngày hết hạn: activate to sort column ascending">
     113                                                                <th class="<?php if ($sorting_field == 'expire_date') {echo $sorting_order;} else {echo "sorting";}?>" id="expire_date" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 140px;" aria-label="Ngày hết hạn: activate to sort column ascending">
    101114                                    <i class="icon-time bigger-110 hidden-480"></i>
    102115                                    Ngày hết hạn
    103116                                </th>
    104                                                                 <th class="sorting_disabled" id="status" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 176px;">Tình trạng</th>
     117                                                                <th class="sorting_disabled" id="status" role="columnheader" tabindex="0" aria-controls="sample-table-2" rowspan="1" colspan="1" style="width: 156px;">Tình trạng</th>
    105118                            </tr>
    106119                        </thead>
     
    119132                                </td>
    120133                                                                <td class=" ">
    121                                     <a onclick="getUserHistory(<?php echo $user['us_id']; ?>, 1);" data-toggle="modal"><?php echo @$user['username']; ?></a>
     134                                    <a onclick="getUserHistory(<?php echo $user['us_id']; ?>, 1);" data-toggle="modal"><?php echo $user['username']; ?></a>
    122135                                                                         <!--<a href="#user-history" data-toggle="modal"><?php echo @$user['username']; ?></a>-->
    123136                                </td>
     
    126139                                </td>
    127140                                <td class="hidden-480 "><?php echo number_format($user['acc_balanced'], 0); ?></td>
     141                                                                <td><?php echo $user['district']; ?></td>
     142                                                                <td><?php echo $user['province']; ?></td>
    128143                                <td class=" "><?php echo $user['created_time']; ?></td>
    129144                                                                <td class=" "><?php echo isset($user['expire_date']) && strtotime($user['expire_date'])>0 ? date('d/m/Y', strtotime($user['expire_date'])) : '';?></td>
     145
    130146                                                                <td class=" ">
    131147                                                                <?php  if(strtotime($user['expire_date'])>time()){ ?>
     
    151167                                                                </div>
    152168                                                        </div>
     169                                                </div>
    153170                                                </div>
    154171
     
    249266    }
    250267
    251 
    252268</script>
Note: See TracChangeset for help on using the changeset viewer.