3 "name": "Pman.Dialog.CmsCategory",
5 "title": "Cms - Category Edit",
6 "path": "/home/alan/gitlive/Pman.Cms/Pman.Dialog.CmsCategory.bjs",
9 "xtype": "LayoutDialog",
14 "title": "Edit Category",
22 "xtype": "LayoutRegion",
29 "xtype": "LayoutRegion",
39 "xtype": "ContentPanel",
48 "|actionfailed": "function (_self, action)\n{\n _this.dialog.el.unmask();\n Pman.standardActionFailed(_self, action);\n}\n",
49 "|actioncomplete": "function (_self, action)\n{\n \n if (action.type =='submit') {\n \n _this.dialog.el.unmask();\n _this.dialog.hide();\n \n if (_this.callback) {\n _this.callback.call(_this, _this.form.getValues());\n }\n _this.form.reset();\n return;\n }\n if (action.type = 'setdata') {\n if (_this.data.id) {\n _this.dialog.el.mask(\"Loading\");\n this.load({ method: 'GET', params: { '_id' : _this.data.id }});\n return;\n }\n _this.grid.getDataSource().load();\n return;\n }\n if (action.type == 'load') {\n _this.grid.getDataSource().load();\n _this.dialog.el.unmask();\n return;\n }\n \n \n \n}\n",
50 "|rendered": "function (_self)\n{\n _this.form = _self;\n}\n"
53 "style": "margin: 5px",
55 "|url": "baseURL + '/Roo/Category.php'",
59 "fieldLabel": "Parent",
60 "name": "parent_id_title",
68 "fieldLabel": "Title",
76 "displayField": "name",
78 "emptyText": "Select Type",
80 "forceSelection": true,
81 "hiddenName": "category_type_id",
83 "loadingText": "Searching...",
85 "name": "category_type_id_name",
87 "qtip": "Select cms_category_type",
88 "selectOnFocus": true,
89 "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
90 "triggerAction": "all",
102 "|sortInfo": "{ direction : 'ASC', field: 'id' }",
104 "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
109 "xtype": "HttpProxy",
112 "|url": "baseURL + '/Roo/cms_category_type.php'"
116 "xtype": "JsonReader",
120 "totalProperty": "total",
121 "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]"
128 "fieldLabel": "Visible",
149 "xtype": "GridPanel",
152 "fitContainer": true,
153 "tableName": "Images",
156 "|activate": "function() {\n _this.panel = this;\n if (_this.grid) {\n //_this.grid.footer.onClick('first');\n }\n}"
164 "autoExpandColumn": "filename",
167 "|render": "function() { \n _this.grid = this; \n //_this.dialog = Pman.Dialog.FILL_IN\n if (_this.panel.active) {\n //this.footer.onClick('first');\n }\n}"
172 "*prop": "dataSource",
174 "|reader": "Pman.Readers.Images",
176 "|beforeload": "function (_self, o)\n{\n if (!_this.data.id) {\n return false;\n } \n o.params = o.params || {};\n o.params.onid = _this.data.id;\n o.params.ontable = 'Category';\n}"
182 "xtype": "HttpProxy",
184 "|url": "baseURL + '/Roo/Images.php'",
199 "cls": "x-btn-text-icon",
200 "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
202 "|click": "function()\n {\n Pman.Dialog.Image.show( { id : 0, onid: _this.data.id, ontable: 'Category' }, function(data) {\n _this.grid.getDataSource().load();\n Pman.Dialog.CmsImage.show(data, function() {\n _this.grid.getDataSource().load();\n }); \n \n \n }); \n\n }\n "
209 "cls": "x-btn-text-icon",
210 "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
212 "|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 var data = _this.grid.getDataSource().getById(s[0].data.id).data;\n Pman.Dialog.CmsImage.show(data, function() {\n _this.grid.getDataSource().load();\n }); \n \n }\n "
218 "cls": "x-btn-text-icon",
219 "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
222 "|click": "function()\n {\n Pman.genericDelete(_this, _this.panel.tableName); \n }\n "
229 "xtype": "ColumnModel",
233 "|renderer": "function(v,x,r) { return String.format('<img src=\"{0}/Images/Thumb/100/{1}/{2}\">', baseURL, v, r.data.filename); }",
236 "*prop": "colModel[]"
239 "xtype": "ColumnModel",
240 "header": "Filename",
242 "dataIndex": "filename",
243 "|renderer": "function(v,x,r) { return String.format('{0}<br/><i qtip=\"{1}\">{1}</i>', v, r.data.linkurl); }",
246 "*prop": "colModel[]"
257 "|click": " function() {\n\n _this.form.reset();\n\n _this.dialog.hide();\n\n }\n"
266 "|click": " function() {\n\n _this.dialog.el.mask(\"Saving\");\n\n _this.form.doAction(\"submit\");\n\n }\n"