Pman.Tab.CmsProduct.js
[Pman.Cms] / Pman.Tab.CmsBlog.bjs
1 {
2     "id": "roo-file-89",
3     "name": "Pman.Tab.CmsBlog",
4     "parent": "Pman.Tab.Cms",
5     "title": "Blog",
6     "path": "/home/alan/gitlive/Pman.Cms/Pman.Tab.CmsBlog.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}"
11             },
12             "background": true,
13             "fitContainer": true,
14             "fitToframe": true,
15             "region": "center",
16             "tableName": "CmsBlog",
17             "title": "Pages / Blog Entries",
18             "xtype": "GridPanel",
19             "|xns": "Roo",
20             "items": [
21                 {
22                     "listeners": {
23                         "|render": "function() \n{\n   _this.grid = this; \n    _this.dialog = Pman.Dialog.CmsBlog;\n    if (_this.panel.active) {\n       this.footer.onClick('first');\n    }\n}"
24                     },
25                     "*prop": "grid",
26                     "autoExpandColumn": "title",
27                     "loadMask": true,
28                     "xtype": "Grid",
29                     "|xns": "Roo.grid",
30                     "items": [
31                         {
32                             "*prop": "dataSource",
33                             "remoteSort": true,
34                             "|sortInfo": "{ field : 'created' , direction : 'DESC' }",
35                             "xtype": "Store",
36                             "|xns": "Roo.data",
37                             "items": [
38                                 {
39                                     "*prop": "proxy",
40                                     "xtype": "HttpProxy",
41                                     "method": "GET",
42                                     "|url": "baseURL + '/Roo/CmsBlog.php'",
43                                     "|xns": "Roo.data"
44                                 },
45                                 {
46                                     "*prop": "reader",
47                                     "id": "id",
48                                     "root": "data",
49                                     "totalProperty": "total",
50                                     "xtype": "JsonReader",
51                                     "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'title',\n        'type': 'string'\n    },\n    {\n        'name': 'published',\n        'type': 'date',\n        'format' : 'Y-m-d H:i:s'\n    },\n    {\n        'name': 'body',\n        'type': 'string'\n    },\n    {\n        'name': 'comments_no',\n        'type': 'int'\n    },\n    {\n        'name': 'trackbacks_no',\n        'type': 'int'\n    },\n    {\n        'name': 'extended',\n        'type': 'string'\n    },\n    {\n        'name': 'has_extended',\n        'type': 'int'\n    },\n    {\n        'name': 'author_id',\n        'type': 'int'\n    },\n    {\n        'name': 'category_id',\n        'type': 'int'\n    },\n    {\n        'name': 'category_id_title',\n        'type': 'string'\n    },\n    {\n        'name': 'is_draft',\n        'type': 'int'\n    },\n    {\n        'name': 'updated',\n        'type': 'date',\n        'format' : 'Y-m-d H:i:s'\n    },\n    {\n        'name': 'created',\n        'type': 'date',\n        'format' : 'Y-m-d H:i:s'\n    },\n    {\n        'name': 'to_replace_id',\n        'type': 'int'\n    },\n    {\n        'name': 'page_link',\n        'type': 'string'\n    },\n    {\n        'name': 'in_rss',\n        'type': 'int'\n    },\n    {\n        'name': 'parent_id',\n        'type': 'int'\n    },\n    {\n        'name': 'parent_id_title',\n        'type': 'string'\n    },\n\n    {\n        'name': 'author_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'author_id_office_id',\n        'type': 'int'\n    },\n    {\n        'name': 'author_id_name',\n        'type': 'string'\n    },\n    {\n        'name': 'author_id_phone',\n        'type': 'string'\n    },\n    {\n        'name': 'author_id_fax',\n        'type': 'string'\n    },\n    {\n        'name': 'author_id_email',\n        'type': 'string'\n    },\n    {\n        'name': 'author_id_company_id',\n        'type': 'int'\n    },\n    {\n        'name': 'author_id_role',\n        'type': 'string'\n    },\n    {\n        'name': 'author_id_active',\n        'type': 'int'\n    },\n    {\n        'name': 'author_id_remarks',\n        'type': 'string'\n    },\n    {\n        'name': 'author_id_passwd',\n        'type': 'string'\n    },\n    {\n        'name': 'author_id_owner_id',\n        'type': 'int'\n    },\n    {\n        'name': 'author_id_lang',\n        'type': 'string'\n    },\n    {\n        'name': 'author_id_no_reset_sent',\n        'type': 'int'\n    },\n    {\n        'name': 'author_id_action_type',\n        'type': 'string'\n    },\n    {\n        'name': 'author_id_project_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    {\n        'name': 'to_replace_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'to_replace_id_title',\n        'type': 'string'\n    },\n    {\n        'name': 'to_replace_id_published',\n        'type': 'string'\n    },\n    {\n        'name': 'to_replace_id_body',\n        'type': 'string'\n    },\n    {\n        'name': 'to_replace_id_comments_no',\n        'type': 'int'\n    },\n    {\n        'name': 'to_replace_id_trackbacks_no',\n        'type': 'int'\n    },\n    {\n        'name': 'to_replace_id_extended',\n        'type': 'string'\n    },\n    {\n        'name': 'to_replace_id_has_extended',\n        'type': 'int'\n    },\n    {\n        'name': 'to_replace_id_author_id',\n        'type': 'int'\n    },\n    {\n        'name': 'to_replace_id_category_id',\n        'type': 'int'\n    },\n    {\n        'name': 'to_replace_id_is_draft',\n        'type': 'int'\n    },\n    {\n        'name': 'to_replace_id_updated',\n        'type': 'string'\n    },\n    {\n        'name': 'to_replace_id_created',\n        'type': 'string'\n    },\n    {\n        'name': 'to_replace_id_to_replace_id',\n        'type': 'int'\n    },\n    {\n        'name': 'to_replace_id_page_link',\n        'type': 'string'\n    },\n    {\n        'name': 'to_replace_id_in_rss',\n        'type': 'int'\n    },\n    {\n        'name': 'to_replace_id_parent_id',\n        'type': 'int'\n    },\n    {\n        'name': 'parent_id_id',\n        'type': 'int'\n    },\n    {\n        'name': 'parent_id_title',\n        'type': 'string'\n    },\n    {\n        'name': 'parent_id_published',\n        'type': 'string'\n    },\n    {\n        'name': 'parent_id_body',\n        'type': 'string'\n    },\n    {\n        'name': 'parent_id_comments_no',\n        'type': 'int'\n    },\n    {\n        'name': 'parent_id_trackbacks_no',\n        'type': 'int'\n    },\n    {\n        'name': 'parent_id_extended',\n        'type': 'string'\n    },\n    {\n        'name': 'parent_id_has_extended',\n        'type': 'int'\n    },\n    {\n        'name': 'parent_id_author_id',\n        'type': 'int'\n    },\n    {\n        'name': 'parent_id_category_id',\n        'type': 'int'\n    },\n    {\n        'name': 'parent_id_is_draft',\n        'type': 'int'\n    },\n    {\n        'name': 'parent_id_updated',\n        'type': 'string'\n    },\n    {\n        'name': 'parent_id_created',\n        'type': 'string'\n    },\n    {\n        'name': 'parent_id_to_replace_id',\n        'type': 'int'\n    },\n    {\n        'name': 'parent_id_page_link',\n        'type': 'string'\n    },\n    {\n        'name': 'parent_id_in_rss',\n        'type': 'int'\n    },\n    {\n        'name': 'parent_id_parent_id',\n        'type': 'int'\n    }\n]",
52                                     "|xns": "Roo.data"
53                                 }
54                             ]
55                         },
56                         {
57                             "*prop": "footer",
58                             "xtype": "PagingToolbar",
59                             "pageSize": 25,
60                             "displayInfo": true,
61                             "displayMsg": "Displaying CmsBlog{0} - {1} of {2}",
62                             "emptyMsg": "No CmsBlog found",
63                             "|xns": "Roo"
64                         },
65                         {
66                             "*prop": "toolbar",
67                             "xtype": "Toolbar",
68                             "|xns": "Roo",
69                             "items": [
70                                 {
71                                     "listeners": {
72                                         "|click": "function()\n{\n   _this.dialog.show( { id : 0 } , function() {\n     _this.grid.footer.onClick('first');\n   }); \n}\n"
73                                     },
74                                     "cls": "x-btn-text-icon",
75                                     "text": "Add",
76                                     "xtype": "Button",
77                                     "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
78                                     "|xns": "Roo.Toolbar"
79                                 },
80                                 {
81                                     "listeners": {
82                                         "|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    \n    _this.dialog.show(s[0].data, function() {\n        _this.grid.footer.onClick('first');\n       }); \n    \n}\n"
83                                     },
84                                     "cls": "x-btn-text-icon",
85                                     "text": "Edit",
86                                     "xtype": "Button",
87                                     "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
88                                     "|xns": "Roo.Toolbar"
89                                 },
90                                 {
91                                     "text": "Delete",
92                                     "cls": "x-btn-text-icon",
93                                     "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
94                                     "xtype": "Button",
95                                     "listeners": {
96                                         "|click": "function()\n{\n   //Pman.genericDelete(_this, _this.grid.tableName); \n}\n        "
97                                     },
98                                     "|xns": "Roo.Toolbar"
99                                 }
100                             ]
101                         },
102                         {
103                             "*prop": "colModel[]",
104                             "dataIndex": "created",
105                             "header": "Created",
106                             "width": 75,
107                             "xtype": "ColumnModel",
108                             "|renderer": "function(v) { return v? v.format('d/M/Y') : '--' }",
109                             "|xns": "Roo.grid"
110                         },
111                         {
112                             "*prop": "colModel[]",
113                             "dataIndex": "published",
114                             "header": "Published",
115                             "width": 75,
116                             "xtype": "ColumnModel",
117                             "|renderer": "function(v) { return v? v.format('d/M/Y') : '--' }",
118                             "|xns": "Roo.grid"
119                         },
120                         {
121                             "*prop": "colModel[]",
122                             "dataIndex": "parent_id_title",
123                             "header": "Parent",
124                             "width": 75,
125                             "xtype": "ColumnModel",
126                             "|renderer": "function(v) { return String.format('{0}', v  || ''); }",
127                             "|xns": "Roo.grid"
128                         },
129                         {
130                             "*prop": "colModel[]",
131                             "dataIndex": "category_id_title",
132                             "header": "Category",
133                             "width": 75,
134                             "xtype": "ColumnModel",
135                             "|renderer": "function(v) { return String.format('{0}', v); }",
136                             "|xns": "Roo.grid"
137                         },
138                         {
139                             "xtype": "ColumnModel",
140                             "header": "Title",
141                             "width": 200,
142                             "dataIndex": "title",
143                             "|renderer": "function(v) { return String.format('{0}', v); }",
144                             "|xns": "Roo.grid",
145                             "*prop": "colModel[]"
146                         },
147                         {
148                             "*prop": "colModel[]",
149                             "dataIndex": "author_id_name",
150                             "header": "Author",
151                             "width": 75,
152                             "xtype": "ColumnModel",
153                             "|renderer": "function(v) { return String.format('{0}', v); }",
154                             "|xns": "Roo.grid"
155                         },
156                         {
157                             "*prop": "colModel[]",
158                             "dataIndex": "page_link",
159                             "header": "Page link",
160                             "width": 100,
161                             "xtype": "ColumnModel",
162                             "|renderer": "function(v) { return String.format('{0}', v); }",
163                             "|xns": "Roo.grid"
164                         },
165                         {
166                             "*prop": "colModel[]",
167                             "dataIndex": "to_replace_id_title",
168                             "header": "To replace",
169                             "width": 75,
170                             "xtype": "ColumnModel",
171                             "|renderer": "function(v) { return String.format('{0}', v); }",
172                             "|xns": "Roo.grid"
173                         },
174                         {
175                             "*prop": "colModel[]",
176                             "dataIndex": "is_draft",
177                             "header": "D?",
178                             "width": 25,
179                             "xtype": "ColumnModel",
180                             "|renderer": "function(v) { return String.format('{0}', v); }",
181                             "|xns": "Roo.grid"
182                         },
183                         {
184                             "*prop": "colModel[]",
185                             "dataIndex": "has_extended",
186                             "header": "Ex?",
187                             "width": 25,
188                             "xtype": "ColumnModel",
189                             "|renderer": "function(v) { return String.format('{0}', v); }",
190                             "|xns": "Roo.grid"
191                         },
192                         {
193                             "*prop": "colModel[]",
194                             "dataIndex": "trackbacks_no",
195                             "header": "T#",
196                             "width": 25,
197                             "xtype": "ColumnModel",
198                             "|renderer": "function(v) { return String.format('{0}', v); }",
199                             "|xns": "Roo.grid"
200                         },
201                         {
202                             "*prop": "colModel[]",
203                             "dataIndex": "comments_no",
204                             "header": "C#",
205                             "width": 25,
206                             "xtype": "ColumnModel",
207                             "|renderer": "function(v) { return String.format('{0}', v); }",
208                             "|xns": "Roo.grid"
209                         },
210                         {
211                             "*prop": "colModel[]",
212                             "dataIndex": "in_rss",
213                             "header": "RSS",
214                             "width": 30,
215                             "xtype": "ColumnModel",
216                             "|renderer": "function(v) { return String.format('{0}', v); }",
217                             "|xns": "Roo.grid"
218                         }
219                     ]
220                 }
221             ]
222         }
223     ],
224     "permname": "Cms.Blog"
225 }