X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/examples/app/feed-viewer/app/view/feed/Add.js diff --git a/examples/app/feed-viewer/app/view/feed/Add.js b/examples/app/feed-viewer/app/view/feed/Add.js new file mode 100644 index 00000000..21cc279b --- /dev/null +++ b/examples/app/feed-viewer/app/view/feed/Add.js @@ -0,0 +1,53 @@ +Ext.define('FV.view.feed.Add', { + extend: 'Ext.window.Window', + + alias: 'widget.feedwindow', + + requires: ['Ext.form.Panel', 'Ext.form.field.ComboBox'], + + defaultFeeds: [ + ['http://rss.cnn.com/rss/edition.rss', 'CNN Top Stories'], + ['http://sports.espn.go.com/espn/rss/news', 'ESPN Top News'], + ['http://news.google.com/news?ned=us&topic=t&output=rss', 'Sci/Tech - Google News'], + ['http://rss.news.yahoo.com/rss/software', 'Yahoo Software News'] + ], + + height: 129, + width: 400, + title: 'Add Feed', + closeAction: 'hide', + iconCls: 'rss', + layout: 'fit', + + initComponent: function() { + Ext.apply(this, { + buttons: [{ + text: 'Add feed', + action: 'create' + }, { + text: 'Cancel', + scope: this, + handler: this.close + }], + + items: [{ + xtype: 'form', + bodyStyle: 'padding: 10px;', + items: [{ + itemId: 'feed', + anchor: '0', + fieldLabel: 'Enter the URL of the feed to add', + labelAlign: 'top', + msgTarget: 'under', + xtype: 'combo', + store: this.defaultFeeds, + getInnerTpl: function() { + return '
{field1}
{field2}
'; + } + }] + }] + }); + + this.callParent(arguments); + } +});