modify plugin.css and createTable function in pluign-new.js

This commit is contained in:
zhengyingying 2014-03-21 18:01:01 +08:00
parent a755c10d6c
commit c58867cc5b
2 changed files with 14 additions and 7 deletions

View File

@ -48,7 +48,6 @@ table, th, td,thead,tbody
#pluginArea{ #pluginArea{
width:280px; width:280px;
height:340px; height:340px;
border:solid #A0D0EC thin ;
margin-bottom:15px; margin-bottom:15px;
outline-style: outset; outline-style: outset;
@ -57,7 +56,6 @@ table, th, td,thead,tbody
#behaviorArea{ #behaviorArea{
width:280px; width:280px;
height:340px; height:340px;
border:solid #A0D0EC thin ;
margin-bottom:15px; margin-bottom:15px;
outline-style: inset; outline-style: inset;
} }

View File

@ -212,6 +212,7 @@ function loadMethodParams(behaviorData, behaviorIndex) {
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
methodParams.push(data[i]); methodParams.push(data[i]);
} }
alert(methodParams.length);
for (var j = 0; j < methodParams.length; j++) { for (var j = 0; j < methodParams.length; j++) {
var methodParamModel = new MethodParamModel( var methodParamModel = new MethodParamModel(
methodParams[j].name, methodParams[j].name,
@ -220,6 +221,10 @@ function loadMethodParams(behaviorData, behaviorIndex) {
methodParams[j].fieldSeperator, methodParams[j].fieldSeperator,
methodParams[j].paramType, methodParams[j].paramType,
methodParams[j].methodParamProperties); methodParams[j].methodParamProperties);
if(methodParamModel!=null){
alert("load methodParam...");
alert("name="+methodParamModel.name);
}
var methodParamProperties=new Array(); var methodParamProperties=new Array();
for(var q=0;q<methodParamModel.methodParamProperties.length;q++){ for(var q=0;q<methodParamModel.methodParamProperties.length;q++){
var methodParamPropertyModel=new MethodParamPropertyModel(methodParamModel.methodParamProperties[q].key,methodParamModel.methodParamProperties[q].value); var methodParamPropertyModel=new MethodParamPropertyModel(methodParamModel.methodParamProperties[q].key,methodParamModel.methodParamProperties[q].value);
@ -273,8 +278,12 @@ function loadMethodParams(behaviorData, behaviorIndex) {
+ "<div class='box-content'>" + "<div class='box-content'>"
+ fieldHTML + fieldHTML
+ "</div><div><button id='' type='submit' onClick='uploadBehavior(this);'>submit</button></div></div></div>"; + "</div><div><button id='' type='submit' onClick='uploadBehavior(this);'>submit</button></div></div></div>";
if(documentHtml==""){
alert("documentHtml is null");
}
document.getElementById("showPluginMethod").innerHTML += documentHtml; document.getElementById("showPluginMethod").innerHTML += documentHtml;
}); });
return
} }
// 创建一个label加一个input的域 // 创建一个label加一个input的域
@ -426,21 +435,21 @@ function createTable(methodParamModel, cols, behaviorIndex) {
* document.createTextNode(name); * document.createTextNode(name);
*/ */
var th = document.createElement("th"); var tr = document.createElement("tr");
var tr_content = document.createElement("tr"); var tr_content = document.createElement("tr");
for (var i = 0; i < table_content.length; i++) { for (var i = 0; i < table_content.length; i++) {
var td = document.createElement("td"); var th = document.createElement("th");
var text = document.createTextNode(table_content[i]); var text = document.createTextNode(table_content[i]);
var td_content = document.createElement("td"); var td_content = document.createElement("td");
var text_content = document.createTextNode(""); var text_content = document.createTextNode("");
td.appendChild(text); th.appendChild(text);
th.appendChild(td); tr.appendChild(td);
td_content.appendChild(text_content); td_content.appendChild(text_content);
tr_content.appendChild(td_content); tr_content.appendChild(td_content);
} }
var tableHead = th.innerHTML + tr_content.innerHTML; var tableHead = tr.innerHTML + tr_content.innerHTML;
var tableHtml = "<div class='Table sample_frame'id=" var tableHtml = "<div class='Table sample_frame'id="
+ behaviorIndex + behaviorIndex
+ "_" + "_"