1 //<script type="text/javascript">
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
5 Feed = new Roo.XComponent({
8 '40c829f4b6cdd8753135704af571192f' :"articleURL",
9 '8287b137f969bcae66ca51f7abf14308' :"Show Previously Read ",
10 'd9cd9f7b44e0493c9604e9f8fb7a6c07' :"Mark All Read",
11 'b78a3223503896721cca1303f776159b' :"Title",
12 'b7436cc90ecf26f15baeead978f09040' :"name of feed",
13 '83ca9a18d9507324a9453c92a7420dd2' :"Report Issue",
14 '44749712dbec183e983dcd78a7736c41' :"Date"
17 part : ["Reader", "Feed" ],
21 name : "unnamed module",
30 '|xns' : 'Roo.bootstrap',
34 html : _this._strings['b7436cc90ecf26f15baeead978f09040'] /* name of feed */,
35 style : 'font-weight: bold;\nfont-size: 22px;\n \nposition: absolute;\nleft: 100px;\ntop: 10px;\nz-Index: 1000;\ncolor: white;',
38 '|xns' : 'Roo.bootstrap',
42 brand : '<i class=\"fa fa-chevron-left\"></i> Feeds',
43 brand_href : baseURL + '/Feeds',
45 position : 'fixed-top',
47 '|xns' : 'Roo.bootstrap',
48 xtype : 'NavHeaderbar',
53 '|xns' : 'Roo.bootstrap',
57 html : _this._strings['d9cd9f7b44e0493c9604e9f8fb7a6c07'] /* Mark All Read */,
59 '|xns' : 'Roo.bootstrap',
63 html : _this._strings['8287b137f969bcae66ca51f7abf14308'] /* Show Previously Read */,
65 '|xns' : 'Roo.bootstrap',
69 html : _this._strings['83ca9a18d9507324a9453c92a7420dd2'] /* Report Issue */,
71 '|xns' : 'Roo.bootstrap',
83 style : 'margin-top:50px',
86 '|xns' : 'Roo.bootstrap',
89 render : function (_self)
94 rowclick : function (_self, el, rowIndex, e)
96 //var rec = this.store.getAt(rowIndex);
98 _this.articleCtr.load(rowIndex);
107 beforeload : function (_self, o)
109 o.params = o.params || {};
115 url : baseURL + '/Api/Reader_read',
126 "article_id_published_dt" ,
127 "article_id_headline" ,
129 "article_id_real_url" ,
130 'article_id_body_txt'
139 dataIndex : 'article_id_headline',
140 renderer : function(v,x,r) {
142 return String.format(
143 '<h3>{0}</h3><small>{1}</small><i class="rss-list-body">{2}</i>' +
144 '{3}<i class="fa fa-chevron-right"></i>',
145 r.data.article_id_headline,
146 r.data.article_id_published_dt,
147 r.data.article_id_body_txt,
148 r.data.has_read * 1 ? '<span class="badge">Read</span>' : ''
155 xtype : 'ColumnModel'
161 load : function(pos) {
165 Roo.MessageBox.alert("error", "show article got < 0");
168 // Roo.select('.hover-nav').show();
169 _this.table.hide(); // hopefully...
172 var rec = _this.table.store.getAt(pos);
173 if (typeof(rec.data.rss_body) == 'undefined') {
178 mask : 'Fetching Article',
179 params : {as_json : 1} ,
180 url : baseURL + '/FeedBody/' + rec.data.id,
181 success : function(res) {
183 rec.data.rss_body = res.data;
184 _this.articleCtr.load(pos);
193 _this.articleDate.el.update(rec.data.article_id_published_dt.split(' ')[0]);
195 _this.articleURL.el.update(String.format('<a href="{0}">{1}</a>',
196 rec.data.article_id_real_url,
197 rec.data.article_id_real_url.split('/')[2] // hopefull will not break.!
199 _this.articleTitle.el.update(String.format('{0}', rec.data.article_id_headline));
201 _this.articleBody.el.update(rec.data.rss_body || "Body has not been loaded",false, function() {
202 //Roo.log("body loaded");
204 var w = Roo.lib.Dom.getViewportWidth();
206 // resize the images...
207 _this.articleBody.el.select('img', true).each(function(im) {
208 if (im.getWidth() > w) {
209 var sf = w/im.getWidth()
210 im.setSize(w, im.getHeight() * sf);
218 // hide the summary...
224 //Roo.get(document.body).unmask();
226 //Roo.select('.rss-art-count').first().update((this.pos +1) +'/' + this.articles.elements.length);
228 // flag it as read...
232 url : baseURL + '/FeedBody/' + rec.data.id,
233 params : { flag_read : 1 },
234 success : function(res) { }
236 rec.set('has_read', 1);
238 //Roo.select('.rss-list-article-' +id +
239 // ' .count').show();
241 //Roo.select('.rss-list-article-' +id +
242 // ' .count').first().dom.innerHTML = 'Read';
244 //Roo.select('.rss-list-article-' +id +
245 // ' .chevron').first().hide();
248 //Roo.select('header h2').first().dom.innerHTML = this.feed_title + ' - ' +
249 // art.select('.rss-title').first().dom.innerH
252 '|xns' : 'Roo.bootstrap',
255 render : function (_self)
257 _this.articleCtr = this;
263 style : 'margin-top:50px;',
266 '|xns' : 'Roo.bootstrap',
270 html : _this._strings['44749712dbec183e983dcd78a7736c41'] /* Date */,
273 '|xns' : 'Roo.bootstrap',
276 render : function (_self)
278 _this.articleDate = this;
283 html : _this._strings['40c829f4b6cdd8753135704af571192f'] /* articleURL */,
286 '|xns' : 'Roo.bootstrap',
289 render : function (_self)
291 _this.articleURL = this;
297 html : _this._strings['b78a3223503896721cca1303f776159b'] /* Title */,
300 '|xns' : 'Roo.bootstrap',
303 render : function (_self)
305 _this.articleTitle = this;
313 '|xns' : 'Roo.bootstrap',
316 render : function (_self)
318 _this.articleBody = this;