提交 85ca97df 编写于 作者: NoSubject's avatar NoSubject

Merge branch 'wrdp' into 'develop'

Wrdp

See merge request o2oa/o2oa!1855
/.idea/
/coverage/
/dest/
/out/
/node_modules/
npm-debug.log
/test/
......
......@@ -602,7 +602,7 @@ gulp.task("cleanAll", getCleanTask('/'));
gulp.task("o2:new-v:html", function () {
var path = "x_desktop";
var src = 'source/x_desktop/*.html';
var src = options.dest +'/x_desktop/*.html';
var dest = options.dest + '/x_desktop/';
return gulp.src(src)
.pipe(assetRev())
......@@ -627,7 +627,7 @@ gulp.task("o2:new-v:html", function () {
});
gulp.task("o2:new-v:o2", function () {
var path = "o2_core";
var src = 'source/o2_core/o2.js';
var src = options.dest +'/o2_core/o2.js';
var dest = options.dest +'/o2_core/';
return gulp.src(src)
.pipe(assetRev())
......
......@@ -120,7 +120,7 @@
},
"contentNode_embedded": {
"overflow": "hidden",
"padding" : "5px 0px 0px 0px"
"padding" : "4px 0px 0px 0px"
},
"selectNode": {
//"width": "200px",
......
......@@ -1516,6 +1516,8 @@ MWF.xApplication.Selector.Person = new Class({
},
setSize : function(){
debugger;
if( !this.options.width && !this.options.height )return;
var getOffsetX = function(node){
......@@ -1580,7 +1582,7 @@ MWF.xApplication.Selector.Person = new Class({
//if (this.options.count.toInt() !== 1){
var width = nodeWidth - getOffsetX(this.selectNode) - getOffsetX(this.selectedContainerNode);
var halfWidth = this.options.noSelectedContainer ? width : Math.floor(width / 2);
var halfWidth = this.options.noSelectedContainer ? width : ( Math.floor(width / 2) - 2);
this.selectNode.setStyle("width", halfWidth);
//this.searchInput.setStyle("width", halfWidth - 6);
......@@ -1611,7 +1613,7 @@ MWF.xApplication.Selector.Person = new Class({
nodeHeight = this.options.height.toInt();
}
nodeHeight = nodeHeight - getOffsetY( this.contentNode );
nodeHeight = nodeHeight - getOffsetY( this.contentNode ) - 1;
if( this.titleNode ){
nodeHeight = nodeHeight - getOffsetY( this.titleNode ) - this.titleNode.getStyle("height").toInt();
}
......
MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
/** Class Input组件 */
MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class({
Implements: [Events],
Extends: MWF.APP$Module,
......@@ -222,10 +223,18 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class({
var text = (this.node.getFirst()) ? this.node.getFirst().get("text") : this.node.get("text");
return {"value": [value || ""] , "text": [text || value || ""]};
},
/**
* 判断组件值是否为空.
* @return {boolean}.
*/
isEmpty : function(){
var data = this.getData();
return !data || !data.trim();
},
/**
* 获取组件值.
* @return {object/string}.
*/
getData: function(when){
if (this.json.compute == "save") this._setValue(this._computeValue());
return this.getInputData();
......@@ -237,9 +246,16 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class({
return this._getBusinessData();
}
},
/**
* 重置组件的值,如果设置了默认值,则设置为默认值,否则置空。
*/
resetData: function(){
this.setData(this.getValue());
},
/**
* 为控件赋值。
* @param {string/number/jsonObject} .
*/
setData: function(data){
this._setBusinessData(data);
if (this.node.getFirst()){
......@@ -433,6 +449,11 @@ MWF.xApplication.process.Xform.$Input = MWF.APP$Input = new Class({
}
return true;
},
/**
* 根据组件的校验设置进行校验。
* @param {string} routeName-路由名称.
* @return {boolean} 是否通过校验
*/
validation: function(routeName, opinion){
if (!this.readonly && !this.json.isReadonly){
if (!this.validationConfig(routeName, opinion)) return false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册