modify the disadvantages
This commit is contained in:
parent
80d8e47a9c
commit
f197aaf5b4
|
@ -113,7 +113,7 @@ plugin_jsp_remove=\u79FB\u9664
|
|||
plugin_jsp_cancel=\u53D6\u6D88
|
||||
plugin_jsp_save=\u4FDD\u5B58
|
||||
plugin_jsp_submit=\u63D0\u4EA4
|
||||
plugin_jsp_insert=\u5F15\u5165\u63D2\u4EF6
|
||||
plugin_jsp_insert=\u5BFC\u5165\u63D2\u4EF6
|
||||
plugin_jsp_finish=\u5B8C\u6210
|
||||
plugin_jsp_add=\u6DFB\u52A0
|
||||
plugin_jsp_plugins=\u63D2\u4EF6
|
||||
|
|
|
@ -40,12 +40,13 @@ td,th{
|
|||
.table-margin{
|
||||
margin-top:10px;
|
||||
padding-top:5px;
|
||||
padding-left:10px;
|
||||
padding-left:20px;
|
||||
padding-bottom:10px;
|
||||
}
|
||||
|
||||
.sample_frame {
|
||||
margin-bottom: 0px;
|
||||
padding:10px;
|
||||
margin: 10px 10px 10px 10px;
|
||||
border: #3689BB solid thin;
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,10 @@ function pluginFinish() {
|
|||
function createLine(pluginName) {
|
||||
var div = document.createElement("div");
|
||||
var p = document.createElement("p");
|
||||
var i = document.createElement("i");
|
||||
var textNode = document.createTextNode(pluginName);
|
||||
i.setAttribute("class", "icon-hand-right");
|
||||
p.appendChild(i);
|
||||
p.appendChild(textNode);
|
||||
div.appendChild(p);
|
||||
return $(div).html();
|
||||
|
@ -105,6 +108,14 @@ function removePlugin() {
|
|||
document.getElementById("pluginArea").removeChild(last);
|
||||
}
|
||||
|
||||
function insertBefore() {
|
||||
|
||||
}
|
||||
|
||||
function insertAfter() {
|
||||
|
||||
}
|
||||
|
||||
function insertPlugin() {
|
||||
document.getElementById("pluginMethod").innerHTML = "";
|
||||
$('#myModal_Behavior').modal('show');
|
||||
|
@ -160,24 +171,27 @@ function behaviorFinish() {
|
|||
var plugin = $("input[name='plugin']:checked").val();
|
||||
var method = $("input[name='method']:checked").val();
|
||||
if (plugin != null && plugin != "" && method != null && method != "") {
|
||||
show(plugin, method);
|
||||
showPluginMethod(plugin, method);
|
||||
} else {
|
||||
alert("The plugin or the method shouldn't be null!");
|
||||
$('#myModal_Behavior').modal('hide');
|
||||
}
|
||||
}
|
||||
|
||||
function show(plugin, method) {
|
||||
function showPluginMethod(plugin, method) {
|
||||
var behaviorData = plugin + "." + method;
|
||||
pluginMethodList.push(behaviorData);
|
||||
$('#myModal_Behavior').modal('hide');
|
||||
|
||||
var div = document.createElement("div");
|
||||
var p = document.createElement("p");
|
||||
var i = document.createElement("i");
|
||||
var textNode = document.createTextNode(behaviorData);
|
||||
i.setAttribute("class", "icon-hand-right");
|
||||
p.setAttribute("class", index);
|
||||
p.setAttribute("onClick", "showMethodDocument(this)");// loadMethodParams
|
||||
p.setAttribute("style", "cursor:pointer;");
|
||||
p.appendChild(i);
|
||||
p.appendChild(textNode);
|
||||
div.appendChild(p);
|
||||
|
||||
|
@ -282,7 +296,7 @@ function loadMethodParams(behaviorData, behaviorIndex) {
|
|||
+ behaviorIndex
|
||||
+ "' class='hide'><p class='hide'>"
|
||||
+ behaviorData
|
||||
+ "</p><div class='span12 box' style='margin-left:-5px;'>"
|
||||
+ "</p><div class='span12 box' style='margin-left:-2px;'>"
|
||||
+ boxHeader
|
||||
+ "<div class='box-content'>"
|
||||
+ fieldHTML
|
||||
|
@ -614,8 +628,15 @@ function submitBehaviors(selectedNode) {
|
|||
return;
|
||||
}
|
||||
for (var i = 0; i < pluginChoosedList.length; i++) {
|
||||
var usePluginModel = new UsePluginModel(i, pluginChoosedList[i],
|
||||
new Array());
|
||||
var id = pluginChoosedList[i].split("_")[0];
|
||||
var name = "";
|
||||
var parameters = new Array();
|
||||
if (id == "http") {
|
||||
name = "Http";
|
||||
} else if (id == "timer") {
|
||||
name = "ConstantTimer";
|
||||
}
|
||||
var usePluginModel = new UsePluginModel(id, name, parameters);
|
||||
usePluginList.push(usePluginModel);
|
||||
}
|
||||
var scriptModel = new PluginEditScriptRequestModel(behaviors,
|
||||
|
@ -632,7 +653,7 @@ function submitBehaviors(selectedNode) {
|
|||
return;
|
||||
}
|
||||
data = data.data;
|
||||
alert(data);
|
||||
window.location.replace("script.jsp");
|
||||
},
|
||||
error : function(request, status, error) {
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue