{ "id": "roo-file-150", "name": "Pman.Tab.AdminTypesCompany", "parent": "Pman.Tab.AdminTypes", "title": "Pman.Tab.AdminTypesCompany", "path": "/home/alan/gitlive/Pman.Admin/Pman.Tab.AdminTypesCompany.bjs", "items": [ { "listeners": { "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n _this.grid.footer.onClick('first');\n }\n}" }, "background": true, "fitContainer": true, "fitToframe": true, "region": "center", "tableName": "core_company_type", "title": "Company Types", "xtype": "GridPanel", "|xns": "Roo", "items": [ { "listeners": { "|render": "function() \n{\n _this.grid = this; \n _this.dialog = Pman.Dialog.AdminGenericName;\n if (_this.panel.active) {\n this.footer.onClick('first');\n }\n}", "|rowdblclick": "function (_self, rowIndex, e)\n{\n if (!_this.dialog) return;\n _this.dialog.show({\n id : this.getDataSource().getAt(rowIndex).data.id,\n _title : \"Edit Company Type\",\n _table : _this.panel.tableName\n }, function() {\n _this.grid.footer.onClick('first');\n }); \n}\n" }, "*prop": "grid", "autoExpandColumn": "name", "loadMask": true, "xtype": "Grid", "|xns": "Roo.grid", "items": [ { "*prop": "dataSource", "xtype": "Store", "remoteSort": true, "|sortInfo": "{ field : 'name', direction: 'ASC' }", "|xns": "Roo.data", "items": [ { "*prop": "proxy", "method": "GET", "xtype": "HttpProxy", "|url": "baseURL + '/Roo/core_company_type.php'", "|xns": "Roo.data" }, { "|xns": "Roo.data", "xtype": "JsonReader", "totalProperty": "total", "root": "data", "*prop": "reader", "id": "id", "|fields": "[\n {\n 'name': 'id',\n 'type': 'int'\n },\n {\n 'name': 'name',\n 'type': 'string'\n }\n]" } ] }, { "*prop": "footer", "xtype": "PagingToolbar", "pageSize": 25, "displayInfo": true, "displayMsg": "Displaying core_image_type{0} - {1} of {2}", "emptyMsg": "No core_image_type found", "|xns": "Roo" }, { "*prop": "toolbar", "xtype": "Toolbar", "|xns": "Roo", "items": [ { "listeners": { "|click": "function()\n{\n if (!_this.dialog) return;\n _this.dialog.show( { \n id : 0,\n _title : \"Add Company Type\",\n _table : _this.panel.tableName\n } , function() {\n _this.grid.footer.onClick('first');\n }); \n}\n" }, "cls": "x-btn-text-icon", "text": "Add", "xtype": "Button", "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'", "|xns": "Roo.Toolbar" }, { "listeners": { "|click": "function()\n{\n var s = _this.grid.getSelectionModel().getSelections();\n if (!s.length || (s.length > 1)) {\n Roo.MessageBox.alert(\"Error\", s.length ? \"Select only one Row\" : \"Select a Row\");\n return;\n }\n if (!_this.dialog) return;\n _this.dialog.show({\n id : s[0].data.id,\n _title : \"Edit Company Type\",\n _table : _this.panel.tableName\n }, function() {\n _this.grid.footer.onClick('first');\n }); \n \n}\n" }, "cls": "x-btn-text-icon", "text": "Edit", "xtype": "Button", "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'", "|xns": "Roo.Toolbar" }, { "listeners": { "|click": "function()\n{\n Pman.genericDelete(_this, 'core_company_type'); \n}\n " }, "cls": "x-btn-text-icon", "text": "Delete", "xtype": "Button", "|icon": "rootURL + '/Pman/templates/images/trash.gif'", "|xns": "Roo.Toolbar" } ] }, { "xtype": "ColumnModel", "header": "Name", "width": 200, "dataIndex": "name", "|renderer": "function(v) { return String.format('{0}', v); }", "|xns": "Roo.grid", "*prop": "colModel[]" } ] } ] } ], "permname": "", "modOrder": "001" }