Reader/Feed.bjs
[web.Reader] / Reader / Feed.js
1 //<script type="text/javascript">
2
3 // Auto generated file - created by app.Builder.js- do not edit directly (at present!)
4
5 Feed = new Roo.XComponent({
6
7  _strings : {
8   '8287b137f969bcae66ca51f7abf14308' :"Show Previously Read ",
9   'd9cd9f7b44e0493c9604e9f8fb7a6c07' :"Mark All Read",
10   'b7436cc90ecf26f15baeead978f09040' :"name of feed",
11   '83ca9a18d9507324a9453c92a7420dd2' :"Report Issue"
12  },
13
14   part     :  ["Reader", "Feed" ],
15   order    : '-Feed',
16   region   : 'center',
17   parent   : false,
18   name     : "unnamed module",
19   disabled : false, 
20   permname : '', 
21   _tree : function()
22   {
23    var _this = this;
24    var MODULE = this;
25    return {
26    xns : Roo.bootstrap,
27    '|xns' : 'Roo.bootstrap',
28    xtype : 'Body',
29    items  : [
30     {
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;',
33      tag : 'div',
34      xns : Roo.bootstrap,
35      '|xns' : 'Roo.bootstrap',
36      xtype : 'Element'
37     },
38     {
39      brand : '<i class=\"fa fa-chevron-left\"></i> Feeds',
40      brand_href : baseURL + '/Feeds',
41      inverse : true,
42      position : 'fixed-top',
43      xns : Roo.bootstrap,
44      '|xns' : 'Roo.bootstrap',
45      xtype : 'NavHeaderbar',
46      items  : [
47       {
48        align : 'right',
49        xns : Roo.bootstrap,
50        '|xns' : 'Roo.bootstrap',
51        xtype : 'NavGroup',
52        items  : [
53         {
54          html : _this._strings['d9cd9f7b44e0493c9604e9f8fb7a6c07'] /* Mark All Read */,
55          xns : Roo.bootstrap,
56          '|xns' : 'Roo.bootstrap',
57          xtype : 'NavItem'
58         },
59         {
60          html : _this._strings['8287b137f969bcae66ca51f7abf14308'] /* Show Previously Read  */,
61          xns : Roo.bootstrap,
62          '|xns' : 'Roo.bootstrap',
63          xtype : 'NavItem'
64         },
65         {
66          html : _this._strings['83ca9a18d9507324a9453c92a7420dd2'] /* Report Issue */,
67          xns : Roo.bootstrap,
68          '|xns' : 'Roo.bootstrap',
69          xtype : 'NavItem'
70         }
71        ]
72       }
73      ]
74     },
75     {
76      hover : true,
77      responsive : true,
78      striped : true,
79      style : 'margin-top:50px',
80      thead : false,
81      xns : Roo.bootstrap,
82      '|xns' : 'Roo.bootstrap',
83      xtype : 'Table',
84      listeners : {
85       render : function (_self)
86        {
87            _this.table = this;
88            this.store.load({});
89        }
90      },
91      store : {
92       remoteSort : true,
93       xns : Roo.data,
94       '|xns' : 'Roo.data',
95       xtype : 'Store',
96       listeners : {
97        beforeload : function (_self, o)
98         {
99             o.params = o.params || {};
100             o.params.feed = 83;
101         }
102       },
103       proxy : {
104        method : 'GET',
105        url : baseURL + '/Api/Reader_read',
106        xns : Roo.data,
107        '|xns' : 'Roo.data',
108        xtype : 'HttpProxy'
109       },
110       reader : {
111        fields : [
112                "id",
113                    "article_id",
114                    "has_read",
115                    "article_id_id" ,
116                    "article_id_published_dt" ,
117                    "article_id_headline" ,
118                    "article_id_body" ,
119                    "article_id_real_url" ,
120                    'article_id_body_txt'
121                ],
122        xns : Roo.data,
123        '|xns' : 'Roo.data',
124        xtype : 'JsonReader'
125       }
126      },
127      cm : [
128       {
129        dataIndex : 'article_id_headline',
130        renderer : function(v,x,r) {
131           
132           return String.format(
133                    '<h3>{0}</h3><small>{1}</small><i class="rss-list-body">{2}</i>' + 
134                        '{3}<i class="fa fa-chevron-right"></i>',
135                r.data.article_id_headline,
136                r.data.article_id_published_dt,
137                r.data.article_id_body_txt,
138                r.data.has_read * 1 ? '<span class="badge">Read</span>' : ''
139            );
140                    
141         
142         },
143        xns : Roo.grid,
144        '|xns' : 'Roo.grid',
145        xtype : 'ColumnModel'
146       }
147      ]
148     }
149    ]
150   };  }
151 });