diff --git a/o2web/jsdoc.conf.json b/o2web/jsdoc.conf.json
index d08bbb347d1082ce52d2484c59aa18135b079b7d..8defcc15ca7199b4d5b35cc61c22163e9a84c34c 100644
--- a/o2web/jsdoc.conf.json
+++ b/o2web/jsdoc.conf.json
@@ -16,7 +16,7 @@
]
},
"source": {
- "include": ["./o2web/source/x_component_process_Xform","./o2web/source/x_component_cms_Xform"],
+ "include": ["./o2web/source/x_component_process_Xform","./o2web/source/o2_core/o2/xScript"],
"includePattern": ".+\\.js(doc|x)?$",
"excludePattern": "(^|\\/|\\\\)_"
},
diff --git a/o2web/source/o2_core/o2/xScript/Environment.js b/o2web/source/o2_core/o2/xScript/Environment.js
index 2b9edfa48a8d1cd3bb53b2c3cdb8d5e037529697..04ff7b4b5708226cec78332fdce1a7e576b02b2c 100644
--- a/o2web/source/o2_core/o2/xScript/Environment.js
+++ b/o2web/source/o2_core/o2/xScript/Environment.js
@@ -44,7 +44,22 @@ MWF.xScript.Environment = function(ev){
//workContext
+ /**
+ * 你可以通过workContext获取和流程相关的流程实例对象数据。
+ * @namespace
+ * @module workContext
+ * @example
+ * //您可以在表单或流程的各个嵌入脚本中,通过this来获取当前流程实例数据,如下:
+ * var context = this.workContext;
+ */
this.workContext = {
+ /**
+ * 当前流程实例正在流转中,并且当前用户有待办,则返回当前用户的待办对象,否则返回null。
+ * @summary 获取当前流程与当前用户相关的待办对象:task对象。
+ * @method getTask
+ * @static
+ * @return {string} The blended color.
+ */
"getTask": function(){return ev.task || null;},
"getWork": function(){return ev.work || ev.workCompleted;},
"getActivity": function(){return ev.activity || null;},
@@ -238,9 +253,20 @@ MWF.xScript.Environment = function(ev){
return [(t==="object") ? (name.distinguishedName || name.id || name.unique || name.name) : name];
}
};
+
+ /**
+ * 你可以通过workContext获取和流程相关的流程实例对象数据。
+ * @module this.org
+ * @example
+ * //您可以在表单或流程的各个嵌入脚本中,通过this来获取当前流程实例数据,如下:
+ * var context = this.workContext;
+ */
this.org = {
//群组***************
//获取群组--返回群组的对象数组
+ /**
+ 根据群组标识获取对应的群组对象数组:group对象数组
+ */
getGroup: function(name, async){
getOrgActions();
var data = {"groupList": getNameFlag(name)};
diff --git a/o2web/source/x_component_process_Xform/$Input.js b/o2web/source/x_component_process_Xform/$Input.js
index 3285d95dbf341c5355faae1bf69c42118188b3b0..0bcce897fda2ea44c93ac57252cf524595c6bd53 100644
--- a/o2web/source/x_component_process_Xform/$Input.js
+++ b/o2web/source/x_component_process_Xform/$Input.js
@@ -592,7 +592,7 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class(
},
/**
* @summary 根据组件的校验设置进行校验。
- * @param {String} routeName - 可选,路由名称.
+ * @param {String} [routeName] - 可选,路由名称.
* @example
* if( !this.form.get('fieldName').validation() ){
* return false;
diff --git a/o2web/source/x_component_process_Xform/$Module.js b/o2web/source/x_component_process_Xform/$Module.js
index b8a728f12dd140d68d48ae3272b9f750ee9540ab..b8c6169095c4a46569ef15b1113da76a298cf6e4 100644
--- a/o2web/source/x_component_process_Xform/$Module.js
+++ b/o2web/source/x_component_process_Xform/$Module.js
@@ -8,6 +8,28 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module = new Class(
{
Implements: [Events],
options: {
+ // /**
+ // * 组件加载前事件。
+ // * 平台执行queryLoad事件的时候,组件还没有开始加载,这个时候可以根据条件修改组件的配置信息
+ // * @event MWF.xApplication.process.Xform.$Module#queryLoad
+ // * @example
+ // * var field = this.form.get("fieldName");
+ // * field.addEvent("queryLoad", function(){
+ // *
+ // * };
+ // */
+ // /**
+ // * Event reporting that a snowball has been hurled.
+ // *
+ // * @event MWF.xApplication.process.Xform.$Module#load
+ // * @property {number} velocity - The snowball's velocity, in meters per second.
+ // */
+ // /**
+ // * Event reporting that a snowball has been hurled.
+ // *
+ // * @event MWF.xApplication.process.Xform.$Module#postLoad
+ // * @property {number} velocity - The snowball's velocity, in meters per second.
+ // */
"moduleEvents": ["load", "queryLoad", "postLoad"]
},
initialize: function(node, json, form, options){
@@ -19,7 +41,6 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module = new Class(
* //可以在脚本中获取该组件
* var field = this.form.get("fieldName"); //获取组件对象
* field.node.setStyle("font-size","12px"); //给节点设置样式
- * @extends MWF.xApplication.process.Xform.$Input
*/
this.node = $(node);
this.node.store("module", this);
@@ -75,7 +96,6 @@ MWF.xApplication.process.Xform.$Module = MWF.APP$Module = new Class(
if (this.iconNode) this.iconNode.setStyle("display", "block");
},
load: function(){
-
this._loadModuleEvents();
if (this.fireEvent("queryLoad")){
this._queryLoaded();
diff --git a/o2web/source/x_component_process_Xform/Attachment.js b/o2web/source/x_component_process_Xform/Attachment.js
index bb7ed903bbdf4441e28e1cddc196bd38876cec60..7ea82b022a38b3ecc7ec394bbbed294846ca87ff 100644
--- a/o2web/source/x_component_process_Xform/Attachment.js
+++ b/o2web/source/x_component_process_Xform/Attachment.js
@@ -1803,7 +1803,7 @@ MWF.xApplication.process.Xform.Attachment = MWF.APPAttachment = new Class(
},
/**
* @summary 根据组件的校验设置进行校验。
- * @param {String} routeName - 可选,路由名称.
+ * @param {String} [routeName] - 可选,路由名称.
* @example
* if( !this.form.get('fieldName').validation() ){
* return false;
diff --git a/o2web/source/x_component_process_Xform/DatagridMobile.js b/o2web/source/x_component_process_Xform/DatagridMobile.js
index 541284a41f496127c6fdb50e084671dabc7bd571..079af41457f12e4c00954d9f57f862771f116a52 100644
--- a/o2web/source/x_component_process_Xform/DatagridMobile.js
+++ b/o2web/source/x_component_process_Xform/DatagridMobile.js
@@ -1728,7 +1728,7 @@ MWF.xApplication.process.Xform.DatagridMobile = new Class(
},
/**
* @summary 根据组件的校验设置进行校验。
- * @param {String} routeName - 可选,路由名称.
+ * @param {String} [routeName] - 可选,路由名称.
* @example
* if( !this.form.get('fieldName').validation() ){
* return false;
diff --git a/o2web/source/x_component_process_Xform/DatagridPC.js b/o2web/source/x_component_process_Xform/DatagridPC.js
index a750c9c614330d0447d94647f233e67fce43c3a8..bcfe4c4cd29a00025e7ced3b66c5ab1354491eff 100644
--- a/o2web/source/x_component_process_Xform/DatagridPC.js
+++ b/o2web/source/x_component_process_Xform/DatagridPC.js
@@ -1501,7 +1501,7 @@ MWF.xApplication.process.Xform.DatagridPC = new Class(
},
/**
* @summary 根据组件的校验设置进行校验。
- * @param {String} routeName - 可选,路由名称.
+ * @param {String} [routeName] - 可选,路由名称.
* @example
* if( !this.form.get('fieldName').validation() ){
* return false;
diff --git a/o2web/source/x_component_process_Xform/Documenteditor.js b/o2web/source/x_component_process_Xform/Documenteditor.js
index 1cc4d2fe359dc3a5f26a788daa9eb7dc32973909..84df7c710934002c53db0cbd04b1cf8a82966d47 100644
--- a/o2web/source/x_component_process_Xform/Documenteditor.js
+++ b/o2web/source/x_component_process_Xform/Documenteditor.js
@@ -54,8 +54,10 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
this.active();
}
},
- /**激活板式文件编辑
- * 设置了延迟加载的时候,可以通过这个方法来激活
+ /**
+ * 激活公文编辑器编辑。设置了延迟加载的时候,可以通过这个方法来激活
+ * @example
+ * this.form.get("fieldName").active();
*/
active: function(){
this._loadModuleEvents();
@@ -1703,6 +1705,11 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
this.scaleTo(v);
}.bind(this));
},
+ /**缩放文件内容
+ * @param scale{Number} 缩放的比率
+ * @example
+ * this.form.get("fieldName").scaleTo(0.5);
+ */
scaleTo: function(scale){
this._returnScale();
this.scale = scale;
@@ -2498,7 +2505,10 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
var data = this._getBusinessData();
},
- /**重新计算板式文件的所有字段,当字段是脚本时可以使用该方法立即更新
+ /**重新计算公文编辑器的所有字段,当字段是脚本时可以使用该方法立即更新
+ * @summary 重新计算公文编辑器的所有字段
+ * @example
+ * this.form.get("fieldName").reload();
*/
reload: function(){
this.resetData();
@@ -2522,12 +2532,24 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
this._repage();
}.bind(this));
},
+ /**
+ * @summary 判断公文编辑器的正文内容是否已经填写
+ * @return {Boolean} 是否为空
+ * @example
+ * if( this.form.get("fieldName").isEmpty() ){
+ * this.form.notice('请填写正文内容')
+ * }
+ */
isEmpty: function(){
var data = this.getData();
if( typeOf(data) !== "object" )return true;
return !data.filetext || data.filetext===this.json.defaultValue.filetext;
},
- /*获取板式文件数据,返回Object
+ /*
+ * 获取公文编辑器数据
+ * @return {Object} 公文编辑器的数据
+ * @example
+ * var data = this.form.get("fieldName").getData();
*/
getData: function(){
//if (this.editMode){
@@ -2612,7 +2634,12 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
tmpdiv.destroy();
}
},
- /**设置
+ /**设置公文编辑器数据
+ * @param data{Object}
+ * @example
+ * var data = this.form.get("fieldName").getData();
+ * data.filetext = "测试内容";
+ * this.form.get("fieldName").getData(data);
*/
setData: function(data, diffFiletext){
if (data){
@@ -2888,7 +2915,15 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
}
return true;
},
-
+ /**
+ * @summary 根据组件的校验设置进行校验。
+ * @param {String} [routeName] - 可选,路由名称.
+ * @example
+ * if( !this.form.get('fieldName').validation() ){
+ * return false;
+ * }
+ * @return {Boolean} 是否通过校验
+ */
validation: function(routeName, opinion){
if (!this.validationConfig(routeName, opinion)) return false;
@@ -2920,7 +2955,10 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
}
return node;
},
- /*将板式文件内容以html形式输出
+ /**将公文编辑器内容以html形式输出
+ * @return {String}
+ * @example
+ * var html = this.form.get("fieldName").getDocumentHtml();
*/
getDocumentHtml: function(){
var tmpNode = this.contentNode.getFirst().getFirst().clone(true);
@@ -2946,8 +2984,15 @@ MWF.xApplication.process.Xform.Documenteditor = MWF.APPDocumenteditor = new Cla
tmpNode.destroy();
return "