瀏覽代碼

- Always display the number of elements (and the number of elements selected) when displaying a list.
- Nicer display of paginated lists

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1355 a333f486-631f-4898-b8df-5754b55c2be0

dflaven 14 年之前
父節點
當前提交
b168019dec
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      js/jquery.tablesorter.pager.js

+ 6 - 0
js/jquery.tablesorter.pager.js

@@ -276,6 +276,8 @@ function sprintf(format, etc) {
 				if (e > nb)
 				{
 					e = nb;
+					s = e - 5;
+					if (s < 0) s = 0;
 				}
 				txt = '';
 				for(var i=s; i<e; i++)
@@ -286,6 +288,10 @@ function sprintf(format, etc) {
 					{
 						link = ' <a href="#" class="no-arrow" page="'+i+'" id="gotopage_'+i+'">'+page+'</a> ';
 					}
+					else
+					{
+						link = ' <a href="#" class="no-arrow curr_page" page="'+i+'">'+page+'</a> ';
+					}
 					txt += link;
 				}
 				txt += '';