2 * @class FeedViewer.FeedInfo
3 * @extends Ext.tab.Panel
5 * A container class for showing a series of feed details
8 * Create a new Feed Info
9 * @param {Object} config The config object
11 Ext.define('FeedViewer.FeedInfo', {
13 extend: 'Ext.tab.Panel',
14 alias: 'widget.feedinfo',
19 initComponent: function() {
29 * @param {String} title The title of the feed
30 * @param {String} url The url of the feed
32 addFeed: function(title, url){
33 var active = this.items.first();
42 opentab: this.onTabOpen,
43 openall: this.onOpenAll,
44 rowdblclick: this.onRowDblClick
49 active.tab.setText(title);
51 this.setActiveTab(active);
55 * Listens for a new tab request
57 * @param {FeedViewer.FeedPost} The post
58 * @param {Ext.data.Model} model The model
60 onTabOpen: function(post, rec){
64 title: rec.get('title'),
69 item.tab.setClosable(true);
70 this.setActiveTab(item);
74 * Listens for a row dblclick
76 * @param {FeedViewer.Detail} detail The detail
77 * @param {Ext.data.Model} model The model
79 onRowDblClick: function(info, rec){
80 this.onTabOpen(null, rec);
84 * Listens for the open all click
86 * @param {FeedViewer.FeedDetail}
88 onOpenAll: function(detail){
89 var items = detail.getFeedData();
90 Ext.each(items, function(rec){
91 this.onTabOpen(null, rec);