diff --git a/o2web/source/x_component_ftsearch/$FTSearchView/default/condition.html b/o2web/source/x_component_ftsearch/$FTSearchView/default/condition.html
index 32902eb54e9ea621e4f7442293081746da112e30..aada3ff44b2a78482207dc9cf6bbf969f4e90561 100644
--- a/o2web/source/x_component_ftsearch/$FTSearchView/default/condition.html
+++ b/o2web/source/x_component_ftsearch/$FTSearchView/default/condition.html
@@ -6,7 +6,7 @@
{{if $.valueCountPairList && $.valueCountPairList.length}}
+
{{$.label}}
@@ -41,5 +41,13 @@
{{end each}}
+
+ {{if $.status.showSwitch}}
+
+
+ {{$.status.collapseCondition ? $.lp.expandCondition : $.lp.collapseCondition}}
+
+ {{end if}}
+
{{end if}}
\ No newline at end of file
diff --git a/o2web/source/x_component_ftsearch/$Main/default/style.css b/o2web/source/x_component_ftsearch/$Main/default/style.css
index be4c9a1aadd7d5f115024cd541026e71958b5678..6fc365a9edef01fb9283c4dc72ba3b6e62185d23 100644
--- a/o2web/source/x_component_ftsearch/$Main/default/style.css
+++ b/o2web/source/x_component_ftsearch/$Main/default/style.css
@@ -377,6 +377,19 @@ ul {
border-radius: 0px 0px 30px 30px;
border: 1px solid #CCCCCC;
padding-bottom: 10px;
+ position: relative;
+}
+.condition .switch{
+ cursor: pointer;
+ padding-left: 5px;
+ position: absolute;
+ width: 60px;
+ height: 30px;
+ left: calc( 50% - 30px );
+ bottom: -20px;
+ background: #fff;
+ text-align: center;
+ color: #999;
}
.condition .switch-button{
background: #ffffff;
diff --git a/o2web/source/x_component_ftsearch/FTSearchView.js b/o2web/source/x_component_ftsearch/FTSearchView.js
index b89fc6c17870338225f27fe9c648b05805106db5..7846149fe8980494140165041df92877c6831c68 100644
--- a/o2web/source/x_component_ftsearch/FTSearchView.js
+++ b/o2web/source/x_component_ftsearch/FTSearchView.js
@@ -72,10 +72,18 @@ MWF.xApplication.ftsearch.FTSearchView = new Class({
this.search();
}
},
- search: function(pageNum, query){
+ search: function(pageNum, query){
this.selectedConditionList = [];
this.loadSelectedCondition();
- this._search(pageNum, query);
+
+ if( typeOf(this.collapseCondition) === "boolean" ){
+ this._search(pageNum, query);
+ }else{
+ MWF.UD.getDataJson("ftsearchCollapseCondition", function (json) {
+ this.collapseCondition = json === "true";
+ this._search(pageNum, query);
+ }.bind(this), true);
+ }
},
_search: function( pageNum, query ){
pageNum = o2.typeOf(pageNum) === "number" ? pageNum : null;
@@ -235,9 +243,15 @@ MWF.xApplication.ftsearch.FTSearchView = new Class({
json = json.filter(function(d){
return d.valueCountPairList && d.valueCountPairList.length;
});
+ json.each(function(d, i){
+ d.index = i;
+ });
this.conditionArea.loadHtml(this.path+this.options.style+"/condition.html",
{
- "bind": {"lp": this.app.lp, "data": json},
+ "bind": {"lp": this.app.lp, "data": json, status: {
+ collapseCondition: this.collapseCondition,
+ showSwitch: json.length > 1
+ }},
"module": this,
"reload": true
},
@@ -247,6 +261,23 @@ MWF.xApplication.ftsearch.FTSearchView = new Class({
);
// }.bind(this));
},
+ switchCondition: function(){
+ this.collapseCondition = !this.collapseCondition;
+ if( this.collapseCondition ){
+ this.switchNode.getElement("i").addClass( 'o2icon-chevron-thin-down' ).removeClass('o2icon-chevron-thin-up');
+ this.switchNode.getElement("span").set("text", this.app.lp.expandCondition);
+ this.conditionNode.getElements(".item").each(function (item, index) {
+ item.setStyle("display", index ? "none": "")
+ })
+ }else{
+ this.switchNode.getElement("i").removeClass( 'o2icon-chevron-thin-down' ).addClass('o2icon-chevron-thin-up');
+ this.switchNode.getElement("span").set("text", this.app.lp.collapseCondition);
+ this.conditionNode.getElements(".item").each(function (item, index) {
+ item.setStyle("display", "");
+ })
+ }
+ MWF.UD.putData("ftsearchCollapseCondition", this.collapseCondition.toString(), null,);
+ },
loadSelectedCondition: function(){
this.conditionSelectedArea.empty();
this.conditionSelectedArea.loadHtml(this.path+this.options.style+"/conditionSelected.html",
diff --git a/o2web/source/x_component_ftsearch/lp/en.js b/o2web/source/x_component_ftsearch/lp/en.js
index f5caa451138e1093587cee8f1c708eaca1e10f29..55b3c7301ee1dc3ca2e6942ca1956f56a1c2e365 100644
--- a/o2web/source/x_component_ftsearch/lp/en.js
+++ b/o2web/source/x_component_ftsearch/lp/en.js
@@ -97,5 +97,8 @@ MWF.xApplication.ftsearch.LP = {
"selectModule": "Select Application",
"searching": "You are searching",
"switch": "Switch",
- "searchCorePlacholder": "Please enter a keyword and press \"Enter\" to search for an application or process"
+ "searchCorePlacholder": "Please enter a keyword and press \"Enter\" to search for an application or process",
+
+ "expandCondition":"Expand",
+ "collapseCondition": "Collapse"
};
\ No newline at end of file
diff --git a/o2web/source/x_component_ftsearch/lp/zh-cn.js b/o2web/source/x_component_ftsearch/lp/zh-cn.js
index f21f60f00d3cb68b598fd0cdb76c115e40e2e9be..bd0482c2cfe0ce27da8af4dfbc2a39a30118365c 100644
--- a/o2web/source/x_component_ftsearch/lp/zh-cn.js
+++ b/o2web/source/x_component_ftsearch/lp/zh-cn.js
@@ -95,5 +95,8 @@ MWF.xApplication.ftsearch.LP = {
"selectModule": "选择应用",
"searching": "您正在查询",
"switch": "切换",
- "searchCorePlacholder": "请输入关键字,按“回车”搜索应用或流程"
+ "searchCorePlacholder": "请输入关键字,按“回车”搜索应用或流程",
+
+ "expandCondition":"更多",
+ "collapseCondition": "收起"
};
diff --git a/o2web/source/x_component_process_FormDesigner/lp/zh-cn.js b/o2web/source/x_component_process_FormDesigner/lp/zh-cn.js
index 720e596ce93976ec58ba13d92ccc4630b3a95197..b3bcebdbe115fb3781def93499d2c1640fb3949a 100644
--- a/o2web/source/x_component_process_FormDesigner/lp/zh-cn.js
+++ b/o2web/source/x_component_process_FormDesigner/lp/zh-cn.js
@@ -362,7 +362,7 @@ MWF.xApplication.process.FormDesigner.LP = {
"readLog": "阅读记录",
"writingBoard": "手写板",
"tinymceEditor": "Tinymce编辑器",
- "relatedLink": "相关链接"
+ "relatedLink": "相关推荐"
},
"propertyTemplate": {
"base": "基本",
diff --git a/o2web/source/x_component_process_Xform/Relatedlink.js b/o2web/source/x_component_process_Xform/Relatedlink.js
index 2abeb4e79091b9e85822cbab14add706c4c91b81..f284a10a124f12fcc0f401d9a4e1b7808cb35880 100644
--- a/o2web/source/x_component_process_Xform/Relatedlink.js
+++ b/o2web/source/x_component_process_Xform/Relatedlink.js
@@ -1,6 +1,6 @@
MWF.xDesktop.requireApp("process.Xform", "$Module", null, false);
-/** @class Relatedlink 相关链接组件,本组件根据其当前流程实例的相关性分数列式其他流程实例(带权限)。
- * @o2cn 相关链接组件
+/** @class Relatedlink 相关推荐组件,本组件根据其当前流程实例的相关性分数列式其他流程实例(带权限)。
+ * @o2cn 相关推荐组件
* @example
* //可以在脚本中获取该组件
* //方法1:
diff --git a/o2web/source/x_component_process_Xform/lp/zh-cn.js b/o2web/source/x_component_process_Xform/lp/zh-cn.js
index b07749ba1123adc8620d889c3d69c66b4930bbdc..a06a996e8805c0f11cf1f127e433be4d0b274ab5 100644
--- a/o2web/source/x_component_process_Xform/lp/zh-cn.js
+++ b/o2web/source/x_component_process_Xform/lp/zh-cn.js
@@ -410,7 +410,7 @@ MWF.xApplication.process.Xform.LP = {
"createTime": "创建时间",
"creatorPerson": "创建人",
"creatorUnit": "创建组织",
- "score": "匹配度",
+ "score": "关联度",
"updateTime": "更新时间"
};