提交 3287dc19 编写于 作者: NoSubject's avatar NoSubject

增加了流程默认表单配置

上级 70e041ff
...@@ -773,6 +773,7 @@ MWF.xApplication.process.ProcessManager.ApplicationProperty = new Class({ ...@@ -773,6 +773,7 @@ MWF.xApplication.process.ProcessManager.ApplicationProperty = new Class({
html += "<tr><td class='formTitle'>"+this.app.lp.application.alias+"</td><td id='formApplicationAlias'></td></tr>"; html += "<tr><td class='formTitle'>"+this.app.lp.application.alias+"</td><td id='formApplicationAlias'></td></tr>";
html += "<tr><td class='formTitle'>"+this.app.lp.application.description+"</td><td id='formApplicationDescription'></td></tr>"; html += "<tr><td class='formTitle'>"+this.app.lp.application.description+"</td><td id='formApplicationDescription'></td></tr>";
html += "<tr><td class='formTitle'>"+this.app.lp.application.type+"</td><td id='formApplicationType'></td></tr>"; html += "<tr><td class='formTitle'>"+this.app.lp.application.type+"</td><td id='formApplicationType'></td></tr>";
html += "<tr><td class='formTitle'>"+this.app.lp.application.defaultForm+"</td><td id='formApplicationDefaultForm'></td></tr>";
html += "<tr><td class='formTitle'>"+this.app.lp.application.id+"</td><td id='formApplicationId'></td></tr>"; html += "<tr><td class='formTitle'>"+this.app.lp.application.id+"</td><td id='formApplicationId'></td></tr>";
// html += "<tr><td class='formTitle'>"+this.app.lp.application.icon+"</td><td id='formApplicationIcon'></td></tr>"; // html += "<tr><td class='formTitle'>"+this.app.lp.application.icon+"</td><td id='formApplicationIcon'></td></tr>";
html += "</table>"; html += "</table>";
...@@ -784,6 +785,15 @@ MWF.xApplication.process.ProcessManager.ApplicationProperty = new Class({ ...@@ -784,6 +785,15 @@ MWF.xApplication.process.ProcessManager.ApplicationProperty = new Class({
this.descriptionInput = new MWF.xApplication.process.ProcessManager.Input(this.propertyContentNode.getElement("#formApplicationDescription"), this.data.description, this.app.css.formInput); this.descriptionInput = new MWF.xApplication.process.ProcessManager.Input(this.propertyContentNode.getElement("#formApplicationDescription"), this.data.description, this.app.css.formInput);
this.typeInput = new MWF.xApplication.process.ProcessManager.Input(this.propertyContentNode.getElement("#formApplicationType"), this.data.applicationCategory, this.app.css.formInput); this.typeInput = new MWF.xApplication.process.ProcessManager.Input(this.propertyContentNode.getElement("#formApplicationType"), this.data.applicationCategory, this.app.css.formInput);
this.idInput = new MWF.xApplication.process.ProcessManager.Input(this.propertyContentNode.getElement("#formApplicationId"), this.data.id, this.app.css.formInput); this.idInput = new MWF.xApplication.process.ProcessManager.Input(this.propertyContentNode.getElement("#formApplicationId"), this.data.id, this.app.css.formInput);
this.defaultFormInput = new MWF.xApplication.process.ProcessManager.Select(this.propertyContentNode.getElement("#formApplicationDefaultForm"), this.data.defaultForm, this.app.css.formInput, function(){
var pages = {};
this.app.restActions.listForm(this.app.options.application.id, function(json){
json.data.each(function(page) {
pages[page.id] = page.name;
}.bind(this));
}.bind(this), null, false);
return pages;
}.bind(this));
}, },
createControllerListNode: function(){ createControllerListNode: function(){
//if (!this.personActions) this.personActions = new MWF.xAction.org.express.RestActions(); //if (!this.personActions) this.personActions = new MWF.xAction.org.express.RestActions();
...@@ -990,6 +1000,7 @@ MWF.xApplication.process.ProcessManager.ApplicationProperty = new Class({ ...@@ -990,6 +1000,7 @@ MWF.xApplication.process.ProcessManager.ApplicationProperty = new Class({
this.aliasInput.editMode(); this.aliasInput.editMode();
this.descriptionInput.editMode(); this.descriptionInput.editMode();
this.typeInput.editMode(); this.typeInput.editMode();
this.defaultFormInput.editMode();
this.isEdit = true; this.isEdit = true;
}, },
readMode: function(){ readMode: function(){
...@@ -997,6 +1008,7 @@ MWF.xApplication.process.ProcessManager.ApplicationProperty = new Class({ ...@@ -997,6 +1008,7 @@ MWF.xApplication.process.ProcessManager.ApplicationProperty = new Class({
this.aliasInput.readMode(); this.aliasInput.readMode();
this.descriptionInput.readMode(); this.descriptionInput.readMode();
this.typeInput.readMode(); this.typeInput.readMode();
this.defaultFormInput.readMode();
this.isEdit = false; this.isEdit = false;
}, },
cancelBaseInfor: function(){ cancelBaseInfor: function(){
...@@ -1043,6 +1055,7 @@ MWF.xApplication.process.ProcessManager.ApplicationProperty = new Class({ ...@@ -1043,6 +1055,7 @@ MWF.xApplication.process.ProcessManager.ApplicationProperty = new Class({
this.data.alias = this.aliasInput.input.get("value"); this.data.alias = this.aliasInput.input.get("value");
this.data.description = this.descriptionInput.input.get("value"); this.data.description = this.descriptionInput.input.get("value");
this.data.applicationCategory = this.typeInput.input.get("value"); this.data.applicationCategory = this.typeInput.input.get("value");
this.data.defaultForm = this.defaultFormInput.input.get("value");
this.app.restActions.saveApplication(this.data, function(json){ this.app.restActions.saveApplication(this.data, function(json){
this.propertyTitleBar.set("text", this.data.name); this.propertyTitleBar.set("text", this.data.name);
...@@ -1051,6 +1064,7 @@ MWF.xApplication.process.ProcessManager.ApplicationProperty = new Class({ ...@@ -1051,6 +1064,7 @@ MWF.xApplication.process.ProcessManager.ApplicationProperty = new Class({
this.aliasInput.save(); this.aliasInput.save();
this.descriptionInput.save(); this.descriptionInput.save();
this.typeInput.save(); this.typeInput.save();
this.defaultFormInput.save();
if (callback) callback(); if (callback) callback();
}.bind(this), function(xhr, text, error){ }.bind(this), function(xhr, text, error){
...@@ -1100,3 +1114,72 @@ MWF.xApplication.process.ProcessManager.Input = new Class({ ...@@ -1100,3 +1114,72 @@ MWF.xApplication.process.ProcessManager.Input = new Class({
return this.value; return this.value;
} }
}); });
MWF.xApplication.process.ProcessManager.Select = new Class({
Extends: MWF.xApplication.process.ProcessManager.Input,
Implements: [Events],
initialize: function(node, value, style, select){
this.node = $(node);
this.value = (value) ? value: "";
this.style = style;
this.select = select;
this.selectList = null;
this.load();
},
getSelectList: function(){
if (this.select){
return this.select();
}
return [];
},
getText: function(value){
if (value){
if (this.selectList){
return this.selectList[value] || "";
}
}
return "";
},
load: function(){
this.selectList = this.getSelectList();
this.content = new Element("div", {
"styles": this.style.content,
"text": this.getText(this.value)
}).inject(this.node);
},
editMode: function(){
this.content.empty();
this.input = new Element("select",{
//"styles": this.style.input,
//"value": this.value
}).inject(this.content);
Object.each(this.selectList, function(v, k){
new Element("option", {
"value": k,
"text": v,
"selected": (this.value==k)
}).inject(this.input);
}.bind(this));
//this.input.addEvents({
// //"focus": function(){
// // this.input.setStyles(this.style.input_focus);
// //}.bind(this),
// //"blur": function(){
// // this.input.setStyles(this.style.input);
// //}.bind(this),
// //"change": function(){
// // this.input.setStyles(this.style.input);
// //}.bind(this)
//});
},
readMode: function(){
this.content.empty();
this.input = null;
this.content.set("text", this.getText(this.value));
},
save: function(){
if (this.input) this.value = this.input.options[this.input.selectedIndex].get("value");
return this.value;
}
});
...@@ -161,6 +161,7 @@ MWF.xApplication.process.ProcessManager.LP = { ...@@ -161,6 +161,7 @@ MWF.xApplication.process.ProcessManager.LP = {
"id": "Application ID", "id": "Application ID",
"controllerList": "Manager", "controllerList": "Manager",
"available": "Available range", "available": "Available range",
"defaultForm": "Default Form",
"changeIcon": "Change Icon", "changeIcon": "Change Icon",
"setManager": "Set Manager", "setManager": "Set Manager",
......
...@@ -165,6 +165,7 @@ MWF.xApplication.process.ProcessManager.LP = { ...@@ -165,6 +165,7 @@ MWF.xApplication.process.ProcessManager.LP = {
"id": "应用标识", "id": "应用标识",
"controllerList": "管理者", "controllerList": "管理者",
"available": "可用范围", "available": "可用范围",
"defaultForm": "默认表单",
"changeIcon" : "更改图标", "changeIcon" : "更改图标",
"setManager" : "设置管理者", "setManager" : "设置管理者",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册