...
|
...
|
@@ -39,7 +39,9 @@ var grid = function(options) { |
|
|
pagesizes:pagesizes,
|
|
|
usepagesize:false,
|
|
|
showtotalsize:false,
|
|
|
page: 1
|
|
|
page: 1,
|
|
|
// add by xuhongyun: 翻页标识,用于刷新整个table
|
|
|
isPageSelected: false
|
|
|
};
|
|
|
this.options = $.extend({}, defaults, options);
|
|
|
this.response={};
|
...
|
...
|
@@ -180,6 +182,9 @@ grid.prototype = { |
|
|
ellipsePageSet: false,
|
|
|
onPageClick: function(pageNumber, event) {
|
|
|
p.page = pageNumber;
|
|
|
|
|
|
// add by xuhongyun: 设置本次刷新是由翻页导致的
|
|
|
p.isPageSelected = true;
|
|
|
g.renderBody();
|
|
|
return false;
|
|
|
}
|
...
|
...
|
@@ -305,10 +310,13 @@ grid.prototype = { |
|
|
p = this.options;
|
|
|
g.tbody.html("");
|
|
|
|
|
|
// // add by xuhongyun: 滚动到页面上方
|
|
|
// $("body,html").animate({
|
|
|
// scrollTop: 0
|
|
|
// },0)
|
|
|
// add by xuhongyun: 翻页时, 回滚到页面上方
|
|
|
if (p.isPageSelected == true) {
|
|
|
$("body,html").animate({
|
|
|
scrollTop: 0
|
|
|
},0);
|
|
|
p.isPageSelected = false;
|
|
|
}
|
|
|
|
|
|
if (!rows) {
|
|
|
return "";
|
...
|
...
|
|