-add textarea style

This commit is contained in:
dawncx 2014-02-17 15:26:42 +08:00
parent be58aafe09
commit 3a619acd5e
8 changed files with 31 additions and 9 deletions

View File

@ -84,7 +84,6 @@ public class OozieFlowXmlGenerator {
String key = ncp.getKey(); String key = ncp.getKey();
String value = ncp.getValue(); String value = ncp.getValue();
String xmlValue=XmlFilter.encodeXml(value); String xmlValue=XmlFilter.encodeXml(value);
userConfs.put(key, xmlValue); userConfs.put(key, xmlValue);
} }

View File

@ -44,6 +44,13 @@ public abstract class AbstractJavaModule extends AbstractModule {
result.add(configurations.get(key)); result.add(configurations.get(key));
} }
break; break;
case TEXT_AREA:
String areaValue=configurations.get(key).trim();
if(areaValue.length()>0){
result.add("--"+key);
result.add(configurations.get(key));
}
break;
case TEXT_ARRAY: case TEXT_ARRAY:
String arrayValue = configurations.get(key).trim(); String arrayValue = configurations.get(key).trim();
if (arrayValue.length() > 0) { if (arrayValue.length() > 0) {

View File

@ -1,5 +1,5 @@
package haflow.module; package haflow.module;
public enum ModuleConfigurationType { public enum ModuleConfigurationType {
BOOLEAN, PLAIN_TEXT, TEXT_ARRAY, OTHER BOOLEAN, PLAIN_TEXT, TEXT_ARRAY, TEXT_AREA,OTHER
} }

View File

@ -17,7 +17,7 @@
<meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="<%=basePath%>/script/js/logon.js"></script> <script type="text/javascript" src="<%=basePath%>/script/js/logon.js"></script>
<link rel="stylesheet" href="<%=basePath%>/style/logon.css"> <link rel="stylesheet" href="<%=basePath%>/style/logon.css">
<script type="text/javascript" language="javascript" src="<%=basePath%>/script/js/website-min.js"></script>

View File

@ -17,7 +17,7 @@
<meta http-equiv="Content-Script-Type" content="text/javascript" /> <meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="<%=basePath%>/script/js/registration.js"></script> <script type="text/javascript" src="<%=basePath%>/script/js/registration.js"></script>
<link rel="stylesheet" href="<%=basePath%>/style/logon.css"> <link rel="stylesheet" href="<%=basePath%>/style/logon.css">
<script type="text/javascript" language="javascript" src="<%=basePath%>/script/js/website-min.js"></script>

View File

@ -262,6 +262,7 @@ HAFlow.Main.prototype.refreshFlowList = function(instance, parentPath, data) {
}; };
//Event Handler //Event Handler
//changed by dawn
HAFlow.Main.prototype.onFlowClicked = function(instance, flowId) { HAFlow.Main.prototype.onFlowClicked = function(instance, flowId) {
var flowBrief = instance.getFlowBriefById(instance, flowId); var flowBrief = instance.getFlowBriefById(instance, flowId);
var text = ""; var text = "";

View File

@ -2,7 +2,7 @@ dojo.registerModulePath("widget","/haflow/script/widget");
dojo.require("widget.MultipleEditor"); dojo.require("widget.MultipleEditor");
dojo.require("dijit.Menu"); dojo.require("dijit.Menu");
dojo.require("dijit.MenuItem"); dojo.require("dijit.MenuItem");
dojo.require("dijit.form.Textarea");
//jsplumb helper //jsplumb helper
//public //public
@ -284,22 +284,25 @@ HAFlow.Main.prototype.initNodeDataGrid=function(instance,flowId,nodeId){
items.push({ items.push({
key : myfile.NodeId, key : myfile.NodeId,
value : node.id, value : node.id,
type:"string",
}); });
items.push({ items.push({
key : myfile.flow, key : myfile.flow,
value : instance.flows[node.flowId].name, value : instance.flows[node.flowId].name,
type:"string",
}); });
items.push({ items.push({
key : myfile.module, key : myfile.module,
value : module.name, value : module.name,
type:"string",
}); });
items.push({ items.push({
key : myfile.name, key : myfile.name,
value : node.name, value : node.name,
type:"string",
}); });
var configItems=this.getNodeConfigurationItems(instance, flowId, nodeId); var configItems=this.getNodeConfigurationItems(instance, flowId, nodeId);
var allitems=items.concat(configItems); var allitems=items.concat(configItems);
var store = new dojo.data.ItemFileWriteStore({ var store = new dojo.data.ItemFileWriteStore({
data : { data : {
items : allitems items : allitems
@ -409,10 +412,17 @@ HAFlow.Main.prototype.getNodeConfigurationItems = function(instance, flowId,
nodeId, module.configurations[i].key) == "true"||instance.getConfigurationValue(instance, flowId, nodeId, module.configurations[i].key) == "true"||instance.getConfigurationValue(instance, flowId,
nodeId, module.configurations[i].key) == true) ? true nodeId, module.configurations[i].key) == true) ? true
: false, : false,
type:"bool" type:"bool",
}); });
} else { } else if(module.configurations[i].type=="TEXT_AREA"){
configItems.push({
key : module.configurations[i].displayName,
value : instance.getConfigurationValue(instance, flowId,
nodeId, module.configurations[i].key),
type:"longstring",
});
}else {
configItems.push({ configItems.push({
key : module.configurations[i].displayName, key : module.configurations[i].displayName,
value : instance.getConfigurationValue(instance, flowId, value : instance.getConfigurationValue(instance, flowId,

View File

@ -16,6 +16,9 @@ dojo.declare(
"string" : { "string" : {
widgetClass : dijit.form.TextBox widgetClass : dijit.form.TextBox
}, },
"longstring":{
widgetClass: dijit.form.Textarea
},
"date" : { "date" : {
widgetClass : dijit.form.DateTextBox widgetClass : dijit.form.DateTextBox
}, },
@ -151,7 +154,9 @@ dojo.declare(
return val ? val : 0; return val ? val : 0;
} else if (this.type == "select") { } else if (this.type == "select") {
return val ? val : ""; return val ? val : "";
} else { } else if(this.type=="longstring"){
return val;
} {
return this.inherited(arguments); return this.inherited(arguments);
} }
}, },