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({
38 activate : function() {
41 _this.grid.footer.onClick('first');
49 tableName : 'cms_rssaggr',
50 title : "RSS Feed Aggregator",
58 //_this.dialog = Pman.Dialog.FILL_IN
59 if (_this.panel.active) {
60 this.footer.onClick('first');
63 cellclick : function (_self, rowIndex, colIndex, e)
69 var d = this.ds.getAt(rowIndex);
70 var s = d.data.is_displayed ? 0 : 1;
71 d.set('is_displayed', s);
73 baseURL : 'Roo/cms_rssaggr',
79 success : function( ) {
82 // should error on failure.
90 autoExpandColumn : 'headline',
96 sortInfo : { field : 'published_dt', direction: 'DESC' },
101 url : baseURL + '/Roo/cms_rssaggr.php'
106 totalProperty : 'total',
119 'name': 'published_dt',
121 'dateFormat': 'Y-m-d'
139 xtype: 'PagingToolbar',
143 displayMsg : "Displaying cms_rssaggr{0} - {1} of {2}",
144 emptyMsg : "No cms_rssaggr found"
154 click : function (_self, e)
157 url : baseURL + '/Roo/cms_rssaggr',
162 success : function() {
163 _this.grid.onClick('first');
168 text : "Update from Feed"
178 cls : 'x-btn-text-icon',
179 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
183 if (!_this.dialog) return;
184 _this.dialog.show( { id : 0 } , function() {
185 _this.grid.footer.onClick('first');
194 cls : 'x-btn-text-icon',
195 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
199 var s = _this.grid.getSelectionModel().getSelections();
200 if (!s.length || (s.length > 1)) {
201 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
204 if (!_this.dialog) return;
205 _this.dialog.show(s[0].data, function() {
206 _this.grid.footer.onClick('first');
216 cls : 'x-btn-text-icon',
217 icon : rootURL + '/Pman/templates/images/trash.gif',
221 Pman.genericDelete(_this, 'cms_rssaggr');
229 xtype: 'ColumnModel',
231 dataIndex : 'is_displayed',
232 header : 'Displayed',
234 renderer : function(v) {
235 var state = v> 0 ? '-checked' : '';
237 return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';
242 xtype: 'ColumnModel',
244 dataIndex : 'published_dt',
245 header : 'Published',
247 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); }
250 xtype: 'ColumnModel',
254 dataIndex : 'headline',
255 renderer : function(v) { return String.format('{0}', v); }
258 xtype: 'ColumnModel',
263 renderer : function(v) { return String.format('{0}', v); }
268 this.layout = this.panel.layout;