提交 3aba35e8 编写于 作者: 蔡祥熠

Merge branch 'fix/Process.mobile_form_no_readaction' into 'develop'

Merge of fix/【流程管理】修复流程移动表单操作复原没有已阅的问题 to develop

See merge request o2oa/o2oa!437
......@@ -54,6 +54,7 @@ MWF.xApplication.portal.PortalExplorer.Main = new Class({
this.createApplicationItem(json.data, "top");
}.bind(this));
this.reloadApplicationCategoryList(true);
this.notice(this.lp.application.createApplicationSuccess, "success");
}.bind(this));
}else{
......
......@@ -292,6 +292,7 @@ MWF.xApplication.process.ApplicationExplorer.Main = new Class({
//this.applications.push(application);
}.bind(this));
this.reloadApplicationCategoryList(true);
this.notice(this.lp.application.createApplicationSuccess, "success");
// this.app.processConfig();
}.bind(this));
......@@ -319,7 +320,7 @@ MWF.xApplication.process.ApplicationExplorer.Main = new Class({
var size = this.content.getSize();
var topSize = this.topNode.getComputedSize();
var bottomSize = this.bottomNode.getComputedSize();
var pt = this.contentArea.getStyle("padding-top").toInt() || 0;;
var pt = this.contentArea.getStyle("padding-top").toInt() || 0;
var pb = this.contentArea.getStyle("padding-bottom").toInt() || 0;
var h = size.y-topSize.totalHeight-bottomSize.totalHeight-pt-pb;
......@@ -355,7 +356,7 @@ MWF.xApplication.process.ApplicationExplorer.Main = new Class({
}
e.stopPropagation();
},
loadApplicationCategoryList: function(){
loadApplicationCategoryList: function( currentCategoryName, noRefreshContent ){
if (this.control.canCreate){
this.restActions.listApplicationCategory(function(json){
......@@ -370,9 +371,29 @@ MWF.xApplication.process.ApplicationExplorer.Main = new Class({
}.bind(this));
if (this.categoryAreaNode.getScrollSize().y>this.categoryAreaNode.getSize().y) this.createCategoryExpandButton();
if( currentCategoryName ){
var itemList = this.categoryAreaNode.getElements("div.o2_process_AppExp_categoryItem");
if( itemList.length > 0 ){
for( var i=0; i<itemList.length; i++ ){
if( itemList[i].retrieve("categoryName") === currentCategoryName ){
this.clickCategoryNode( itemList[i], noRefreshContent)
}
}
}
}
}.bind(this));
}
},
reloadApplicationCategoryList: function( noRefreshContent ){
var categoryName = "";
if( this.category ){
categoryName = this.category.retrieve("categoryName") || "";
}
this.categoryAreaNode.empty();
this.loadApplicationCategoryList( categoryName, noRefreshContent );
},
createCategoryItemNode: function(text, count){
var categoryName = text;
......@@ -391,7 +412,7 @@ MWF.xApplication.process.ApplicationExplorer.Main = new Class({
});
},
clickCategoryNode: function(item){
clickCategoryNode: function(item, noRefreshContent){
// var node = this.categoryListAreaNode.getFirst("div");
// node.setStyles(this.css.allCategoryItemNode);
if (this.category){
......@@ -408,7 +429,9 @@ MWF.xApplication.process.ApplicationExplorer.Main = new Class({
if (p.y>=size.y) item.inject(this.categoryAreaNode, "top");
this.category = item;
if( !noRefreshContent ){
this.loadApplicationList(item);
}
},
getApplicationDimension: function(){
......@@ -534,6 +557,7 @@ MWF.xApplication.process.ApplicationExplorer.Main = new Class({
var complete = function(){
if (doCount == readyCount){
_self.reloadApplicationCategoryList( true );
if (errorText){
_self.app.notice(errorText, "error");
}
......
......@@ -112,7 +112,7 @@
</div>
<div title="操作" class="MWFTab" style="overflow: hidden; display: text{($.mode=='Mobile')?'block':'none'}">
<div class="MWFDefaultActionArea" name="defaultTools"></div>
<div class="MWFDefaultActionArea" name="defaultTools" data-target="mobileForm"></div>
<div class="MWFActionArea" name="tools"></div>
</div>
<div title="事件" class="MWFTab">
......
......@@ -1562,6 +1562,7 @@ debugger;
"noDelete": false,
"noCode": true,
"noReadShow": true,
"target" : node.get("data-target"),
"noEditShow": true,
"onChange": function(){
this.data[name] = actionEditor.data;
......
......@@ -91,6 +91,7 @@ MWF.xApplication.process.FormDesigner.widget.ActionsEditor = new Class({
}).inject(this.actionTitleArea);
this.restoreActionButtonButton.addEvent("click", function(){
debugger;
this.restoreButtonAction();
}.bind(this));
}
......@@ -100,6 +101,19 @@ MWF.xApplication.process.FormDesigner.widget.ActionsEditor = new Class({
if( !this.defaultTools ){
MWF.getJSON( this.options.systemToolsAddress, function(tools){
this.defaultTools = tools;
if( this.options.target && this.options.target === "mobileForm" ){
this.defaultTools.push({
"type": "MWFToolBarButton",
"img": "read.png",
"title": "标记为已阅",
"action": "readedWork",
"text": "已阅",
"id": "action_readed",
"control": "allowReadProcessing",
"condition": "",
"read": true
});
}
}.bind(this), false);
}
this.defaultTools.each( function( tool ){
......
......@@ -56,6 +56,7 @@ MWF.xApplication.query.QueryExplorer.Main = new Class({
this.createApplicationItem(json.data, "top");
}.bind(this));
this.reloadApplicationCategoryList(true);
this.notice(this.lp.application.createApplicationSuccess, "success");
}.bind(this));
}else{
......@@ -100,6 +101,7 @@ MWF.xApplication.query.QueryExplorer.Main = new Class({
var complete = function(){
if (doCount == readyCount){
_self.reloadApplicationCategoryList( true );
if (errorText){
_self.app.notice(errorText, "error");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册