level 1
xin_柒
楼主
Ext.onReady(function() {Ext.QuickTips.init();var mainPanel = new Ext.Panel({id : 'mainPanel',layout : 'border',renderTo : 'panel',height : 600,border : false,items : [ {id : 'leftPanel_filterInfo',region : 'west',collapsible : true,title : 'leftPanel_filterInfo',xtype : 'panel',width : 200,split : true,autoScroll : true}, {id : 'rightPanel',layout : 'border',region : 'center',border : false,// collapsible: true,// title: 'rightPanel',xtype : 'panel',autoScroll : true,items : [ {id : 'rightPanel_left_treeInfo',region : 'west',collapsible : true,title : 'rightPanel_left_treeInfo',xtype : 'panel',width : 200,split : true,autoScroll : true}, {id : 'rightPanel_right',layout : 'border',region : 'center',border : false,// collapsible: true,// title: 'rightPanel_right',xtype : 'panel',autoScroll : true,items : [ {id : 'rightPanel_right_showFieldInfo',region : 'north',collapsible : true,title : 'rightPanel_right_showFieldInfo',xtype : 'panel',height : 80,autoScroll : true}, {id : 'rightPanel_right_showFieldSQLInfo',region : 'center',collapsible : true,title : 'rightPanel_right_showFieldSQLInfo',xtype : 'panel',autoScroll : true,listeners : {beforeadd : function(n) {Ext.Msg.alert('进来东西', "ss111");}}
} ]} ]} ]});var treePanel = Ext.getCmp("rightPanel_left_treeInfo");var tree = new Ext.tree.TreePanel({ddGroup : 'drag',enableDrag : true,autoHeight : true,border : false,rootVisible : false,root : {expanded : true,text : '表单',children : [ {text : "输入框",leaf : true}, {text : "下拉选择框",leaf : true}, {text : "单选按钮",leaf : true}, {text : "多选按钮",leaf : true}, {text : "文本域",leaf : true} ]},listeners : {click : function(n) {Ext.Msg.alert('Navigation Tree Click', 'You clicked: "'+ n.attributes.text + '"');}}});treePanel.add(tree);var dragTarget = new Ext.dd.DropTarget(Ext.getCmp("rightPanel_right_showFieldSQLInfo").body, {ddGroup : 'drag',notifyDrop : function(ddSource, e, data) {Ext.Msg.alert(data.node.text);return true;}});mainPanel.doLayout();});
2013年05月14日 02点05分
1
} ]} ]} ]});var treePanel = Ext.getCmp("rightPanel_left_treeInfo");var tree = new Ext.tree.TreePanel({ddGroup : 'drag',enableDrag : true,autoHeight : true,border : false,rootVisible : false,root : {expanded : true,text : '表单',children : [ {text : "输入框",leaf : true}, {text : "下拉选择框",leaf : true}, {text : "单选按钮",leaf : true}, {text : "多选按钮",leaf : true}, {text : "文本域",leaf : true} ]},listeners : {click : function(n) {Ext.Msg.alert('Navigation Tree Click', 'You clicked: "'+ n.attributes.text + '"');}}});treePanel.add(tree);var dragTarget = new Ext.dd.DropTarget(Ext.getCmp("rightPanel_right_showFieldSQLInfo").body, {ddGroup : 'drag',notifyDrop : function(ddSource, e, data) {Ext.Msg.alert(data.node.text);return true;}});mainPanel.doLayout();});