Pman.Tab.BuilderTree.bjs
[Pman.Builder] / Pman.Tab.BuilderTree.bjs
1 {
2     "id": "roo-file-84",
3     "name": "Pman.Tab.BuilderTree",
4     "parent": "Pman.Tab.BuilderTab",
5     "title": "Pman.Tab.BuilderTree",
6     "path": "/home/alan/gitlive/Pman.Builder/Pman.Tab.BuilderTree.bjs",
7     "items": [
8         {
9             "region": "west",
10             "xtype": "NestedLayoutPanel",
11             "|xns": "Roo",
12             "items": [
13                 {
14                     "|xns": "Roo",
15                     "xtype": "BorderLayout",
16                     "*prop": "layout",
17                     "items": [
18                         {
19                             "|xns": "Roo",
20                             "xtype": "LayoutRegion",
21                             "*prop": "center"
22                         },
23                         {
24                             "*prop": "south",
25                             "height": 300,
26                             "split": true,
27                             "xtype": "LayoutRegion",
28                             "|xns": "Roo"
29                         },
30                         {
31                             "listeners": {
32                                 "activate": "function (_self)\n{\n    \n    _this.tree = _self.tree;\n    _this.menu = _self.menu;\n\n    if (_this.hasMouseEvent) {\n        return;\n    }\n    \n    _this.hasMouseEvent = true;\n     this.el.on('mouseover', function() { _this.isMouseOver= true; });\n    this.el.on('mouseout', function() { _this.isMouseOver = false; });\n\n}"
33                             },
34                             "region": "center",
35                             "xtype": "TreePanel",
36                             "|xns": "Roo",
37                             "items": [
38                                 {
39                                     "listeners": {
40                                         "beforenodedrop": "function (e)\n{\n    \n    return Pman.Builder.Tree.handleDropNode(e);      \n\n}",
41                                         "click": "function (node, e)\n{\n      e.preventDefault();\n                       // console.log(e.button);\n        Pman.Builder.Tree.setCurrentNode(node);\n        \n    \n        \n\n}",
42                                         "contextmenu": "function (node, e)\n{\n    e.stopEvent();\n        \n    this.getSelectionModel().select(node);\n     Pman.Builder.Tree.setCurrentNode(node);\n     \n          _this.menu = Roo.factory(_this.menu);\n\n        _this.menu.show(node.ui.textNode, 'tr');\n     return;\n     \n     /*\n    var xt = node.elConfig.xtype;\n    var altx= false;\n    if (typeof(node.elConfig['*prop']) != 'undefined') {\n        altx = node.parentNode.elConfig.xtype +'.' + node.elConfig['*prop'];\n    }\n    var mn = Pman.Tab.BuilderPalete.getMenu(xt,altx);\n    \n    \n    if (mn) {\n        mn.show(e.getTarget());\n    }\n    \n */\n\n}",
43                                         "nodedragover": "function (e)\n{\n    \n        return Pman.Builder.Tree.handleDragOver(e);      \n \n     \n   \n}   \n    "
44                                     },
45                                     "*prop": "tree",
46                                     "animate": false,
47                                     "containerScroll": true,
48                                     "ddGroup": "component",
49                                     "enableDD": true,
50                                     "rootVisible": true,
51                                     "xtype": "TreePanel",
52                                     "|renderer": "function(n) { return n.text; }",
53                                     "|xns": "Roo.tree",
54                                     "items": [
55                                         {
56                                             "|xns": "Roo.tree",
57                                             "xtype": "DefaultSelectionModel",
58                                             "*prop": "sm"
59                                         },
60                                         {
61                                             "*prop": "root",
62                                             "text": "Part",
63                                             "xtype": "TreeNode",
64                                             "|elConfig": "function() {\n    return  {\n         xtype : '*top',\n            \n            app : 'TestApp',\n            // perm\n            // permtype\n            modkey : 0,\n            '|module' :  '',\n            region : 'center',\n            '|parent' : 'Pman',\n            name : \"Module Name\",\n            items: [] \n\n    \n    }\n}\n",
65                                             "|xns": "Roo.tree"
66                                         }
67                                     ]
68                                 },
69                                 {
70                                     "|xns": "Roo.menu",
71                                     "xtype": "Menu",
72                                     "*prop": "menu",
73                                     "items": [
74                                         {
75                                             "listeners": {
76                                                 "click": "function (_self)\n{\n    \n    var str = Pman.Builder.Tree.currentNodeType();\n    if (typeof(Pman.Builder.Wizard[str]) == 'undefined') {\n        Roo.MessageBox.alert(\"Sorry\", \"No wizard exists for \" + str);\n        return;\n    }\n    var cn = Pman.Builder.Tree.currentNode;\n    if (typeof(cn.elConfig['.builderCfg']) == 'undefined') {\n        Roo.MessageBox.alert(\"Sorry\", \"No configuration exists for \" + str);\n        return;\n    }\n    var cfg = Roo.decode(cn.elConfig['.builderCfg']);\n    Roo.log(cfg);\n    \n    \n   \n   \n        \n}"
77                                             },
78                                             "text": "Edit Using Wizard",
79                                             "xtype": "Item",
80                                             "|xns": "Roo.menu"
81                                         },
82                                         {
83                                             "|xns": "Roo.menu",
84                                             "xtype": "Separator"
85                                         },
86                                         {
87                                             "listeners": {
88                                                 "click": "function (_self)\n{\n    Roo.MessageBox.confirm(\"Confirm\", \"Are you sure you want to delete that node?\",\n        function(r) {\n            if (r!='yes') {\n                return;\n            }\n           Pman.Builder.Tree.deleteCurrent();\n        }\n    );\n        \n}"
89                                             },
90                                             "text": "Delete Node",
91                                             "xtype": "Item",
92                                             "|xns": "Roo.menu"
93                                         },
94                                         {
95                                             "text": "Save as template",
96                                             "xtype": "Item",
97                                             "|xns": "Roo.menu"
98                                         }
99                                     ]
100                                 }
101                             ]
102                         }
103                     ]
104                 }
105             ]
106         }
107     ],
108     "permname": "",
109     "modOrder": "001"
110 }