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 '8287b137f969bcae66ca51f7abf14308' :"Show Previously Read ",
9 'd9cd9f7b44e0493c9604e9f8fb7a6c07' :"Mark All Read",
10 'b7436cc90ecf26f15baeead978f09040' :"name of feed",
11 '83ca9a18d9507324a9453c92a7420dd2' :"Report Issue"
14 part : ["Reader", "Feed" ],
18 name : "unnamed module",
27 '|xns' : 'Roo.bootstrap',
31 html : _this._strings['b7436cc90ecf26f15baeead978f09040'] /* name of feed */,
32 style : 'font-weight: bold;\nfont-size: 22px;\n \nposition: absolute;\nleft: 100px;\ntop: 10px;\nz-Index: 1000;\ncolor: white;',
35 '|xns' : 'Roo.bootstrap',
39 brand : '<i class=\"fa fa-chevron-left\"></i> Feeds',
40 brand_href : baseURL + '/Feeds',
42 position : 'fixed-top',
44 '|xns' : 'Roo.bootstrap',
45 xtype : 'NavHeaderbar',
50 '|xns' : 'Roo.bootstrap',
54 html : _this._strings['d9cd9f7b44e0493c9604e9f8fb7a6c07'] /* Mark All Read */,
56 '|xns' : 'Roo.bootstrap',
60 html : _this._strings['8287b137f969bcae66ca51f7abf14308'] /* Show Previously Read */,
62 '|xns' : 'Roo.bootstrap',
66 html : _this._strings['83ca9a18d9507324a9453c92a7420dd2'] /* Report Issue */,
68 '|xns' : 'Roo.bootstrap',
80 style : 'margin-top:50px',
83 '|xns' : 'Roo.bootstrap',
86 render : function (_self)
91 rowclick : function (_self, el, rowIndex, e)
93 var rec = this.store.getAt(rowIndex);
103 beforeload : function (_self, o)
105 o.params = o.params || {};
111 url : baseURL + '/Api/Reader_read',
122 "article_id_published_dt" ,
123 "article_id_headline" ,
125 "article_id_real_url" ,
126 'article_id_body_txt'
135 dataIndex : 'article_id_headline',
136 renderer : function(v,x,r) {
138 return String.format(
139 '<h3>{0}</h3><small>{1}</small><i class="rss-list-body">{2}</i>' +
140 '{3}<i class="fa fa-chevron-right"></i>',
141 r.data.article_id_headline,
142 r.data.article_id_published_dt,
143 r.data.article_id_body_txt,
144 r.data.has_read * 1 ? '<span class="badge">Read</span>' : ''
151 xtype : 'ColumnModel'
157 loadArticle : function(pos) {
161 Roo.MessageBox.alert("error", "show article got < 0");
164 // Roo.select('.hover-nav').show();
166 var sum = Roo.select('.rss-list',true).first();
168 return; // we are not on a show article page...
171 sum.setVisibilityMode(Roo.Element.DISPLAY);
174 Roo.log('showArticle ' + pos);
177 if (this.pos !== false) {
181 art = this.articles.elements[this.pos];
183 //this.showArticle(pos);
184 //this.showArticle.defer(500,this,[pos]);
190 var art = this.articles.elements[this.pos];
192 var id = art.id.replace(/article\-/,'');
195 var abody = art.select('.rss-body-preview',true).first();
196 Roo.select('.content').first().dom.scrollTop= 0;
197 if (typeof(art.rss_body) == 'undefined') {
201 mask : 'Fetching Article',
202 url : baseURL + '/FeedBody/' + id,
203 success : function(res) {
204 art.rss_body = res.responseText;
205 Rss.showArticle(pos);
215 abody.update(art.rss_body || "Body has not been loaded",false, function() {
216 //Roo.log("body loaded");
218 var w = Roo.lib.Dom.getViewportWidth();
220 Roo.select('img', true).each(function(im) {
221 if (im.getWidth() > w) {
222 var sf = w/im.getWidth()
223 im.setSize(w, im.getHeight() * sf);
231 // hide the summary...
237 Roo.get(document.body).unmask();
239 Roo.select('.rss-art-count').first().update((this.pos +1) +'/' + this.articles.elements.length);
241 // flag it as read...
245 url : baseURL + '/FeedBody/' + id,
246 params : { flag_read : 1 },
247 success : function(res) { },
251 Roo.select('.rss-list-article-' +id +
252 ' .count').first().dom.innerHTML = 'Read';
254 Roo.select('.rss-list-article-' +id).addClass('rss-list-article-read-status-1');
256 Roo.select('.rss-list-article-' +id +
259 Roo.select('.rss-list-article-' +id +
260 ' .count').first().dom.innerHTML = 'Read';
262 Roo.select('.rss-list-article-' +id +
263 ' .chevron').first().hide();
266 //Roo.select('header h2').first().dom.innerHTML = this.feed_title + ' - ' +
267 // art.select('.rss-title').first().dom.innerH
270 '|xns' : 'Roo.bootstrap',