|
@@ -54,6 +54,7 @@ var gagaInfiniteScroll = {
|
|
|
, filterHtml : ''
|
|
, filterHtml : ''
|
|
|
, filterStatHtml : ''
|
|
, filterStatHtml : ''
|
|
|
, totalCount : ''
|
|
, totalCount : ''
|
|
|
|
|
+ , backScroll : ''
|
|
|
},
|
|
},
|
|
|
obj : {
|
|
obj : {
|
|
|
$ajaxBoxOuter : $('#listBoxOuter')
|
|
$ajaxBoxOuter : $('#listBoxOuter')
|
|
@@ -105,6 +106,7 @@ var gagaInfiniteScroll = {
|
|
|
|
|
|
|
|
this.getDataList();
|
|
this.getDataList();
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ if( history.scrollRestoration ) window.history.scrollRestoration = 'manual';
|
|
|
this.pageStatus.loadPage = historyData.pageNum;
|
|
this.pageStatus.loadPage = historyData.pageNum;
|
|
|
this.pageStatus.pageNum[0] = historyData.pageNum;
|
|
this.pageStatus.pageNum[0] = historyData.pageNum;
|
|
|
this.pageStatus.historyScroll = historyData.dataIndex;
|
|
this.pageStatus.historyScroll = historyData.dataIndex;
|
|
@@ -114,6 +116,7 @@ var gagaInfiniteScroll = {
|
|
|
this.pageStatus.filterHtml = historyData.filterHtml;
|
|
this.pageStatus.filterHtml = historyData.filterHtml;
|
|
|
this.pageStatus.filterStatHtml = historyData.filterStatHtml;
|
|
this.pageStatus.filterStatHtml = historyData.filterStatHtml;
|
|
|
this.pageStatus.totalCount = historyData.totalCount;
|
|
this.pageStatus.totalCount = historyData.totalCount;
|
|
|
|
|
+ this.pageStatus.backScroll = historyData.backScroll;
|
|
|
|
|
|
|
|
gagaInfiniteScroll.draw(historyData.htm);
|
|
gagaInfiniteScroll.draw(historyData.htm);
|
|
|
};
|
|
};
|
|
@@ -151,7 +154,9 @@ var gagaInfiniteScroll = {
|
|
|
, $('#infiniteContainer').height()
|
|
, $('#infiniteContainer').height()
|
|
|
, gagaInfiniteScroll.pageStatus.loadPage
|
|
, gagaInfiniteScroll.pageStatus.loadPage
|
|
|
, 0
|
|
, 0
|
|
|
- , gagaInfiniteScroll.obj.$ajaxBox.html());
|
|
|
|
|
|
|
+ , gagaInfiniteScroll.obj.$ajaxBox.html()
|
|
|
|
|
+ , gagaInfiniteScroll.pageStatus.backScroll
|
|
|
|
|
+ );
|
|
|
if (scrollTop && containerHeight) {
|
|
if (scrollTop && containerHeight) {
|
|
|
gagaInfiniteScroll.obj.$window.scrollTop.scrollTop(0).scrollTop(scrollTop);
|
|
gagaInfiniteScroll.obj.$window.scrollTop.scrollTop(0).scrollTop(scrollTop);
|
|
|
} else {
|
|
} else {
|
|
@@ -173,7 +178,7 @@ var gagaInfiniteScroll = {
|
|
|
this.pageStatus.loadAlign = 'not';
|
|
this.pageStatus.loadAlign = 'not';
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- pushHistory : function(page, sScrollTop, sHeight, sPageNum, sDataIndex, sHtml) {
|
|
|
|
|
|
|
+ pushHistory : function(page, sScrollTop, sHeight, sPageNum, sDataIndex, sHtml, sBackScroll) {
|
|
|
var historyData = {
|
|
var historyData = {
|
|
|
state: page
|
|
state: page
|
|
|
, scroll: sScrollTop
|
|
, scroll: sScrollTop
|
|
@@ -188,6 +193,7 @@ var gagaInfiniteScroll = {
|
|
|
, filterHtml : gagaInfiniteScroll.pageStatus.filterHtml
|
|
, filterHtml : gagaInfiniteScroll.pageStatus.filterHtml
|
|
|
, filterStatHtml : gagaInfiniteScroll.pageStatus.filterStatHtml
|
|
, filterStatHtml : gagaInfiniteScroll.pageStatus.filterStatHtml
|
|
|
, totalCount : gagaInfiniteScroll.pageStatus.totalCount
|
|
, totalCount : gagaInfiniteScroll.pageStatus.totalCount
|
|
|
|
|
+ , backScroll : sBackScroll
|
|
|
};
|
|
};
|
|
|
historyData = JSON.stringify(historyData);
|
|
historyData = JSON.stringify(historyData);
|
|
|
sessionStorage.setItem(document.location.href, historyData);
|
|
sessionStorage.setItem(document.location.href, historyData);
|
|
@@ -212,6 +218,7 @@ var gagaInfiniteScroll = {
|
|
|
, filterHtml : gagaInfiniteScroll.pageStatus.filterHtml
|
|
, filterHtml : gagaInfiniteScroll.pageStatus.filterHtml
|
|
|
, filterStatHtml : gagaInfiniteScroll.pageStatus.filterStatHtml
|
|
, filterStatHtml : gagaInfiniteScroll.pageStatus.filterStatHtml
|
|
|
, totalCount : gagaInfiniteScroll.pageStatus.totalCount
|
|
, totalCount : gagaInfiniteScroll.pageStatus.totalCount
|
|
|
|
|
+ , backScroll : gagaInfiniteScroll.pageStatus.backScroll
|
|
|
};
|
|
};
|
|
|
historyData = JSON.stringify(historyData);
|
|
historyData = JSON.stringify(historyData);
|
|
|
sessionStorage.setItem(document.location.href, historyData);
|
|
sessionStorage.setItem(document.location.href, historyData);
|