Pman.Tab.CmsProduct.js
[Pman.Cms] / Pman.Tab.CmsPage.bjs
1 {
2     "id": "roo-file-83",
3     "name": "Pman.Tab.CmsPage",
4     "parent": "Pman.Tab.Cms",
5     "title": "Cms - Page",
6     "path": "/home/alan/gitlive/Pman.Cms/Pman.Tab.CmsPage.bjs",
7     "items": [
8         {
9             "listeners": {
10                 "|activate": "function() {\n    _this.panel = this;\n    if (_this.grid) {\n        _this.grid.footer.onClick('first');\n    }\n    try {\n      _this.dialog = Pman.Dialog.CmsPage;\n    } catch(e) {}\n}"
11             },
12             "background": true,
13             "fitContainer": true,
14             "fitToframe": true,
15             "region": "center",
16             "tableName": "Page",
17             "title": "Page",
18             "xtype": "GridPanel",
19             "|xns": "Roo",
20             "items": [
21                 {
22                     "listeners": {
23                         "|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}",
24                         "celldblclick": "function (_self, rowIndex, columnIndex, e)\n{\n\n   var s = this.getDataSource().getAt(rowIndex);\n   _this.dialog.show(s.data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n    \n}"
25                     },
26                     "*prop": "grid",
27                     "autoExpandColumn": "title",
28                     "clicksToEdit": 1,
29                     "loadMask": true,
30                     "xtype": "Grid",
31                     "|xns": "Roo.grid",
32                     "items": [
33                         {
34                             "listeners": {
35                                 "beforeload": "function (_self, options)\n{\n    options.params =   options.params || {};\n    options.params._columns = 'id,category_id_title,title,published,page_link,parent_id_page_link,visible,in_rss';\n    options.params['query[search]'] = _this.searchField.getValue();\n}"
36                             },
37                             "*prop": "dataSource",
38                             "remoteSort": true,
39                             "xtype": "Store",
40                             "|sortInfo": "{field : 'updated', direction : 'DESC' }",
41                             "|xns": "Roo.data",
42                             "items": [
43                                 {
44                                     "*prop": "proxy",
45                                     "xtype": "HttpProxy",
46                                     "method": "GET",
47                                     "|url": "baseURL + '/Roo/Page.php'",
48                                     "|xns": "Roo.data"
49                                 },
50                                 {
51                                     "*prop": "reader",
52                                     "id": "id",
53                                     "root": "data",
54                                     "totalProperty": "total",
55                                     "xtype": "JsonReader",
56                                     "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'shortname',\n        'type': 'string'\n    },\n    {\n        'name': 'category_id',\n        'type': 'int'\n    },\n    {\n        'name': 'category_id_title',\n        'type': 'int'\n    },\n    {\n        'name': 'title',\n        'type': 'string'\n    },\n    {\n        'name': 'contents',\n        'type': 'string'\n    },\n    {\n        'name': 'visible',\n        'type': 'int'\n    },\n    {\n        'name': 'extended',\n        'type': 'string'\n    },\n    {\n        'name': 'trackbacks_no',\n        'type': 'int'\n    },\n    {\n        'name': 'comments_no',\n        'type': 'int'\n    },\n    {\n        'name': 'has_extended',\n        'type': 'int'\n    },\n    {\n        'name': 'author_id',\n        'type': 'int'\n    },\n    {\n        'name': 'author_name',\n        'type': 'string'\n    },\n    {\n        'name': 'updated',\n        'type': 'string'\n    },\n    {\n        'name': 'created',\n        'type': 'string'\n    },\n    {\n        'name': 'published',\n        'type': 'string'\n    },\n    {\n        'name': 'page_link',\n        'type': 'string'\n    },\n    {\n        'name': 'parent_id',\n        'type': 'int'\n    },\n    {\n        'name': 'in_rss',\n        'type': 'int'\n    },\n    {\n        'name': 'replaces_id',\n        'type': 'int'\n    },\n    {\n        'name': 'category_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'category_id_parent_id',\n        'type': 'int'\n    },\n    {\n        'name': 'category_id_short_name',\n        'type': 'string'\n    },\n    {\n        'name': 'category_id_title',\n        'type': 'string'\n    },\n    {\n        'name': 'category_id_page_text',\n        'type': 'string'\n    },\n    {\n        'name': 'category_id_type',\n        'type': 'string'\n    },\n    {\n        'name': 'category_id_search_on',\n        'type': 'string'\n    },\n    {\n        'name': 'category_id_image_menu_id',\n        'type': 'int'\n    },\n    {\n        'name': 'category_id_image_menuover_id',\n        'type': 'int'\n    },\n    {\n        'name': 'category_id_image_leftactive_id',\n        'type': 'int'\n    },\n    {\n        'name': 'category_id_image_page_id',\n        'type': 'int'\n    },\n    {\n        'name': 'category_id_display_order',\n        'type': 'int'\n    },\n    {\n        'name': 'category_id_more_info_title',\n        'type': 'string'\n    },\n    {\n        'name': 'category_id_more_info_text',\n        'type': 'string'\n    },\n    {\n        'name': 'category_id_visible',\n        'type': 'int'\n    }\n]",
57                                     "|xns": "Roo.data"
58                                 }
59                             ]
60                         },
61                         {
62                             "*prop": "footer",
63                             "xtype": "PagingToolbar",
64                             "pageSize": 25,
65                             "displayInfo": true,
66                             "displayMsg": "Displaying Page{0} - {1} of {2}",
67                             "emptyMsg": "No Page found",
68                             "|xns": "Roo"
69                         },
70                         {
71                             "*prop": "toolbar",
72                             "xtype": "Toolbar",
73                             "|xns": "Roo",
74                             "items": [
75                                 {
76                                     "listeners": {
77                                         "render": "function (_self)\n{\n    _this.searchField = _self;\n}"
78                                     },
79                                     "xtype": "TextField",
80                                     "|xns": "Roo.form"
81                                 },
82                                 {
83                                     "listeners": {
84                                         "|click": "function (_self, e)\n{\n_this.grid.footer.onClick('first');\n}"
85                                     },
86                                     "cls": "x-btn-icon",
87                                     "xtype": "Button",
88                                     "|icon": "rootURL + '/Pman/templates/images/search.gif'",
89                                     "|xns": "Roo.Toolbar"
90                                 },
91                                 {
92                                     "|xns": "Roo.Toolbar",
93                                     "xtype": "Fill"
94                                 },
95                                 {
96                                     "listeners": {
97                                         "|click": "function()\n{\n   _this.dialog.show( { id : 0 } , function() {\n     _this.grid.footer.onClick('first');\n   }); \n}\n"
98                                     },
99                                     "cls": "x-btn-text-icon",
100                                     "text": "Add",
101                                     "xtype": "Button",
102                                     "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
103                                     "|xns": "Roo"
104                                 },
105                                 {
106                                     "listeners": {
107                                         "|click": "function()\n{\n    var sc = _this.grid.getSelectionModel().getSelected();\n    if (!sc)  {\n        Roo.MessageBox.alert(\"Error\", \"Select a Row\");\n        return;\n    }\n    var s =_this.grid.getDataSource().getById(sc.id);\n    \n    _this.dialog.show(s.data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n    \n}\n"
108                                     },
109                                     "cls": "x-btn-text-icon",
110                                     "text": "Edit",
111                                     "xtype": "Button",
112                                     "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
113                                     "|xns": "Roo"
114                                 },
115                                 {
116                                     "listeners": {
117                                         "|click": "function()\n{\n  // Pman.genericDelete(_this, _this.panel.tableName); \n}\n        "
118                                     },
119                                     "cls": "x-btn-text-icon",
120                                     "text": "Delete",
121                                     "xtype": "Button",
122                                     "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
123                                     "|xns": "Roo"
124                                 }
125                             ]
126                         },
127                         {
128                             "xtype": "ColumnModel",
129                             "header": "Id",
130                             "width": 75,
131                             "dataIndex": "id",
132                             "|renderer": "function(v) { return String.format('{0}', v); }",
133                             "|xns": "Roo.grid",
134                             "*prop": "colModel[]"
135                         },
136                         {
137                             "*prop": "colModel[]",
138                             "dataIndex": "category_id_title",
139                             "header": "Category",
140                             "width": 75,
141                             "xtype": "ColumnModel",
142                             "|renderer": "function(v) { return String.format('{0}', v); }",
143                             "|xns": "Roo.grid"
144                         },
145                         {
146                             "xtype": "ColumnModel",
147                             "header": "Title",
148                             "width": 200,
149                             "dataIndex": "title",
150                             "|renderer": "function(v) { return String.format('{0}', v); }",
151                             "|xns": "Roo.grid",
152                             "*prop": "colModel[]"
153                         },
154                         {
155                             "xtype": "ColumnModel",
156                             "header": "Published",
157                             "width": 200,
158                             "dataIndex": "published",
159                             "|renderer": "function(v) { return String.format('{0}', v); }",
160                             "|xns": "Roo.grid",
161                             "*prop": "colModel[]"
162                         },
163                         {
164                             "xtype": "ColumnModel",
165                             "header": "Page link",
166                             "width": 200,
167                             "dataIndex": "page_link",
168                             "|renderer": "function(v) { return String.format('{0}', v); }",
169                             "|xns": "Roo.grid",
170                             "*prop": "colModel[]"
171                         },
172                         {
173                             "xtype": "ColumnModel",
174                             "header": "Parent",
175                             "width": 75,
176                             "dataIndex": "parent_id",
177                             "|renderer": "function(v) { return String.format('{0}', v); }",
178                             "|xns": "Roo.grid",
179                             "*prop": "colModel[]"
180                         },
181                         {
182                             "*prop": "colModel[]",
183                             "dataIndex": "visible",
184                             "header": "Vis",
185                             "width": 30,
186                             "xtype": "ColumnModel",
187                             "|renderer": "function(v) { return String.format('{0}', v); }",
188                             "|xns": "Roo.grid"
189                         },
190                         {
191                             "*prop": "colModel[]",
192                             "dataIndex": "in_rss",
193                             "header": "RSS",
194                             "width": 30,
195                             "xtype": "ColumnModel",
196                             "|renderer": "function(v) { return String.format('{0}', v); }",
197                             "|xns": "Roo.grid"
198                         }
199                     ]
200                 }
201             ]
202         }
203     ],
204     "permname": "Cms.Page"
205 }