var tree1 = new DialogTree({
templatePath : 'productTemplate.html',
ajaxPath : 'data.html',
selectType : '0',
onselected : function(treeObj) {}
});
$('#showTree1').click(function(){
tree1.registeTree({
title : '选择[产品1]',
id : '#demo1 #productId',
name : '#demo1 #productName'
});
});
var tree2 = new DialogTree({
templatePath : 'productTemplate.html',
ajaxPath : 'data.html',
selectType : '0',
weebox : {width: 700},
simpletree : {autoclose: true},
onselected : function(treeObj) {}
});
$('#showTree2').click(function(){
tree2.registeTree({
title : '选择[产品2]',
id : '#demo2 #productId',
name : '#demo2 #productName'
});
});
templatePath:模版路径
ajaxPath:数据源路径
selectType:哪个节点类型才是返回值
weebox:自定义weebox插件属性
simpletree:自定义simpletree插件属性
title:打开对话框的名称
id:显示树中节点的ID属性
name:显示树中节点的NAME属性