Ignore:
Timestamp:
May 27, 2010, 9:40:17 PM (10 years ago)
Author:
Eric
Message:

[NBC_UserAdvManager]

  • Bug 1310 improved: Sorting work for multiple pages table.
  • Adding tips on table sorting in languages help files.
Location:
extensions/NBC_UserAdvManager/trunk/admin
Files:
5 added
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/NBC_UserAdvManager/trunk/admin/UAM_admin.php

    r6354 r6399  
    492492// |                           Template Init                               |
    493493// +-----------------------------------------------------------------------+
    494                 $base_url = PHPWG_ROOT_PATH.'admin.php?page=user_list';
     494                /*$base_url = PHPWG_ROOT_PATH.'admin.php?page=user_list';
    495495
    496496    if (isset($_GET['start']) and is_numeric($_GET['start']))
     
    501501    {
    502502      $start = 0;
    503     }
     503    }*/
    504504
    505505// +-----------------------------------------------------------------------+
     
    507507// +-----------------------------------------------------------------------+
    508508
    509 $url = PHPWG_ROOT_PATH.'admin.php'.get_query_string_diff(array('start'));
     509/*$url = PHPWG_ROOT_PATH.'admin.php'.get_query_string_diff(array('start'));
    510510
    511511$navbar = create_navigation_bar(
     
    516516  );
    517517
    518 $template->assign('navbar', $navbar);
     518$template->assign('navbar', $navbar);*/
    519519
    520520// +-----------------------------------------------------------------------+
     
    525525    foreach ($page['filtered_users'] as $num => $local_user)
    526526    {
    527 /* simulate LIMIT $start, $conf['users_page'] */
    528                         if ($num < $start)
     527// simulate LIMIT $start, $conf['users_page']
     528                        /*if ($num < $start)
    529529      {
    530530        continue;
     
    533533      {
    534534        break;
    535       }
     535      }*/
    536536
    537537      $visible_user_list[] = $local_user;
     
    10061006// |                           Template Init                               |
    10071007// +-----------------------------------------------------------------------+
    1008                 $base_url = PHPWG_ROOT_PATH.'admin.php?page=user_list';
     1008                /*$base_url = PHPWG_ROOT_PATH.'admin.php?page=user_list';
    10091009
    10101010    if (isset($_GET['start']) and is_numeric($_GET['start']))
     
    10151015    {
    10161016      $start = 0;
    1017     }
     1017    }*/
    10181018
    10191019/* Hide radio-button if not allow to assign adviser */
     
    10271027// +-----------------------------------------------------------------------+
    10281028
    1029 $url = PHPWG_ROOT_PATH.'admin.php'.get_query_string_diff(array('start'));
     1029/*$url = PHPWG_ROOT_PATH.'admin.php'.get_query_string_diff(array('start'));
    10301030
    10311031$navbar = create_navigation_bar(
     
    10361036  );
    10371037
    1038 $template->assign('navbar', $navbar);
     1038$template->assign('navbar', $navbar);*/
    10391039
    10401040// +-----------------------------------------------------------------------+
     
    10491049    {
    10501050/* simulate LIMIT $start, $conf['users_page'] */
    1051                         if ($num < $start)
     1051                        /*if ($num < $start)
    10521052      {
    10531053        continue;
     
    10561056      {
    10571057        break;
    1058       }
     1058      }*/
    10591059
    10601060      $visible_user_list[] = $local_user;
     
    14401440// |                           Template Init                               |
    14411441// +-----------------------------------------------------------------------+
    1442                 $base_url = PHPWG_ROOT_PATH.'admin.php?page=user_list';
     1442                /*$base_url = PHPWG_ROOT_PATH.'admin.php?page=user_list';
    14431443
    14441444    if (isset($_GET['start']) and is_numeric($_GET['start']))
     
    14491449    {
    14501450      $start = 0;
    1451     }
     1451    }*/
    14521452
    14531453/* Hide radio-button if not allow to assign adviser */
     
    14611461// +-----------------------------------------------------------------------+
    14621462
    1463 $url = PHPWG_ROOT_PATH.'admin.php'.get_query_string_diff(array('start'));
     1463/*$url = PHPWG_ROOT_PATH.'admin.php'.get_query_string_diff(array('start'));
    14641464
    14651465$navbar = create_navigation_bar(
     
    14701470  );
    14711471
    1472 $template->assign('navbar', $navbar);
     1472$template->assign('navbar', $navbar);*/
    14731473
    14741474// +-----------------------------------------------------------------------+
     
    14801480    {
    14811481/* simulate LIMIT $start, $conf['users_page'] */
    1482                         if ($num < $start)
     1482                        /*if ($num < $start)
    14831483      {
    14841484        continue;
     
    14871487      {
    14881488        break;
    1489       }
     1489      }*/
    14901490
    14911491      $visible_user_list[] = $local_user;
  • extensions/NBC_UserAdvManager/trunk/admin/template/ghosttracker.tpl

    r6378 r6399  
    22{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.packed.js"}
    33{known_script id="jquery.tablesorter" src=$UAM_PATH|@cat:"admin/template/js/jquery.tablesorter.js"}
     4{known_script id="jquery.tablesorter.pager" src=$UAM_PATH|@cat:"admin/template/js/jquery.tablesorter.pager.js"}
    45
    56{html_head}<link rel="stylesheet" type="text/css" href="{$UAM_PATH}admin/template/uam.css">{/html_head}
     
    1718$(document).ready(function()
    1819    {ldelim}
    19       // extend the default setting to always sort on the fourth column
    20       $.tablesorter.defaults.sortList = [[3,0]];
    21       // sorting
    22       $("#sorting").tablesorter();
     20      $("#sorting")
     21      .tablesorter({ldelim}sortList:[[3,1]], headers: {ldelim} 0: {ldelim} sorter: false {rdelim}{rdelim}{rdelim})
     22      .tablesorterPager({ldelim}container: $("#pager"), positionFixed: false, size: 20, totalPages: 0{rdelim});
    2323    {rdelim}
    2424);
     
    4242  <fieldset>
    4343    <legend class="cluetip" title="{'UAM_gtTitle'|translate}|{'UAM_gtTitle_d'|translate}">{'GhostTracker_Title'|@translate}</legend>
    44       {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
    4544        <table id="sorting" class="table2" width="97%" summary="">
    4645          <thead>
     
    7372        </tbody>
    7473        </table>
    75 
    76         {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
     74<div id="pager" class="pager">
     75        <form>
     76                <img src="{$UAM_PATH}admin/template/icon/first.png" class="first">
     77                <img src="{$UAM_PATH}admin/template/icon/prev.png" class="prev">
     78                <input type="text" class="pagedisplay">
     79                <img src="{$UAM_PATH}admin/template/icon/next.png" class="next">
     80                <img src="{$UAM_PATH}admin/template/icon/last.png" class="last">
     81                <select class="pagesize">
     82                        <option  value="10">10</option>
     83                        <option selected="selected" value="20">20</option>
     84                        <option value="30">30</option>
     85                        <option value="40">40</option>
     86                </select>
     87        </form>
     88</div>
    7789        <br>
    78          
    7990<p>
    8091  {'target'|@translate}
  • extensions/NBC_UserAdvManager/trunk/admin/template/uam.css

    r6378 r6399  
    8484background-image:url("./icon/asc.png");
    8585}
     86
     87.pager{
     88  text-align:center;
     89}
  • extensions/NBC_UserAdvManager/trunk/admin/template/userlist.tpl

    r6378 r6399  
    22{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.packed.js"}
    33{known_script id="jquery.tablesorter" src=$UAM_PATH|@cat:"admin/template/js/jquery.tablesorter.js"}
     4{known_script id="jquery.tablesorter.pager" src=$UAM_PATH|@cat:"admin/template/js/jquery.tablesorter.pager.js"}
     5
    46
    57{html_head}<link rel="stylesheet" type="text/css" href="{$UAM_PATH}admin/template/uam.css">{/html_head}
     
    1618
    1719$(document).ready(function()
    18     {ldelim}
    19       // extend the default setting to always sort on the fourth column
    20       $.tablesorter.defaults.sortList = [[3,0]];
    21       // sorting
    22       $("#sorting").tablesorter();
     20    {ldelim}
     21      $("#sorting")
     22      .tablesorter({ldelim}sortList:[[3,0]]{rdelim})
     23      .tablesorterPager({ldelim}container: $("#pager"), positionFixed: false, size: 20, totalPages: 0{rdelim});
    2324    {rdelim}
    2425);
     
    3435        <legend class="cluetip" title="{'UAM_userlistTitle'|translate}|{'UAM_userlistTitle_d'|translate}">{'UserList_Title'|@translate}</legend>
    3536
    36     {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
    3737      <table id="sorting" class="table2" width="97%" summary="">
    3838                        <thead>
     
    6666        </tbody>
    6767      </table>
    68 
    69       {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
     68<div id="pager" class="pager">
     69        <form>
     70                <img src="{$UAM_PATH}admin/template/icon/first.png" class="first">
     71                <img src="{$UAM_PATH}admin/template/icon/prev.png" class="prev">
     72                <input type="text" class="pagedisplay">
     73                <img src="{$UAM_PATH}admin/template/icon/next.png" class="next">
     74                <img src="{$UAM_PATH}admin/template/icon/last.png" class="last">
     75                <select class="pagesize">
     76                        <option  value="10">10</option>
     77                        <option selected="selected" value="20">20</option>
     78                        <option value="30">30</option>
     79                        <option value="40">40</option>
     80                </select>
     81        </form>
     82</div>
    7083        <br>
    7184  </fieldset>
  • extensions/NBC_UserAdvManager/trunk/admin/template/usermanager.tpl

    r6378 r6399  
    22{known_script id="jquery.cluetip" src=$ROOT_URL|@cat:"themes/default/js/plugins/jquery.cluetip.packed.js"}
    33{known_script id="jquery.tablesorter" src=$UAM_PATH|@cat:"admin/template/js/jquery.tablesorter.js"}
     4{known_script id="jquery.tablesorter.pager" src=$UAM_PATH|@cat:"admin/template/js/jquery.tablesorter.pager.js"}
    45
    56{html_head}<link rel="stylesheet" type="text/css" href="{$UAM_PATH}admin/template/uam.css">{/html_head}
     
    1718$(document).ready(function()
    1819    {ldelim}
    19       // extend the default setting to always sort on the fourth column
    20       $.tablesorter.defaults.sortList = [[3,0]];
    21       // sorting
    22       $("#sorting").tablesorter();
     20      $("#sorting")
     21      .tablesorter({ldelim}sortList:[[5,1]], headers: {ldelim} 0: {ldelim} sorter: false {rdelim}{rdelim}{rdelim})
     22      .tablesorterPager({ldelim}container: $("#pager"), positionFixed: false, size: 20, totalPages: 0{rdelim});
    2323    {rdelim}
    2424);
     
    3232  <fieldset>
    3333        <legend class="cluetip" title="{'UAM_usermanTitle'|translate}|{'UAM_usermanTitle_d'|translate}">{'UserManager_Title'|@translate}</legend>
    34 
    35     {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
    3634      <table id="sorting" class="table2" width="97%" summary="">
    3735                  <thead>
    3836                        <tr class="throw">
    3937                        <th>&nbsp;</td>
    40                         <th>&nbsp;{'Username'|@translate}&nbsp;</th>
    41                         <th>&nbsp;{'User status'|@translate}&nbsp;</th>
    42                         <th>&nbsp;{'Email address'|@translate}&nbsp;</th>
    43                         <th>&nbsp;{'Groups'|@translate}&nbsp;</th>
    44                         <th>&nbsp;{'Registration_Date'|@translate}&nbsp;</th>
    45             <th>&nbsp;{'Reminder'|@translate}&nbsp;</th>
     38                        <th>&nbsp;{'Username'|@translate}&nbsp;&nbsp;</th>
     39                        <th>&nbsp;{'User status'|@translate}&nbsp;&nbsp;</th>
     40                        <th>&nbsp;{'Email address'|@translate}&nbsp;&nbsp;</th>
     41                        <th>&nbsp;{'Groups'|@translate}&nbsp;&nbsp;</th>
     42                        <th>&nbsp;{'Registration_Date'|@translate}&nbsp;&nbsp;</th>
     43            <th>&nbsp;{'Reminder'|@translate}&nbsp;&nbsp;</th>
    4644                        </tr>
    4745                        </thead>
     
    6361      </tbody>
    6462      </table>
    65 
    66       {if !empty($navbar) }{include file='navigation_bar.tpl'|@get_extent:'navbar'}{/if}
     63{if !empty($users)}
     64<div id="pager" class="pager">
     65        <form>
     66                <img src="{$UAM_PATH}admin/template/icon/first.png" class="first">
     67                <img src="{$UAM_PATH}admin/template/icon/prev.png" class="prev">
     68                <input type="text" class="pagedisplay">
     69                <img src="{$UAM_PATH}admin/template/icon/next.png" class="next">
     70                <img src="{$UAM_PATH}admin/template/icon/last.png" class="last">
     71                <select class="pagesize">
     72                        <option  value="10">10</option>
     73                        <option selected="selected" value="20">20</option>
     74                        <option value="30">30</option>
     75                        <option value="40">40</option>
     76                </select>
     77        </form>
     78</div>
     79{/if}
    6780        <br>
    6881
Note: See TracChangeset for help on using the changeset viewer.