3 "name": "Pman.Dialog.BuilderSourceEdit",
5 "title": "Source Code Editor",
6 "path": "/home/alan/gitlive/Pman.Builder/Pman.Dialog.BuilderSourceEdit.bjs",
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}"
17 "title": "Source Code Edit",
19 "xtype": "LayoutDialog",
23 "xtype": "LayoutRegion",
30 "xtype": "LayoutRegion",
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}"
41 "collapsedTitle": "Help / Manual",
45 "xtype": "ContentPanel",
56 "|rendered": "function (form)\n{\n _this.form = form;\n}"
62 "fieldLabel": "Enter Code for Function or Property",
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}"
69 "style": "font-family:monospace;",
77 "xtype": "ContentPanel",
82 "title": "Help / Manual",
90 "|click": "function (_self, e)\n{\n\n _this.dialog.hide();\n}"
96 "|click": "function (_self, e)\n{\n _this.callback.call(_this, {\n value : _this.form.findField('value').getValue()\n });\n _this.dialog.hide();\n}"