Forráskód Böngészése

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

boomEgg 5 éve
szülő
commit
454103290b
1 módosított fájl, 40 hozzáadás és 4 törlés
  1. 40 4
      o2web/source/x_component_Homepage/TaskContent.js

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

@@ -555,7 +555,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();
@@ -628,7 +635,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();
@@ -703,6 +717,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();
@@ -785,7 +807,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();
@@ -858,7 +887,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();