3 This file is part of Ext JS 4
5 Copyright (c) 2011 Sencha Inc
7 Contact: http://www.sencha.com/contact
9 GNU General Public License Usage
10 This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
12 If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
16 * @class FeedViewer.FeedInfo
17 * @extends Ext.tab.Panel
19 * A container class for showing a series of feed details
22 * Create a new Feed Info
23 * @param {Object} config The config object
25 Ext.define('FeedViewer.FeedInfo', {
27 extend: 'Ext.tab.Panel',
28 alias: 'widget.feedinfo',
33 initComponent: function() {
43 * @param {String} title The title of the feed
44 * @param {String} url The url of the feed
46 addFeed: function(title, url){
47 var active = this.items.first();
56 opentab: this.onTabOpen,
57 openall: this.onOpenAll,
58 rowdblclick: this.onRowDblClick
63 active.tab.setText(title);
65 this.setActiveTab(active);
69 * Listens for a new tab request
71 * @param {FeedViewer.FeedPost} The post
72 * @param {Ext.data.Model} model The model
74 onTabOpen: function(post, rec) {
77 if (Ext.isArray(rec)) {
78 Ext.each(rec, function(rec) {
82 title: rec.get('title'),
94 title: rec.get('title'),
99 this.setActiveTab(item);
104 * Listens for a row dblclick
106 * @param {FeedViewer.Detail} detail The detail
107 * @param {Ext.data.Model} model The model
109 onRowDblClick: function(info, rec){
110 this.onTabOpen(null, rec);
114 * Listens for the open all click
116 * @param {FeedViewer.FeedDetail}
118 onOpenAll: function(detail) {
119 this.onTabOpen(null, detail.getFeedData());