3 "name": "Pman.Dialog.AdminCoreEnum",
6 "path": "/home/alan/gitlive/Pman.Admin/Pman.Dialog.AdminCoreEnum.bjs",
10 "title": "Pulldown Options",
12 "xtype": "LayoutDialog",
17 "xtype": "LayoutRegion",
22 "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n // _this.grid.footer.onClick('first');\n }\n}"
28 "tableName": "core_enum",
29 "title": "Pulldown Options",
35 "|render": "function() \n{\n _this.grid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.panel.active) {\n // this.footer.onClick('first');\n }\n}",
36 "afteredit": "function (e)\n{\n e.record.commit(); \n}",
37 "cellclick": "function (_self, rowIndex, columnIndex, e)\n{\n\n var di = this.colModel.getDataIndex(columnIndex);\n if (di != 'active') {\n return;\n }\n \n var rec = _this.grid.ds.getAt(rowIndex);\n \n rec.set('active', rec.data.active ? 0 : 1);\n rec.commit();\n \n \n}",
38 "beforeedit": "function (e)\n{\n if(e.field == 'name' && e.record.data.is_system_enum*1 == 1){\n return false;\n }\n}"
41 "autoExpandColumn": "display_name",
44 "xtype": "EditorGrid",
49 "beforeload": "function (_self, options)\n{\n if (!_this.etypeCombo) {\n return false;\n }\n options.params.etype = _this.etypeCombo.getValue();\n if (!options.params.etype.length) {\n return false;\n }\n}",
50 "update": "function (_self, record, operation)\n{\n if (operation != Roo.data.Record.COMMIT) {\n return;\n }\n // got commit..\n new Pman.Request({\n url : baseURL + '/Roo/Core_enum.php',\n method : 'POST',\n params : {\n id : record.data.id,\n etype : _this.etypeCombo.getValue(),\n name : record.data.name,\n active : record.data.active,\n seqid : record.data.seqid,\n display_name : record.data.display_name\n }, \n success : function(res) {\n //Roo.log(data);\n // update the ID if it's not set..\n if (record.data.id * 1 < 1) {\n record.set('id', res.data.id);\n }\n }\n });\n \n}"
52 "*prop": "dataSource",
55 "|sortInfo": "{ field : 'etype', direction: 'ASC' }",
62 "|url": "baseURL + '/Roo/core_enum.php'",
67 "xtype": "JsonReader",
68 "totalProperty": "total",
72 "|fields": "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'etype',\n 'type': 'string'\n },\n {\n 'name': 'name',\n 'type': 'string'\n },\n {\n 'name': 'active',\n 'type': 'int'\n },\n {\n 'name': 'seqid',\n 'type': 'int'\n }\n]"
78 "xtype": "PagingToolbar",
81 "displayMsg": "Displaying core_enum{0} - {1} of {2}",
82 "emptyMsg": "No core_enum found",
92 "|click": "function()\n{\n \n // if we do not have a selected type... - what should we show..?\n var et = _this.etypeCombo.getValue();\n var ds = _this.grid.getDataSource();\n if (!et) {\n Roo.MessageBox.alert(\"Error\", \"Select a pulldown\");\n return;\n }\n\n var add = ds.reader.newRow({ \n id: 0, \n display_name : '', \n name : '', \n etype: et, \n active: 1, \n seqid: 0\n });\n var r = ds.data.length;\n ds.insert(r , add); \n _this.grid.startEditing(r, 1); // name... \n}\n"
94 "cls": "x-btn-text-icon",
97 "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
101 "|xns": "Roo.Toolbar",
107 "*prop": "colModel[]",
109 "header": "Internal #",
111 "xtype": "ColumnModel",
112 "|renderer": "function(v) { return String.format('{0}', v); }",
116 "xtype": "ColumnModel",
120 "|renderer": "function(v) { return String.format('{0}', v); }",
122 "*prop": "colModel[]",
126 "xtype": "GridEditor",
131 "xtype": "TextField",
139 "*prop": "colModel[]",
140 "dataIndex": "display_name",
141 "header": "Display Name",
143 "xtype": "ColumnModel",
144 "|renderer": "function(v) { return String.format('{0}', v); }",
149 "xtype": "GridEditor",
154 "xtype": "TextField",
162 "*prop": "colModel[]",
163 "dataIndex": "active",
166 "xtype": "ColumnModel",
167 "|renderer": "function(v) { \n var state = v> 0 ? '-checked' : '';\n\n return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n \n }",
171 "*prop": "colModel[]",
172 "dataIndex": "seqid",
176 "xtype": "ColumnModel",
177 "|renderer": "function(v) { return String.format('{0}', v); }",
182 "xtype": "GridEditor",
187 "allowDecimals": false,
188 "allowNegative": true,
189 "decimalPrecision": 0,
190 "xtype": "NumberField",
202 "*prop": "buttons[]",
208 "*prop": "buttons[]",