1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Roo.namespace('Pman.Tab');
7 Pman.Tab.CmsAggregate = new Roo.XComponent({
10 '3b82002c77bd3f33f81e7be33deceb80' :"RSS Feed Aggregator",
11 '116af9a686a753275179db02cbb68f62' :"Displaying cms_rssaggr{0} - {1} of {2}",
12 'ec211f7c20af43e742bf2570c3cb84f9' :"Add",
13 '7dce122004969d56ae2e0245cb754d35' :"Edit",
14 '9b9d8a976b42e0bd66381797644943d5' :"Published",
15 '4c57e321aef3fb4261f9930dc39d9fb1' :"Update from Feed",
16 '86754577897acfb25deb69039d49d9a7' :"Displayed",
17 'b6f4933fc36f3dd21c402b0ab1e4e0c7' :"No cms_rssaggr found",
18 'f2a6c498fb90ee345d997f888fce3b18' :"Delete",
19 'c6568e77f61109390e82d035aaacaef0' :"Headline"
22 part : ["Cms", "Aggregate" ],
23 order : '850-Pman.Tab.CmsAggregate',
25 parent : 'Pman.Tab.Cms',
26 name : "Pman.Tab.CmsAggregate",
35 title : _this._strings['3b82002c77bd3f33f81e7be33deceb80'] /* RSS Feed Aggregator */,
38 xtype : 'NestedLayoutPanel',
42 xtype : 'BorderLayout',
46 xtype : 'LayoutRegion'
52 xtype : 'LayoutRegion'
60 tableName : 'cms_rssaggr',
61 title : _this._strings['3b82002c77bd3f33f81e7be33deceb80'] /* RSS Feed Aggregator */,
66 activate : function() {
69 _this.grid.footer.onClick('first');
74 autoExpandColumn : 'headline',
80 cellclick : function (_self, rowIndex, colIndex, e)
86 var d = this.ds.getAt(rowIndex);
87 var s = d.data.is_displayed ? 0 : 1;
88 d.set('is_displayed', s);
90 url : baseURL + '/Roo/cms_rssaggr',
96 success : function( ) {
99 // should error on failure.
107 //_this.dialog = Pman.Dialog.FILL_IN
108 if (_this.panel.active) {
109 this.footer.onClick('first');
112 rowclick : function (_self, rowIndex, e)
114 _this.cpanel.setContent(
116 String.format('<div style="margin:10px">{0}</div>',
117 _this.grid.ds.getAt(rowIndex).data.body)
123 displayMsg : _this._strings['116af9a686a753275179db02cbb68f62'] /* Displaying cms_rssaggr{0} - {1} of {2} */,
124 emptyMsg : _this._strings['b6f4933fc36f3dd21c402b0ab1e4e0c7'] /* No cms_rssaggr found */,
128 xtype : 'PagingToolbar'
136 text : _this._strings['4c57e321aef3fb4261f9930dc39d9fb1'] /* Update from Feed */,
138 '|xns' : 'Roo.Toolbar',
141 click : function (_self, e)
143 Roo.MessageBox.alert("Downloading",
144 "Updating feed, wait till this message disapears, or press OK to let it carry on in the background"
149 url : baseURL + '/Roo/cms_rssaggr',
154 success : function() {
155 Roo.MessageBox.hide();
156 _this.grid.footer.onClick('first');
164 '|xns' : 'Roo.Toolbar',
168 cls : 'x-btn-text-icon',
169 icon : Roo.rootURL + 'images/default/dd/drop-add.gif',
170 text : _this._strings['ec211f7c20af43e742bf2570c3cb84f9'] /* Add */,
172 '|xns' : 'Roo.Toolbar',
180 _this.dialog.show( { id : 0 } , function() {
181 _this.grid.footer.onClick('first');
187 cls : 'x-btn-text-icon',
188 icon : Roo.rootURL + 'images/default/tree/leaf.gif',
189 text : _this._strings['7dce122004969d56ae2e0245cb754d35'] /* Edit */,
191 '|xns' : 'Roo.Toolbar',
196 var s = _this.grid.getSelectionModel().getSelections();
197 if (!s.length || (s.length > 1)) {
198 Roo.MessageBox.alert("Error", s.length ? "Select only one Row" : "Select a Row");
205 _this.dialog.show(s[0].data, function() {
206 _this.grid.footer.onClick('first');
213 cls : 'x-btn-text-icon',
214 icon : rootURL + '/Pman/templates/images/trash.gif',
215 text : _this._strings['f2a6c498fb90ee345d997f888fce3b18'] /* Delete */,
217 '|xns' : 'Roo.Toolbar',
222 Pman.genericDelete(_this, 'cms_rssaggr');
230 sortInfo : { field : 'published_dt', direction: 'DESC' },
236 url : baseURL + '/Roo/cms_rssaggr.php',
252 'name': 'published_dt',
254 'dateFormat': 'Y-m-d'
271 totalProperty : 'total',
279 dataIndex : 'is_displayed',
280 header : _this._strings['86754577897acfb25deb69039d49d9a7'] /* Displayed */,
281 renderer : function(v) {
282 var state = v> 0 ? '-checked' : '';
284 return '<img class="x-grid-check-icon' + state + '" src="' + Roo.BLANK_IMAGE_URL + '"/>';
290 xtype : 'ColumnModel'
293 dataIndex : 'published_dt',
294 header : _this._strings['9b9d8a976b42e0bd66381797644943d5'] /* Published */,
295 renderer : function(v) { return String.format('{0}', v ? v.format('d/M/Y') : ''); },
299 xtype : 'ColumnModel'
302 dataIndex : 'headline',
303 header : _this._strings['c6568e77f61109390e82d035aaacaef0'] /* Headline */,
304 renderer : function(v) { return String.format('{0}', v); },
308 xtype : 'ColumnModel'
317 xtype : 'ContentPanel',
319 render : function (_self)
321 _this.cpanel = _self;