Explorar el Código

修复打开日常安排的时候会重复执行myCalendar的问题

unknown hace 5 años
padre
commit
b2b772bd77

+ 23 - 15
o2web/source/x_component_Calendar/Main.js

@@ -30,6 +30,7 @@ MWF.xApplication.Calendar.Main = new Class({
         //if (!this.personActions) this.personActions = MWF.Actions.get("x_organization_assemble_express");
     },
     loadApplication: function(callback) {
+        this.canlendarData = null;
         MWF.UD.getDataJson("calendarConfig", function(json){
             this.calendarConfig = json || {};
 
@@ -68,17 +69,22 @@ MWF.xApplication.Calendar.Main = new Class({
         }.bind(this));
     },
     listCalendar : function( callback ){
-        this.actions.listMyCalendar( function( json ){
-            if( ( json.data.myCalendars || [] ).length == 0 ){
-               this.createDefaultCalendar(function(){
-                       if(callback)callback()
-                   });
-            }else{
-                this.calendarDataList = json.data.myCalendars;
-                this.currentCalendarData = json.data.myCalendars[0];
-                if(callback)callback()
-            }
-        }.bind(this))
+        if( this.canlendarData ){
+            if(callback)callback( this.canlendarData )
+        }else{
+            this.actions.listMyCalendar( function( json ){
+                if( ( json.data.myCalendars || [] ).length == 0 ){
+                    this.createDefaultCalendar(function(){
+                        if(callback)callback( json.data )
+                    });
+                }else{
+                    this.canlendarData = json.data;
+                    this.calendarDataList = json.data.myCalendars;
+                    this.currentCalendarData = json.data.myCalendars[0];
+                    if(callback)callback( json.data )
+                }
+            }.bind(this))
+        }
     },
     getSelectedCalendarId : function(){
         if( this.leftNavi ){
@@ -101,6 +107,7 @@ MWF.xApplication.Calendar.Main = new Class({
           this.actions.listMyCalendar( function( json ){
               if( ( json.data.myCalendars || [] ).length == 0 ){
               }else{
+                  this.canlendarData = json.data;
                   this.calendarDataList = json.data.myCalendars;
                   this.currentCalendarData = json.data.myCalendars[0];
                   if(callback)callback()
@@ -652,10 +659,11 @@ MWF.xApplication.Calendar.Navi = new Class({
         this.unitCalendarNaviItem = [];
         this.followCalendarNaviItem = [];
 
-        this.app.actions.listMyCalendar( function( json ){
-            this.myCalendars =json.data.myCalendars;
-            this.unitCalendars =json.data.unitCalendars;
-            this.followCalendars =json.data.followCalendars;
+        this.app.listCalendar( function( data ){
+            this.myCalendars = data.myCalendars;
+            this.unitCalendars = data.unitCalendars;
+            this.followCalendars = data.followCalendars;
+            this.app.canlendarData = null;
             this.loadNode();
         }.bind(this));
 

+ 5 - 30
o2web/source/x_component_process_Work/$Processor/mobile/css.wcss

@@ -77,7 +77,7 @@
     },
     "routeOpinionArea": {
         "height": "129px",
-        "border-bottom": "0px solid #6681a5",
+        "border-bottom": "0px solid #6681a5"
     },
 
     "inputOpinionNode": {
@@ -130,7 +130,7 @@
         "height": "3em",
         "width": "3em",
         "float": "left",
-        "background": "url("+"../x_component_process_Work/$Processor/default/ok-18.png) no-repeat center center",
+        "background": "url(../x_component_process_Work/$Processor/default/ok-18.png) no-repeat center center"
     },
     "okTextNode": {
         "font-size": "1em",
@@ -153,7 +153,7 @@
         "height": "3em",
         "width": "3em",
         "float": "left",
-        "background": "url("+"../x_component_process_Work/$Processor/default/cancel-18.png) no-repeat center center",
+        "background": "url(../x_component_process_Work/$Processor/default/cancel-18.png) no-repeat center center"
     },
     "cancelTextNode": {
         "font-size": "1em",
@@ -190,7 +190,7 @@
         "padding-left": "24px",
         "padding-right": "5px",
         "margin-left": "5px",
-        "background": "url("+"../x_component_process_Work/$Processor/default/write.png) no-repeat 5px center"
+        "background": "url(../x_component_process_Work/$Processor/default/write.png) no-repeat 5px center"
     },
     "handwritingNode": {
         "position": "absolute",
@@ -219,7 +219,7 @@
         "padding-left": "24px",
         "padding-right": "5px",
         "margin-left": "5px",
-        "background": "url("+"../x_component_process_Work/$Processor/default/audioRecord.png) no-repeat 5px center"
+        "background": "url(../x_component_process_Work/$Processor/default/audioRecord.png) no-repeat 5px center"
     },
     "orgsTitle": {
         "overflow": "hidden",
@@ -244,34 +244,11 @@
         "border-left": "5px solid #ffffff"
     },
 
-    //    "selectIdeaNode": {
-    //        "background-color": "#eee",
-    //        "max-height": "200px",
-    //        "clear": "both",
-    //        "overflow": "hidden"
-    //    },
-    //    "selectIdeaScrollNode": {
-    //        "max-height": "200px",
-    //        "overflow": "auto"
-    //    },
-    //    "selectIdeaItemNode": {
-    //        "line-height": "18px",
-    //        "font-size": "14px",
-    //        "cursor": "pointer",
-    //        "background-color": "#FFF",
-    //        "padding": "4px 4px 4px 4px",
-    //        "overflow": "hidden"
-    //    },
-    //    "selectIdeaItemNode_over": {
-    //        "background-color": "#e6ecf8"
-    //    },
-
     "selectorTitle": {
         "padding": "0px 4px",
         "height": "30px",
         "line-height": "30px",
         "font-size": "14px",
-        //        "font-weight": "bold",
         "color": "#000",
         "cursor" : "pointer",
         "background": "url(../x_component_process_Work/$Processor/mobile/arrow_right2.png) no-repeat right 10px center",
@@ -281,10 +258,8 @@
         "background-color": "#e6ecf8"
     },
     "selectorTitleText": {
-//        "float": "left"
     },
     "selectorErrorNode" : {
-        //"float" : "right",
         "background-color" : "#fff",
         "margin-right" : "5px",
         "font-weight" : "normal"