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",
10 "xtype": "NestedLayoutPanel",
15 "xtype": "BorderLayout",
20 "xtype": "LayoutRegion",
27 "xtype": "LayoutRegion",
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}"
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.BuilderTree.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 "
47 "containerScroll": true,
48 "ddGroup": "component",
52 "|dupeNode": " function(node)\n {\n var cfg = this.cloneConfig(node.elConfig);\n \n var newNode = new Roo.tree.TreeNode(\n {\n id: Roo.id(),\n text: this.configToText(cfg)\n });\n \n newNode.elConfig = cfg;\n node.eachChild(function(n) {\n newNode.appendChild(this.dupeNode(n));\n },this);\n \n return newNode;\n \n }",
53 "|loadBJS": "function(module, part) {\n var _t = this;\n new Pman.Request({\n url : baseURL + '/Roo/Builder_part.php',\n method : 'GET',\n params : {\n _id : part\n },\n success : function(res) \n {\n // data is in.. \n Roo.log(res);\n \n if (!res.data.json.length) {\n var cfg = _t.defaultElConfig();\n cfg.name = Pman.Tab.BuilderTop.filesel.lastData.name;\n cfg.part = Pman.Tab.BuilderTop.filesel.lastData.name;\n cfg.module = '';\n _t.loadTree(cfg);\n return;\n \n }\n \n _t.loadTree(JSON.parse(res.data.json));\n \n \n }\n\n }) \n \n \n \n}\n",
54 "|loadTree": "function(o) {\n this.clearAll();\n this.root.elConfig = o;\n this.root.setText(this.configToText(this.root.elConfig));\n this.appendNode(this.root, o.items[0]);\n this.root.expand(true);\n Pman.Tab.BuilderView.panel.redraw();\n this.setCurrentNode(this.root,true);\n}\n",
55 "|nodeXtype": "function(n) {\n if (!n) {return ''; }\n var xt = n.elConfig.xtype || '';\n var xns= n.elConfig['|xns'] || '';\n xns += xns.length ? '.' : '';\n return xns + xt;\n}\n",
56 "|renderer": "function(n) { return n.text; }",
57 "|setCurrentNode": "function(node,select) {\n this.currentNode = node || this.root;\n \n //Pman.Tab.BuilderView.highlightElement(this.currentNode);\n\n var p = Pman.Tab.BuilderProps.grid;\n if (p) { //may not be ready yet..\n p.setCurrrentNode(this.currentNode);\n }\n \n \n this.currentNode.setText(this.configToText(this.currentNode.elConfig));\n \n if (select) { //&& node !== this.tree.root) {\n if (this.currentNode !== this.root) {\n this.currentNode.ensureVisible();\n } \n this.currentNode.expand(false,false);\n this.currentNode.select();\n\t}\n\t// update palete..\n\tPman.Tab.BuilderPalette.grid.getSelectionModel().clearSelections();\n\tPman.Tab.BuilderPalette.grid.view.refresh();\n\n}\n",
58 "|toJS": " function(n)\n{\n if (!n) {\n return this.toJS(this.root);\n }\n var _this = this;\n var ret = this.cloneConfig(n.elConfig);\n if (n.childNodes.length) {\n ret.items = [];\n n.eachChild(function(cn) {\n ret.items.push(_this.toJS(cn));\n });\n \n }\n return ret;\n \n \n}",
63 "xtype": "DefaultSelectionModel",
70 "|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",
82 "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 _this.tree.deleteCurrent();\n }\n );\n \n}"
84 "text": "Delete Node",
89 "text": "Save as template",