add behaviorFinish() function in plugin-new.js and modify plugin.css

This commit is contained in:
zhengyingying 2014-03-24 21:49:25 +08:00
parent c4bae962ab
commit 021ee6dd97
2 changed files with 26 additions and 8 deletions

View File

@ -31,6 +31,13 @@ a:hover {
margin-left: 0px;
}
table, th, td,thead,tbody
{
border: 1px solid #FFE37E;
width:40px;
height:18px;
}
.sample_frame {
margin-bottom: 0px;
border: #3689BB solid thin;
@ -42,8 +49,11 @@ a:hover {
margin-bottom: 5px;
margin-left: 10px;
margin-right: 10px;
padding-top:10px;
}
.listArea {
height: 340px;
margin-bottom: 15px;
@ -67,7 +77,12 @@ a:hover {
padding-left: 20px;
}
#pluginMethod{
padding-top: 10px;
padding-left: 20px;
}
p,a{
color: #4E9BCB;
border-bottom: 1px solid #F0ECE0;
/* border-bottom: 1px solid #F0ECE0; */
}

View File

@ -158,9 +158,15 @@ $('#insertPluginAreaPlugins').click(function() {
var item = $("input[type='radio']:checked").val();
showInsertPlugin(item);
});
function show(selectedNode) {
var node = selectedNode.nextSibling.firstChild;
var behaviorData = node.nodeValue;
function behaviorFinish(){
var plugin = $("input[name='plugin']:checked").val();
var method = $("input[name='method']:checked").val();
show(plugin,method);
}
function show(plugin,method) {
var behaviorData = plugin+"."+method;
$('#myModal_Behavior').modal('hide');
@ -262,10 +268,9 @@ function loadMethodParams(behaviorData, behaviorIndex) {
fieldHTML += createCheckBox(methodParamModel,
rows, behaviorIndex);
}
// alert(fieldHTML);
}
boxHeader = "<div class='box-header well ' data-original-title> "
boxHeader = "<div class='box-header well' data-original-title> "
+ "<i class='icon-pencil' style='float:left'></i>"
+ "<h2>sample:<i>"
+ behaviorData
@ -360,7 +365,6 @@ function addField(size, addId) {
if (document.getElementById("addFieldTable_" + addId).childNodes.length == 0) {
field = 0;
}
// alert("addId:"+addId+",field:"+field);
var data = "field_" + field + ":";
field = field + 1;
var newTrNode = document.createElement("tr");
@ -557,7 +561,6 @@ function uploadBehavior(selectedNode) {
for ( var i = 0; i < length; i++) {
var node = div[i];
alert("node=" + $(node).attr("class"));
if ($(node).attr("class") == "Field sample_frame") {
fieldList += $(node).find("input").val() + ",";
} else if ($(node).attr("class") == "MultiField sample_frame") {