1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
7 // register the module first
8 Pman.on('beforeload', function()
11 part : ["Cms","Aggregate"],
12 modKey : '850-Pman.Tab.CmsAggregate',
13 module : Pman.Tab.CmsAggregate,
15 parent : Pman.Tab.Cms,
16 name : "Pman.Tab.CmsAggregate",
22 Pman.Tab.CmsAggregate = new Roo.util.Observable({
28 add : function(parentLayout, region)
32 this.parentLayout = parentLayout;
34 this.panel = parentLayout.addxtype({
35 xtype: 'NestedLayoutPanel',
38 title : "RSS Feed Aggregator",
40 xtype: 'BorderLayout',
47 activate : function() {
50 _this.grid.footer.onClick('first');
58 tableName : 'cms_rssaggr',
59 title : "RSS Feed Aggregator",
67 //_this.dialog = Pman.Dialog.FILL_IN
68 if (_this.panel.active) {
69 this.footer.onClick('first');
72 cellclick : function (_self, rowIndex, colIndex, e)
78 var d = this.ds.getAt(rowIndex);
79 var s = d.data.is_displayed ? 0 : 1;
80 d.set('is_displayed', s);
82 url : baseURL + '/Roo/cms_rssaggr',
88 success : function( ) {
91 // should error on failure.
96 rowclick : function (_self, rowIndex, e)
98 _this.cpanel.setContent(
100 String.format('<div style="margin:10px">{0}</div>',
101 _this.grid.ds.getAt(rowIndex).data.body)
105 autoExpandColumn : 'headline',
111 sortInfo : { field : 'published_dt', direction: 'DESC' },
116 url : baseURL + '/Roo/cms_rssaggr.php'
121 totalProperty : 'total',
134 'name': 'published_dt',
136 'dateFormat': 'Y-m-d'
154 xtype: 'PagingToolbar',
158 displayMsg : "Displaying cms_rssaggr{0} - {1} of {2}",
159 emptyMsg : "No cms_rssaggr found"
169 click : function (_self, e)
171 Roo.MessageBox.alert("Downloading",
172 "Updating feed, wait till this message disapears, or press OK to let it carry on in the background"
177 url : baseURL + '/Roo/cms_rssaggr',
182 success : function() {
183 Roo.MessageBox.hide();
184 _this.grid.footer.onClick('first');
189 text : "Update from Feed"
199 cls : 'x-btn-text-icon',
200 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
204 if (!_this.dialog) return;
205 _this.dialog.show( { id : 0 } , function() {
206 _this.grid.footer.onClick('first');
215 cls : 'x-btn-text-icon',
216 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
220 var s = _this.grid.getSelectionModel().getSelections();
221 if (!s.length || (s.length > 1)) {
222 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
225 if (!_this.dialog) return;
226 _this.dialog.show(s[0].data, function() {
227 _this.grid.footer.onClick('first');
237 cls : 'x-btn-text-icon',
238 icon : rootURL + '/Pman/templates/images/trash.gif',
242 Pman.genericDelete(_this, 'cms_rssaggr');
250 xtype: 'ColumnModel',
252 dataIndex : 'is_displayed',
253 header : 'Displayed',
255 renderer : function(v) {
256 var state = v> 0 ? '-checked' : '';
258 return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';
263 xtype: 'ColumnModel',
265 dataIndex : 'published_dt',
266 header : 'Published',
268 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
271 xtype: 'ColumnModel',
275 dataIndex : 'headline',
276 renderer : function(v) { return String.format('{0}', v); }
279 xtype: 'ColumnModel',
284 renderer : function(v) { return String.format('{0}', v); }
290 xtype: 'ContentPanel',
293 render : function (_self)
295 _this.cpanel = _self;
302 xtype: 'LayoutRegion',
306 xtype: 'LayoutRegion',
312 this.layout = this.panel.layout;