Pman.Tab.CmsAggregate.bjs
[Pman.Cms] / Pman.Tab.CmsAggregate.bjs
1 {
2     "id": "roo-file-272",
3     "name": "Pman.Tab.CmsAggregate",
4     "parent": "",
5     "title": "",
6     "path": "/home/alan/gitlive/Pman.Cms/Pman.Tab.CmsAggregate.bjs",
7     "items": [
8         {
9             "*prop": "colModel[]",
10             "dataIndex": "active",
11             "header": "Active",
12             "width": 75,
13             "xtype": "ColumnModel",
14             "|renderer": "function(v) {  \n    var state = v> 0 ?  '-checked' : '';\n\n    return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n                \n }",
15             "|xns": "Roo.grid",
16             "items": [
17                 {
18                     "listeners": {
19                         "|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}"
20                     },
21                     "*prop": "grid",
22                     "autoExpandColumn": "headline",
23                     "loadMask": true,
24                     "xtype": "Grid",
25                     "|xns": "Roo.grid",
26                     "items": [
27                         {
28                             "*prop": "dataSource",
29                             "xtype": "Store",
30                             "remoteSort": true,
31                             "|sortInfo": "{ field : 'extid', direction: 'ASC' }",
32                             "|xns": "Roo.data",
33                             "items": [
34                                 {
35                                     "*prop": "proxy",
36                                     "xtype": "HttpProxy",
37                                     "method": "GET",
38                                     "|url": "baseURL + '/Roo/cms_rssaggr.php'",
39                                     "|xns": "Roo.data"
40                                 },
41                                 {
42                                     "|xns": "Roo.data",
43                                     "xtype": "JsonReader",
44                                     "totalProperty": "total",
45                                     "root": "data",
46                                     "*prop": "reader",
47                                     "id": "id",
48                                     "|fields": "[\n    {\n        'name': 'id',\n        'type': 'int'\n    },\n    {\n        'name': 'extid',\n        'type': 'string'\n    },\n    {\n        'name': 'published_dt',\n        'type': 'date',\n        'dateFormat': 'Y-m-d'\n    },\n    {\n        'name': 'headline',\n        'type': 'string'\n    },\n    {\n        'name': 'body',\n        'type': 'string'\n    },\n    {\n        'name': 'src_id',\n        'type': 'int'\n    }\n]"
49                                 }
50                             ]
51                         },
52                         {
53                             "*prop": "footer",
54                             "xtype": "PagingToolbar",
55                             "pageSize": 25,
56                             "displayInfo": true,
57                             "displayMsg": "Displaying cms_rssaggr{0} - {1} of {2}",
58                             "emptyMsg": "No cms_rssaggr found",
59                             "|xns": "Roo"
60                         },
61                         {
62                             "*prop": "toolbar",
63                             "xtype": "Toolbar",
64                             "|xns": "Roo",
65                             "items": [
66                                 {
67                                     "listeners": {
68                                         "click": "function (_self, e)\n{\n    new Pman.Request({\n        url : baseURL + '/Roo/cms_rssaggr',\n        method : 'GET',\n        params : {\n            _pullfeed : 1\n        },\n        success : function() {\n            _this.grid.onClick('first');\n        }\n    });\n}"
69                                     },
70                                     "text": "Update from Feed",
71                                     "xtype": "Button",
72                                     "|xns": "Roo.Toolbar"
73                                 },
74                                 {
75                                     "|xns": "Roo.Toolbar",
76                                     "xtype": "Fill"
77                                 },
78                                 {
79                                     "text": "Add",
80                                     "xtype": "Button",
81                                     "cls": "x-btn-text-icon",
82                                     "|icon": "Roo.rootURL + 'images/default/dd/drop-add.gif'",
83                                     "listeners": {
84                                         "|click": "function()\n{\n    if (!_this.dialog) return;\n    _this.dialog.show( { id : 0 } , function() {\n        _this.grid.footer.onClick('first');\n   }); \n}\n"
85                                     },
86                                     "|xns": "Roo.Toolbar"
87                                 },
88                                 {
89                                     "text": "Edit",
90                                     "xtype": "Button",
91                                     "cls": "x-btn-text-icon",
92                                     "|icon": "Roo.rootURL + 'images/default/tree/leaf.gif'",
93                                     "listeners": {
94                                         "|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(s[0].data, function() {\n        _this.grid.footer.onClick('first');\n    }); \n    \n}\n"
95                                     },
96                                     "|xns": "Roo.Toolbar"
97                                 },
98                                 {
99                                     "text": "Delete",
100                                     "cls": "x-btn-text-icon",
101                                     "|icon": "rootURL + '/Pman/templates/images/trash.gif'",
102                                     "xtype": "Button",
103                                     "listeners": {
104                                         "|click": "function()\n{\n     Pman.genericDelete(_this, 'cms_rssaggr'); \n}\n        "
105                                     },
106                                     "|xns": "Roo.Toolbar"
107                                 }
108                             ]
109                         },
110                         {
111                             "*prop": "colModel[]",
112                             "dataIndex": "is_displayed",
113                             "header": "Displayed",
114                             "width": 75,
115                             "xtype": "ColumnModel",
116                             "|renderer": "function(v) {  \n    var state = v> 0 ?  '-checked' : '';\n\n    return '<img class=\"x-grid-check-icon' + state + '\" src=\"' + Roo.BLANK_IMAGE_URL + '\"/>';\n                \n }",
117                             "|xns": "Roo.grid"
118                         },
119                         {
120                             "xtype": "ColumnModel",
121                             "header": "Published dt",
122                             "width": 75,
123                             "dataIndex": "published_dt",
124                             "|renderer": "function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }",
125                             "|xns": "Roo.grid",
126                             "*prop": "colModel[]"
127                         },
128                         {
129                             "xtype": "ColumnModel",
130                             "header": "Headline",
131                             "width": 200,
132                             "dataIndex": "headline",
133                             "|renderer": "function(v) { return String.format('{0}', v); }",
134                             "|xns": "Roo.grid",
135                             "*prop": "colModel[]"
136                         },
137                         {
138                             "xtype": "ColumnModel",
139                             "header": "Body",
140                             "width": 200,
141                             "dataIndex": "body",
142                             "|renderer": "function(v) { return String.format('{0}', v); }",
143                             "|xns": "Roo.grid",
144                             "*prop": "colModel[]"
145                         }
146                     ]
147                 }
148             ]
149         }
150     ],
151     "permname": "",
152     "modOrder": "001"
153 }