Przeglądaj źródła

Merge branch 'fix/Homepage_paging' into 'develop'

修复分页bug(bug描述:如果没有待办的话,其它4个---已办、已阅、待阅、拟稿都没有分页)

See merge request o2oa/o2oa!483
胡起 5 lat temu
rodzic
commit
860dec7e4c
1 zmienionych plików z 40 dodań i 4 usunięć
  1. 40 4
      o2web/source/x_component_Homepage/TaskContent.js

+ 40 - 4
o2web/source/x_component_Homepage/TaskContent.js

@@ -554,7 +554,14 @@ MWF.xApplication.Homepage.TaskContent.TaskCompleted = new Class({
         return row;
         return row;
     },
     },
 
 
-
+    checkLoadPage: function(){
+        if (this.content.itemCounts && this.content.itemCounts.taskCompleted){
+            this.getPageCount();
+            this.loadPage();
+        }else{
+            this.addLoadPageEvent();
+        }
+    },
     addLoadPageEvent: function(){
     addLoadPageEvent: function(){
         var loadPage = function(){
         var loadPage = function(){
             this.getPageCount();
             this.getPageCount();
@@ -627,7 +634,14 @@ MWF.xApplication.Homepage.TaskContent.Read = new Class({
 
 
         return row;
         return row;
     },
     },
-
+    checkLoadPage: function(){
+        if (this.content.itemCounts && this.content.itemCounts.read){
+            this.getPageCount();
+            this.loadPage();
+        }else{
+            this.addLoadPageEvent();
+        }
+    },
     addLoadPageEvent: function(){
     addLoadPageEvent: function(){
         var loadPage = function(){
         var loadPage = function(){
             this.getPageCount();
             this.getPageCount();
@@ -702,6 +716,14 @@ MWF.xApplication.Homepage.TaskContent.ReadCompleted = new Class({
 
 
         return row;
         return row;
     },
     },
+    checkLoadPage: function(){
+        if (this.content.itemCounts && this.content.itemCounts.readCompleted){
+            this.getPageCount();
+            this.loadPage();
+        }else{
+            this.addLoadPageEvent();
+        }
+    },
     addLoadPageEvent: function(){
     addLoadPageEvent: function(){
         var loadPage = function(){
         var loadPage = function(){
             this.getPageCount();
             this.getPageCount();
@@ -784,7 +806,14 @@ MWF.xApplication.Homepage.TaskContent.Draft = new Class({
 
 
         return row;
         return row;
     },
     },
-
+    checkLoadPage: function(){
+        if (this.content.itemCounts && this.content.itemCounts.draft){
+            this.getPageCount();
+            this.loadPage();
+        }else{
+            this.addLoadPageEvent();
+        }
+    },
     addLoadPageEvent: function(){
     addLoadPageEvent: function(){
         var loadPage = function(){
         var loadPage = function(){
             this.getPageCount();
             this.getPageCount();
@@ -857,7 +886,14 @@ MWF.xApplication.Homepage.TaskContent.ProcessDraft = new Class({
 
 
         return row;
         return row;
     },
     },
-
+    checkLoadPage: function(){
+        if (this.content.itemCounts && this.content.itemCounts.processDraft){
+            this.getPageCount();
+            this.loadPage();
+        }else{
+            this.addLoadPageEvent();
+        }
+    },
     addLoadPageEvent: function(){
     addLoadPageEvent: function(){
         var loadPage = function(){
         var loadPage = function(){
             this.getPageCount();
             this.getPageCount();