php7 fixes
[Pman.Builder] / Pman.Dialog.BuilderSourceEdit.bjs
1 {
2     "id": "roo-file-77",
3     "name": "Pman.Dialog.BuilderSourceEdit",
4     "parent": "",
5     "title": "Source Code Editor",
6     "path": "/home/alan/gitlive/Pman.Builder/Pman.Dialog.BuilderSourceEdit.bjs",
7     "items": [
8         {
9             "listeners": {
10                 "|show": "function (dlg)\n{\n    _this.dialog = dlg;\n    _this.dialog.layout.getRegion('south').collapse();\n    \n    if (!_this.help) {\n       _this.dialog.layout.getRegion('south').showPanel(0);\n       _this.help = _this.dialog.layout.getRegion('south').getPanel(0).el.createChild( {tag: 'iframe',  src : Roo.rootURL + 'docs'});\n       \n    }\n    if (_this.isBuilder) {\n        return;\n    }\n\n    dlg.getLayout().beginUpdate();\n    var w = Roo.lib.Dom.getViewWidth();\n    var h = Roo.lib.Dom.getViewHeight();\n    dlg.resizeTo( w - 70, h - 70);\n    dlg.moveTo(35,35);\n    var val = _this.form.findField('value');\n    val.setSize(w-100, h-170);\n    dlg.getLayout().endUpdate();\n    this.setTitle('Callback for ' + _this.data.title);\n\n}"
11             },
12             "background": true,
13             "closable": false,
14             "collapsible": false,
15             "height": 500,
16             "modal": true,
17             "title": "Source Code Edit",
18             "width": 400,
19             "xtype": "LayoutDialog",
20             "|xns": "Roo",
21             "items": [
22                 {
23                     "xtype": "LayoutRegion",
24                     "*prop": "center",
25                     "titlebar": false,
26                     "listeners": {},
27                     "|xns": "Roo"
28                 },
29                 {
30                     "xtype": "LayoutRegion",
31                     "*prop": "south",
32                     "titlebar": true,
33                     "listeners": {
34                         "|resized": "function (_self, newSize)\n{\n    var sz = _this.dialog.size;\n    _this.form.findField('value').setSize(sz.width-30, sz.height- newSize  - 100);\n    if (_this.help && newSize > 21) {\n       _this.help.setSize(sz.width-25, newSize-28);\n    }\n}",
35                         "|collapsed": "function (_self)\n{\n    this.fireEvent('resized', this, 20);\n}",
36                         "|expanded": "function (_self)\n{\n   this.fireEvent('resized', this, this.getBox().height);\n}"
37                     },
38                     "height": 300,
39                     "collapsible": true,
40                     "split": true,
41                     "collapsedTitle": "Help / Manual",
42                     "|xns": "Roo"
43                 },
44                 {
45                     "xtype": "ContentPanel",
46                     "background": true,
47                     "fitToFrame": true,
48                     "region": "center",
49                     "listeners": {},
50                     "|xns": "Roo",
51                     "items": [
52                         {
53                             "xtype": "Form",
54                             "labelAlign": "top",
55                             "listeners": {
56                                 "|rendered": "function (form)\n{\n   _this.form = form;\n}"
57                             },
58                             "|xns": "Roo.form",
59                             "items": [
60                                 {
61                                     "name": "value",
62                                     "fieldLabel": "Enter Code for Function or Property",
63                                     "xtype": "TextArea",
64                                     "width": 360,
65                                     "height": 100,
66                                     "listeners": {
67                                         "|specialkey": "function (f, e)\n{\n    \n    function addStr(v) {\n        var fe = f.el.dom;\n        if (document.selection) { // IE\n            fe.focus();\n            var sel =document.selection.createRange();\n            sel.text = v;\n            return;\n        }\n        if (fe.selectionStart || fe.selectionStart == '0') {\n            var startPos = fe.selectionStart;\n            var endPos = fe.selectionEnd;\n            var restoreTop = fe.scrollTop;\n            fe.value = fe.value.substring(0, startPos) + \n                v + fe.value.substring(endPos, fe.value.length);\n            fe.selectionStart = startPos + v.length;\n            fe.selectionEnd = startPos + v.length;\n            if (restoreTop>0)  {\n                fe.scrollTop = restoreTop;\n            }\n            return;\n        }\n        fe.value += \"    \";\n    }\n    \n    if (e.getKey() == 9) {\n        addStr(\"    \");\n        e.stopEvent();\n    }\n    if (e.getKey() == 13) {\n        addStr(\"\\n    \");\n        e.stopEvent();\n    }\n\n}"
68                                     },
69                                     "style": "font-family:monospace;",
70                                     "|xns": "Roo.form"
71                                 }
72                             ]
73                         }
74                     ]
75                 },
76                 {
77                     "xtype": "ContentPanel",
78                     "background": true,
79                     "fitToFrame": true,
80                     "region": "south",
81                     "listeners": {},
82                     "title": "Help / Manual",
83                     "|xns": "Roo"
84                 },
85                 {
86                     "xtype": "Button",
87                     "|xns": "Roo",
88                     "text": "Cancel",
89                     "listeners": {
90                         "|click": "function (_self, e)\n{\n\n    _this.dialog.hide();\n}"
91                     },
92                     "*prop": "buttons[]"
93                 },
94                 {
95                     "listeners": {
96                         "|click": "function (_self, e)\n{\n    _this.callback.call(_this, {\n       value : _this.form.findField('value').getValue()\n    });\n    _this.dialog.hide();\n}"
97                     },
98                     "*prop": "buttons[]",
99                     "text": "OK",
100                     "xtype": "Button",
101                     "|xns": "Roo"
102                 }
103             ]
104         }
105     ],
106     "permname": "",
107     "modOrder": "001"
108 }