{
- "id": "roo-file-95",
+ "id": "roo-file-200",
"name": "Pman.Tab.BuilderTree",
"parent": "Pman.Tab.BuilderTab",
"title": "Pman.Tab.BuilderTree",
- "path": "/home/alan/gitlive/Pman.Builder/Pman.Tab.BuilderTree.bjs",
+ "path": "/home/edward/gitlive/Pman.Builder/Pman.Tab.BuilderTree.bjs",
"items": [
{
"region": "west",
},
{
"listeners": {
- "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}"
+ "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}"
},
"region": "center",
"xtype": "TreePanel",
{
"listeners": {
"beforenodedrop": "function (e)\n{\n \n return Pman.Builder.Tree.handleDropNode(e); \n\n}",
- "click": "function (node, e)\n{\n e.preventDefault();\n // console.log(e.button);\n Pman.BuilderTree.setCurrentNode(node);\n \n \n \n\n}",
+ "click": "function (node, e)\n{\n e.preventDefault();\n // console.log(e.button);\n Pman.Builder.Tree.setCurrentNode(node);\n \n \n \n\n}",
"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}",
"nodedragover": "function (e)\n{\n \n return Pman.Builder.Tree.handleDragOver(e); \n \n \n \n} \n "
},
"rootVisible": true,
"xtype": "TreePanel",
"|renderer": "function(n) { return n.text; }",
- "|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}",
"|xns": "Roo.tree",
"items": [
{
"items": [
{
"listeners": {
- "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}"
+ "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 \n \n var cfg = Roo.decode(cn.elConfig['.builderCfg']);\n \n Roo.log(cfg);\n Pman.Dialog.BuilderAddTable.show( \n cfg, \n function(data) {\n\n \n var res = Pman.Builder.Wizard[str](data); // with old..\n Pman.Builder.Tree.replaceCurrentNode( res );\n Pman.Tab.BuilderView.panel.redraw();\n \n }\n );\n\n \n // otherwise, call back with template??\n \n \n \n \n}"
+ },
+ "text": "Edit Using Wizard",
+ "xtype": "Item",
+ "|xns": "Roo.menu"
+ },
+ {
+ "|xns": "Roo.menu",
+ "xtype": "Separator"
+ },
+ {
+ "listeners": {
+ "click": "function (_self)\n{\n \n \n Pman.Builder.Tree.collapseToggle();\n \n}"
+ },
+ "text": "Toggle Collapse",
+ "xtype": "Item",
+ "|xns": "Roo.menu"
+ },
+ {
+ "listeners": {
+ "click": "function (_self)\n{\n \n \n Pman.Builder.Tree.createSharedPart();\n \n}"
+ },
+ "text": "Create shared part from this node",
+ "xtype": "Item",
+ "|xns": "Roo.menu"
+ },
+ {
+ "|xns": "Roo.menu",
+ "xtype": "Separator"
+ },
+ {
+ "listeners": {
+ "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}"
},
"text": "Delete Node",
"xtype": "Item",