Browse Source

Merge branch 'wrdp' into 'develop'

Wrdp

See merge request o2oa/o2oa!1813
胡起 5 years ago
parent
commit
94bf04827b

+ 3 - 2
o2web/source/x_component_Homepage/FileContent.js

@@ -127,8 +127,9 @@ MWF.xApplication.Homepage.FileContent.File = new Class({
         //this.itemContentNode.addClass("o2_homepage_task_area_content_empty").addClass("icon_notask");
         this.content.noItemNode = new Element("div.o2_homepage_file_area_content_empty_node", {"text": this.app.lp.noFile}).inject(this.container);
         this.content.noItemNode.addEvent("click", function(e){
-            layout.openApplication(e, "File");
-        });
+            // layout.openApplication(e, "File");
+            this.content.openFile(e);
+        }.bind(this));
         var m = (this.content.contentHeight- this.content.noItemNode.getSize().y)/2;
         this.content.noItemNode.setStyle("margin-top", ""+m+"px");
         this.content.isLoading = false;

+ 2 - 2
o2web/source/x_component_Org/$Explorer.js

@@ -440,8 +440,8 @@ MWF.xApplication.Org.$Explorer = new Class({
             }
             this.deleteElementsNode.position({
                 relativeTo: (item) ? item.node : this.toolbarNode,
-                position: "centerBottom",
-                edge: "centerTop"
+                position: "topRight",
+                edge: "topLeft"
             });
         }else{
             if (this.deleteElementsNode){

+ 2 - 1
o2web/source/x_component_Selector/Person.js

@@ -1471,7 +1471,8 @@ MWF.xApplication.Selector.Person = new Class({
                     if( !category.subItems[0].isSelected )category.subItems[0].clickItem();
                 }
             }else if(category.subCategorys.length === 1){
-                if( !category.subCategorys[0]._hasChild || !category.subCategorys[0]._hasChild() ){ //category.subCategorys[0].isItem &&
+                if( category.subItems && category.subItems.length > 0 ){
+                }else if( !category.subCategorys[0]._hasChild || !category.subCategorys[0]._hasChild() ){ //category.subCategorys[0].isItem &&
                     if( !category.subItems[0].isSelected )category.subItems[0].clickItem();
                 }else{
                     checkCategory( category.subCategorys[0] )

+ 7 - 0
o2web/source/x_component_cms_FormDesigner/Module/Authorfield/authorfield.html

@@ -27,6 +27,13 @@
                     <input type="radio" name="isReadonly" value="false" text{(!$.isReadonly)?'checked':''}/>否
                 </td>
             </tr>
+            <tr>
+                <td class="editTableTitle">显示卡片:</td>
+                <td class="editTableValue">
+                    <input type="radio" name="showCard" value="yes" text{($.showCard!='no')?'checked':''}/>是
+                    <input type="radio" name="showCard" value="no" text{($.showCard=='no')?'checked':''}/>否
+                </td>
+            </tr>
             <tr>
                 <td class="editTableTitle">值类型:</td>
                 <td class="editTableValue">

+ 7 - 0
o2web/source/x_component_cms_FormDesigner/Module/Personfield/personfield.html

@@ -27,6 +27,13 @@
                     <input type="radio" name="isReadonly" value="false" text{(!$.isReadonly)?'checked':''}/>否
                 </td>
             </tr>
+            <tr>
+                <td class="editTableTitle">显示卡片:</td>
+                <td class="editTableValue">
+                    <input type="radio" name="showCard" value="yes" text{($.showCard!='no')?'checked':''}/>是
+                    <input type="radio" name="showCard" value="no" text{($.showCard=='no')?'checked':''}/>否
+                </td>
+            </tr>
             <tr>
                 <td class="editTableTitle">允许输入:</td>
                 <td class="editTableValue">

+ 7 - 0
o2web/source/x_component_cms_FormDesigner/Module/Readerfield/readerfield.html

@@ -27,6 +27,13 @@
                     <input type="radio" name="isReadonly" value="false" text{(!$.isReadonly)?'checked':''}/>否
                 </td>
             </tr>
+            <tr>
+                <td class="editTableTitle">显示卡片:</td>
+                <td class="editTableValue">
+                    <input type="radio" name="showCard" value="yes" text{($.showCard!='no')?'checked':''}/>是
+                    <input type="radio" name="showCard" value="no" text{($.showCard=='no')?'checked':''}/>否
+                </td>
+            </tr>
             <tr>
                 <td class="editTableTitle">值类型:</td>
                 <td class="editTableValue">

+ 3 - 1
o2web/source/x_component_cms_Xform/Readerfield.js

@@ -466,7 +466,9 @@ MWF.xApplication.cms.Xform.Readerfield = MWF.CMSReaderfield =  new Class({
         }
 	},
 	loadOrgWidget: function(value, node){
-		var options = {"style": "xform", "canRemove":!this.readonly , "onRemove" : this.removeItem};
+        var disableInfor = layout.mobile ? true : false;
+        if( this.json.showCard === "no" )disableInfor = true;
+		var options = {"style": "xform", "canRemove":!this.readonly , "onRemove" : this.removeItem, "disableInfor" : disableInfor};
 		value.each(function(data){
 			if( data.distinguishedName ){
 				var flag = data.distinguishedName.substr(data.distinguishedName.length-1, 1);

+ 7 - 0
o2web/source/x_component_portal_PageDesigner/Module/Org/org.html

@@ -27,6 +27,13 @@
                     <input type="radio" name="isReadonly" value="false" text{(!$.isReadonly)?'checked':''}/>否
                 </td>
             </tr>
+            <tr>
+                <td class="editTableTitle">显示卡片:</td>
+                <td class="editTableValue">
+                    <input type="radio" name="showCard" value="yes" text{($.showCard!='no')?'checked':''}/>是
+                    <input type="radio" name="showCard" value="no" text{($.showCard=='no')?'checked':''}/>否
+                </td>
+            </tr>
             <tr>
                 <td class="editTableTitle">允许输入:</td>
                 <td class="editTableValue">

+ 7 - 0
o2web/source/x_component_process_FormDesigner/Module/Org/org.html

@@ -27,6 +27,13 @@
                     <input type="radio" name="isReadonly" value="false" text{(!$.isReadonly)?'checked':''}/>否
                 </td>
             </tr>
+            <tr>
+                <td class="editTableTitle">显示卡片:</td>
+                <td class="editTableValue">
+                    <input type="radio" name="showCard" value="yes" text{($.showCard!='no')?'checked':''}/>是
+                    <input type="radio" name="showCard" value="no" text{($.showCard=='no')?'checked':''}/>否
+                </td>
+            </tr>
             <tr>
                 <td class="editTableTitle">允许输入:</td>
                 <td class="editTableValue">

+ 7 - 0
o2web/source/x_component_process_FormDesigner/Module/Orgfield/orgfield.html

@@ -27,6 +27,13 @@
                     <input type="radio" name="isReadonly" value="false" text{(!$.isReadonly)?'checked':''}/>否
                 </td>
             </tr>
+            <tr>
+                <td class="editTableTitle">显示卡片:</td>
+                <td class="editTableValue">
+                    <input type="radio" name="showCard" value="yes" text{($.showCard!='no')?'checked':''}/>是
+                    <input type="radio" name="showCard" value="no" text{($.showCard=='no')?'checked':''}/>否
+                </td>
+            </tr>
             <tr>
                 <td class="editTableTitle">允许输入:</td>
                 <td class="editTableValue">

+ 7 - 0
o2web/source/x_component_process_FormDesigner/Module/Personfield/personfield.html

@@ -27,6 +27,13 @@
                     <input type="radio" name="isReadonly" value="false" text{(!$.isReadonly)?'checked':''}/>否
                 </td>
             </tr>
+            <tr>
+                <td class="editTableTitle">显示卡片:</td>
+                <td class="editTableValue">
+                    <input type="radio" name="showCard" value="yes" text{($.showCard!='no')?'checked':''}/>是
+                    <input type="radio" name="showCard" value="no" text{($.showCard=='no')?'checked':''}/>否
+                </td>
+            </tr>
             <tr>
                 <td class="editTableTitle">允许输入:</td>
                 <td class="editTableValue">

+ 6 - 0
o2web/source/x_component_process_Xform/Attachment.js

@@ -701,6 +701,7 @@ MWF.xApplication.process.Xform.AttachmentController = new Class({
         }
     },
     setAttachmentConfig: function (readInput, editInput, controllerInput) {
+        debugger;
         if (this.selectedAttachments.length) {
             var readList = readInput.retrieve("data-value");
             var editList = editInput.retrieve("data-value");
@@ -741,6 +742,7 @@ MWF.xApplication.process.Xform.AttachmentController = new Class({
                 });
             }
 
+            var loadedCount = 0;
             this.selectedAttachments.each(function (att) {
                 att.data.readUnitList = readUnitList;
                 att.data.readIdentityList = readIdentityList;
@@ -765,6 +767,10 @@ MWF.xApplication.process.Xform.AttachmentController = new Class({
                                 attachment.configAction.setStyle("display","none");
                             }
                         }
+                        loadedCount++;
+                        if( loadedCount === this.selectedAttachments.length ){
+                            this.checkActions();
+                        }
                     }.bind(this))
                 }.bind(this));
             }.bind(this));

+ 1 - 0
o2web/source/x_component_process_Xform/Org.js

@@ -951,6 +951,7 @@ MWF.xApplication.process.Xform.Org = MWF.APPOrg =  new Class({
     },
     loadOrgWidget: function(value, node){
         var disableInfor = layout.mobile ? true : false;
+        if( this.json.showCard === "no" )disableInfor = true;
         var height = node.getStyle("height").toInt();
         if (node.getStyle("overflow")==="visible" && !height) node.setStyle("overflow", "hidden");
         if (value && value.length){

+ 1 - 0
o2web/source/x_component_process_Xform/Orgfield.js

@@ -470,6 +470,7 @@ MWF.xApplication.process.Xform.Orgfield = MWF.APPOrgfield =  new Class({
 	},
 	loadOrgWidget: function(value, node){
         var disableInfor = layout.mobile ? true : false;
+        if( this.json.showCard === "no" )disableInfor = true;
 		var options = {"style": "xform", "canRemove":false , "onRemove" : this.removeItem,"disableInfor" : disableInfor};
 		value.each(function(data){
 			if( data.distinguishedName ){

+ 1 - 0
o2web/source/x_component_process_Xform/Personfield.js

@@ -882,6 +882,7 @@ MWF.xApplication.process.Xform.Personfield = MWF.APPPersonfield =  new Class({
     },
     loadOrgWidget: function(value, node){
         var disableInfor = layout.mobile ? true : false;
+        if( this.json.showCard === "no" )disableInfor = true;
         var height = node.getStyle("height").toInt();
         if (node.getStyle("overflow")==="visible" && !height) node.setStyle("overflow", "hidden");
         if (value && value.length){

+ 2 - 0
o2web/source/x_desktop/js/initalScriptSubstitute.js

@@ -824,6 +824,8 @@ var _Actions = {
 };
 bind.Actions = _Actions;
 
+print = function(str, type){}
+bind.print = print;
 
 bind.library = library;
 bind.data = this.data;

+ 3 - 0
o2web/source/x_desktop/js/initalServiceScriptSubstitute.js

@@ -900,6 +900,9 @@ var _org = {
         }
 };
 
+print = function(str, type){}
+bind.print = print;
+
 bind.org = _org;
 bind.library = library;
 bind.define = _define;

+ 10 - 1
o2web/source/x_desktop/js/initialScriptText.js

@@ -815,6 +815,15 @@ var _Actions = {
 bind.Actions = _Actions;
 
 
+var oPrint = print;
+print = function(str, type){
+    var d = new Date();
+    var t = (type || "PRINT").toUpperCase();
+    var l = "[Script]";
+    oPrint(d.format("db")+"."+d.getMilliseconds()+" "+t+" "+l+" "+str);
+}
+bind.print = print;
+
 bind.library = library;
 bind.data = this.data;
 bind.workContext = wrapWorkContext;
@@ -911,4 +920,4 @@ bind.request = {
             return null
         }
     }
-}
+}

+ 8 - 0
o2web/source/x_desktop/js/initialServiceScriptText.js

@@ -3259,6 +3259,14 @@ var _org = {
     }
 };
 
+var oPrint = print;
+print = function(str, type){
+    var d = new Date();
+    var t = (type || "PRINT").toUpperCase();
+    var l = "[ServiceScript]";
+    oPrint(d.format("db")+"."+d.getMilliseconds()+" "+t+" "+l+" "+str);
+}
+bind.print = print;
 bind.org = _org;
 bind.library = library;
 bind.define = _define;