php7 fixes
[Pman.Builder] / Pman.Tab.BuilderProps.bjs
index d3c3f0d..c234013 100644 (file)
@@ -44,7 +44,7 @@
                         },
                         {
                             "listeners": {
-                                "click": "function (_self, e)\n{\n \n     var rc = _this.grid.getSelectionModel().getSelectedCell();\n     var n = _this.grid.getDataSource().getAt(rc[0]).data.name;\n     if (n == 'xtype') {\n        return;\n    }\n    if (n[0] == '!') {\n        delete _this.grid.currentNode.elConfig.listeners[n.substring(1)];\n    } else {\n        delete _this.grid.currentNode.elConfig[n];\n    }\n    // reloads      \n    _this.grid.setCurrrentNode(_this.grid.currentNode);\n    var bp = Pman.Tab.BuilderView.panel;\n    bp.redraw.defer(100,bp, [true]);\n    // update the tree's  text\n    _this.grid.currentNode.setText(\n        Pman.Builder.Tree.configToText(_this.grid.currentNode.elConfig)\n    );\n}"
+                                "click": "function (_self, e)\n{\n \n     var rc = _this.grid.getSelectionModel().getSelectedCell();\n     var n = _this.grid.getDataSource().getAt(rc[0]).data.name;\n     if (n == 'xtype') {\n        return;\n    }\n    if (n[0] == '!') {\n        try{\n            delete _this.grid.currentNode.elConfig.listeners[n.substring(1)]; \n        }catch(err){\n            delete _this.grid.currentNode.elConfig[n];\n            Roo.log(err);\n        }\n        \n    } else {\n        delete _this.grid.currentNode.elConfig[n];\n    }\n    // reloads      \n    _this.grid.setCurrrentNode(_this.grid.currentNode);\n    var bp = Pman.Tab.BuilderView.panel;\n    bp.redraw.defer(100,bp, [true]);\n    // update the tree's  text\n    _this.grid.currentNode.setText(\n        Pman.Builder.Tree.configToText(_this.grid.currentNode.elConfig)\n    );\n}"
                             },
                             "text": "Delete Property / Event",
                             "xtype": "Item",
@@ -59,7 +59,7 @@
                     "items": [
                         {
                             "listeners": {
-                                "click": "function (_self, e)\n{\n \n    // show a dialog to select property??\n    // or should we add a line and get clever with pulldowns..\n    var ec = _this.grid.currentNode.elConfig;\n    Pman.Dialog.BuilderProp.show({\n            xtype : ec.xtype  || '',\n            xns: ec['|xns'] || '',\n            list: 'props'\n    }, function (n,val) {\n        ec[n] = val || '';\n        _this.grid.setCurrrentNode(_this.grid.currentNode);\n        var bp = Pman.Tab.BuilderView.panel;\n        bp.redraw.defer(100,bp, [true]);\n        // update the tree's  text\n        _this.grid.currentNode.setText(\n            Pman.Builder.Tree.configToText(_this.grid.currentNode.elConfig)\n        );\n    });\n}"
+                                "click": "function (_self, e)\n{\n \n    // show a dialog to select property??\n    // or should we add a line and get clever with pulldowns..\n    var ec = _this.grid.currentNode.elConfig;\n\n    Pman.Dialog.BuilderProp.show({\n            xtype : ec.xtype  || '',\n            xns: ec['|xns'] || '',\n            list: 'props'\n    }, function (n,val) {\n        ec[n] = val || '';\n        _this.grid.setCurrrentNode(_this.grid.currentNode);\n        var bp = Pman.Tab.BuilderView.panel;\n        bp.redraw.defer(100,bp, [true]);\n        // update the tree's  text\n        _this.grid.currentNode.setText(\n            Pman.Builder.Tree.configToText(_this.grid.currentNode.elConfig)\n        );\n    });\n}"
                             },
                             "text": "Add Property",
                             "xtype": "Item",