- bug fixed.
- the problem that paging
- now, it can point the page num exactly
- apply the section of jobs and images
Change-Id: I063d59a341caf7a1273ac6e15ea904abb3b9cc11
Signed-off-by: Heekyoung, Oh <heekyoung.oh@samsung.com>
this.maxPoint = 5;
this.itemsOnPage = 10;
- this.init(paramObj);
+ this.update(paramObj);
}
- JobPagingModel.prototype.init = function (obj) {
- logger.info('JobPagingModel.init : ' + JSON.stringify(obj));
+ JobPagingModel.prototype.update = function (obj) {
+ logger.info('JobPagingModel.update : ' + JSON.stringify(obj));
this.setTotalCount(obj.totalCount);
this.setCurrentPoint(obj.currentPageNum);
function _updatePagingModel(result) {
return new Promise(function (resolve, reject) {
- logger.info('_updatePagingModel');
-
// initialize
var totalCount = 0;
- $('#tic-image-list-pagination').empty();
+
+ logger.info('_updatePagingModel');
// set totalCount
totalCount = Number(result[0].total_count);
ModelImagePaging = new JobPagingModel({
totalCount: totalCount,
currentPageNum: pageNum
- })
+ });
+ } else {
+ ModelImagePaging.update({
+ totalCount: totalCount,
+ currentPageNum: pageNum
+ });
}
resolve(ModelImagePaging);
function _updatePagingModel(result) {
return new Promise(function (resolve, reject) {
- logger.info('_updatePagingModel');
-
// initialize
var totalCount = 0;
- $('#tic-job-list-pagination').empty();
+ logger.info('_updatePagingModel');
// set totalCount
totalCount = Number(result[0].total_count);
ModelJobPaging = new JobPagingModel({
totalCount: totalCount,
currentPageNum: pageNum
- })
+ });
+ } else {
+ ModelJobPaging.update({
+ totalCount: totalCount,
+ currentPageNum: pageNum
+ });
}
resolve(ModelJobPaging);