{
- "id": "roo-file-84",
+ "id": "roo-file-271",
"name": "Pman.Dialog.CmsCategory",
"parent": "",
"title": "Cms - Category Edit",
- "path": "/home/alan/gitlive/Pman.Cms/Pman.Dialog.CmsCategory.bjs",
+ "path": "/home/edward/gitlive/Pman.Cms/Pman.Dialog.CmsCategory.bjs",
"items": [
{
"xtype": "LayoutDialog",
"|xns": "Roo",
"items": [
{
- "xtype": "Form",
- "style": "margin: 5px",
- "|url": "baseURL + '/Roo/Category.php'",
- "method": "POST",
"listeners": {
"|actionfailed": "function (_self, action)\n{\n _this.dialog.el.unmask();\n Pman.standardActionFailed(_self, action);\n}\n",
- "|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 _this.grid.getDataSource().load();\n \n }\n}\n",
+ "|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",
"|rendered": "function (_self)\n{\n _this.form = _self;\n}\n"
},
+ "method": "POST",
+ "style": "margin: 5px",
+ "xtype": "Form",
+ "|url": "baseURL + '/Roo/Category.php'",
"|xns": "Roo.form",
"items": [
{
- "fieldLabel": "Parent ",
+ "fieldLabel": "Parent",
"name": "parent_id_title",
- "hiddenName": "parent_id",
- "qtip": "Select Parent ",
- "emptyText": "Select Parent ",
- "xtype": "ComboBox",
- "selectOnFocus": true,
+ "readOnly": true,
+ "width": 450,
+ "xtype": "TextField",
+ "|xns": "Roo.form"
+ },
+ {
+ "decimalPrecision": 0,
+ "fieldLabel": "Order (1 first)",
+ "name": "display_order",
+ "width": 50,
+ "xtype": "NumberField",
+ "|xns": "Roo.form"
+ },
+ {
+ "name": "title",
+ "fieldLabel": "Title",
+ "width": 450,
+ "xtype": "TextField",
+ "listeners": {},
+ "|xns": "Roo.form"
+ },
+ {
"allowBlank": true,
- "width": 300,
- "listWidth": 400,
- "editable": false,
- "displayField": "title",
- "valueField": "id",
- "typeAhead": true,
+ "displayField": "name",
+ "editable": "false",
+ "emptyText": "Select Type",
+ "fieldLabel": "Type",
"forceSelection": true,
- "triggerAction": "all",
- "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{title}</b> </div>",
- "queryParam": "query[title]",
+ "hiddenName": "category_type_id",
+ "listWidth": 200,
"loadingText": "Searching...",
"minChars": 2,
+ "name": "category_type_id_name",
"pageSize": 20,
- "listeners": {},
+ "qtip": "Select cms_category_type",
+ "selectOnFocus": true,
+ "tpl": "<div class=\"x-grid-cell-text x-btn button\"><b>{name}</b> </div>",
+ "triggerAction": "all",
+ "typeAhead": true,
+ "valueField": "id",
+ "width": 200,
+ "xtype": "ComboBox",
"|xns": "Roo.form",
"items": [
{
"*prop": "store",
"xtype": "Store",
- "|reader": "Pman.Readers.Category",
"|xns": "Roo.data",
+ "remoteSort": true,
+ "|sortInfo": "{ direction : 'ASC', field: 'id' }",
+ "listeners": {
+ "|beforeload": "function (_self, o){\n o.params = o.params || {};\n // set more here\n}\n"
+ },
"items": [
{
"*prop": "proxy",
"xtype": "HttpProxy",
- "|url": "baseURL + '/Roo/Category.php'",
"method": "GET",
- "|xns": "Roo.data"
+ "|xns": "Roo.data",
+ "|url": "baseURL + '/Roo/cms_category_type.php'"
+ },
+ {
+ "*prop": "reader",
+ "xtype": "JsonReader",
+ "|xns": "Roo.data",
+ "id": "id",
+ "root": "data",
+ "totalProperty": "total",
+ "|fields": "[{\"name\":\"id\",\"type\":\"int\"},{\"name\":\"name\",\"type\":\"string\"}]"
}
]
}
]
},
- {
- "name": "title",
- "fieldLabel": "Title",
- "width": 450,
- "xtype": "TextField",
- "listeners": {},
- "|xns": "Roo.form"
- },
- {
- "fieldLabel": "Colour",
- "name": "short_name",
- "width": 100,
- "xtype": "TextField",
- "|xns": "Roo.form"
- },
{
"fieldLabel": "Visible",
"name": "visible",
"|xns": "Roo.form"
},
{
- "xtype": "Column",
- "width": "550",
- "listeners": {},
- "labelAlign": "top",
- "|xns": "Roo.form",
- "items": [
- {
- "fieldLabel": "Page text",
- "height": 250,
- "name": "page_text",
- "width": 550,
- "xtype": "HtmlEditor",
- "|xns": "Roo.form"
- }
- ]
+ "name": "parent_id",
+ "xtype": "Hidden",
+ "|xns": "Roo.form"
},
{
"name": "id",
]
},
{
- "xtype": "ColumnModel",
+ "*prop": "colModel[]",
+ "dataIndex": "id",
"header": "",
"width": 110,
- "dataIndex": "id",
+ "xtype": "ColumnModel",
"|renderer": "function(v,x,r) { return String.format('<img src=\"{0}/Images/Thumb/100/{1}/{2}\">', baseURL, v, r.data.filename); }",
- "listeners": {},
- "|xns": "Roo.grid",
- "*prop": "colModel[]"
+ "|xns": "Roo.grid"
},
{
"xtype": "ColumnModel",
}
]
}
- ]
+ ],
+ "permname": "",
+ "modOrder": "001"
}
\ No newline at end of file