Ext Js4.2 tree drag and drop
트리 드래그 앤 드롭
HTML
<link rel="stylesheet" href="http://cdn.sencha.io/ext-4.2.0-gpl/resources/css/ext-all.css">
<div id="treeList"></div>
<div id="treeList2"></div>
JavaScript
Ext.require(['*']);
Ext.onReady(function(){
var store = Ext.create('Ext.data.TreeStore', {
id: 'store',
proxy: {
data :
[{
"id": 1,
"text": "페이지1",
"leaf": false,
"expanded": true,
"children":[]
}, {
"id": 2,
"text": "페이지2",
"leaf": true,
"expanded": true,
"children":[]
}, {
"id": 3,
"text": "페이지3",
"leaf": true,
"expanded": true,
"children":[]
}, {
"id": 4,
"text": "페이지4",
"leaf": true,
"expanded": true,
"children":[]
}, {
"id": 5,
"text": "페이지5",
"leaf": true,
"expanded": true,
"children":[]
}, {
"id": 6,
"text": "페이지6",
"leaf": true,
"expanded": true,
"children":[]
}, {
"id": 7,
"text": "페이지7",
"leaf": true,
"expanded": true,
"children":[]
}, {
"id": 8,
"text": "페이지8",
"leaf": true,
"expanded": true,
"children":[]
}],
type:'memory',
reader:{
type:'json'
}
},
root: {
text: "ROOT",
id: "ROOT",
expanded: true
}
});
var tree = Ext.create('Ext.tree.Panel', {
id: 'tree',
rootVisible: true,
multiSelect: true,
store: store,
height: 300,
viewConfig: {
plugins: {
ptype: 'treeviewdragdrop',
enableDrag:...