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 '2efe14eb257ad32579ef6080d295c3af' :"<i class=\"fa fa-chevron-left\"></i> Name of feed",
9 '40c829f4b6cdd8753135704af571192f' :"articleURL",
10 '8287b137f969bcae66ca51f7abf14308' :"Show Previously Read ",
11 'd9cd9f7b44e0493c9604e9f8fb7a6c07' :"Mark All Read",
12 'b78a3223503896721cca1303f776159b' :"Title",
13 'b7436cc90ecf26f15baeead978f09040' :"name of feed",
14 '83ca9a18d9507324a9453c92a7420dd2' :"Report Issue",
15 '44749712dbec183e983dcd78a7736c41' :"Date"
18 part : ["Reader", "Feed" ],
22 name : "unnamed module",
31 '|xns' : 'Roo.bootstrap',
35 html : _this._strings['b7436cc90ecf26f15baeead978f09040'] /* name of feed */,
36 style : 'font-weight: bold;\nfont-size: 22px;\n \nposition: static;\nleft: 100px;\ntop: 10px;\nz-Index: 2000;\ncolor: white;',
39 '|xns' : 'Roo.bootstrap',
42 click : function (_self, e)
44 if (this.state == 'READING') {
52 position : 'fixed-top',
54 '|xns' : 'Roo.bootstrap',
55 xtype : 'NavHeaderbar',
60 '|xns' : 'Roo.bootstrap',
64 html : _this._strings['d9cd9f7b44e0493c9604e9f8fb7a6c07'] /* Mark All Read */,
66 '|xns' : 'Roo.bootstrap',
70 html : _this._strings['8287b137f969bcae66ca51f7abf14308'] /* Show Previously Read */,
72 '|xns' : 'Roo.bootstrap',
76 html : _this._strings['83ca9a18d9507324a9453c92a7420dd2'] /* Report Issue */,
78 '|xns' : 'Roo.bootstrap',
85 html : _this._strings['2efe14eb257ad32579ef6080d295c3af'] /* <i class="fa fa-chevron-left"></i> Name of feed */,
87 '|xns' : 'Roo.bootstrap',
97 style : 'margin-top:50px',
100 '|xns' : 'Roo.bootstrap',
103 render : function (_self)
108 rowclick : function (_self, el, rowIndex, e)
110 //var rec = this.store.getAt(rowIndex);
112 _this.articleCtr.load(rowIndex);
121 beforeload : function (_self, o)
123 o.params = o.params || {};
129 url : baseURL + '/Api/Reader_read',
140 "article_id_published_dt" ,
141 "article_id_headline" ,
143 "article_id_real_url" ,
144 'article_id_body_txt'
153 dataIndex : 'article_id_headline',
154 renderer : function(v,x,r) {
156 return String.format(
157 '<h3>{0}</h3><small>{1}</small><i class="rss-list-body">{2}</i>' +
158 '{3}<i class="fa fa-chevron-right"></i>',
159 r.data.article_id_headline,
160 r.data.article_id_published_dt,
161 r.data.article_id_body_txt,
162 r.data.has_read * 1 ? '<span class="badge">Read</span>' : ''
169 xtype : 'ColumnModel'
176 load : function(pos) {
180 Roo.MessageBox.alert("error", "show article got < 0");
183 // Roo.select('.hover-nav').show();
184 _this.table.hide(); // hopefully...
187 var rec = _this.table.store.getAt(pos);
188 if (typeof(rec.data.rss_body) == 'undefined') {
193 mask : 'Fetching Article',
194 params : {as_json : 1} ,
195 url : baseURL + '/FeedBody/' + rec.data.id,
196 success : function(res) {
198 rec.data.rss_body = res.data;
199 _this.articleCtr.load(pos);
208 _this.articleDate.el.update(rec.data.article_id_published_dt.split(' ')[0]);
210 _this.articleURL.el.update(String.format('<a href="{0}">{1}</a>',
211 rec.data.article_id_real_url,
212 rec.data.article_id_real_url.split('/')[2] // hopefull will not break.!
214 _this.articleTitle.el.update(String.format('{0}', rec.data.article_id_headline));
216 _this.articleBody.el.update(rec.data.rss_body || "Body has not been loaded",false, function() {
217 //Roo.log("body loaded");
219 var w = Roo.lib.Dom.getViewportWidth();
221 // resize the images...
222 _this.articleBody.el.select('img', true).each(function(im) {
223 if (im.getWidth() > w) {
224 var sf = w/im.getWidth()
225 im.setSize(w, im.getHeight() * sf);
233 // hide the summary...
239 //Roo.get(document.body).unmask();
241 //Roo.select('.rss-art-count').first().update((this.pos +1) +'/' + this.articles.elements.length);
243 // flag it as read...
247 url : baseURL + '/FeedBody/' + rec.data.id,
248 params : { flag_read : 1 },
249 success : function(res) { }
251 rec.set('has_read', 1);
253 //Roo.select('.rss-list-article-' +id +
254 // ' .count').show();
256 //Roo.select('.rss-list-article-' +id +
257 // ' .count').first().dom.innerHTML = 'Read';
259 //Roo.select('.rss-list-article-' +id +
260 // ' .chevron').first().hide();
263 //Roo.select('header h2').first().dom.innerHTML = this.feed_title + ' - ' +
264 // art.select('.rss-title').first().dom.innerH
267 '|xns' : 'Roo.bootstrap',
270 render : function (_self)
272 _this.articleCtr = this;
278 style : 'margin-top:50px;',
281 '|xns' : 'Roo.bootstrap',
285 html : _this._strings['44749712dbec183e983dcd78a7736c41'] /* Date */,
288 '|xns' : 'Roo.bootstrap',
291 render : function (_self)
293 _this.articleDate = this;
298 html : _this._strings['40c829f4b6cdd8753135704af571192f'] /* articleURL */,
301 '|xns' : 'Roo.bootstrap',
304 render : function (_self)
306 _this.articleURL = this;
312 html : _this._strings['b78a3223503896721cca1303f776159b'] /* Title */,
315 '|xns' : 'Roo.bootstrap',
318 render : function (_self)
320 _this.articleTitle = this;
328 '|xns' : 'Roo.bootstrap',
331 render : function (_self)
333 _this.articleBody = this;