]> git.proxmox.com Git - extjs.git/blob - extjs/build/examples/classic/app/feed-viewer/app/view/feed/Add.js
add extjs 6.0.1 sources
[extjs.git] / extjs / build / examples / classic / app / feed-viewer / app / view / feed / Add.js
1 Ext.define('FV.view.feed.Add', {
2 extend: 'Ext.window.Window',
3
4 alias: 'widget.feedwindow',
5
6 requires: ['Ext.form.Panel', 'Ext.form.field.ComboBox'],
7
8 defaultFeeds: [
9 ['http://rss.cnn.com/rss/edition.rss', 'CNN Top Stories'],
10 ['http://sports.espn.go.com/espn/rss/news', 'ESPN Top News'],
11 ['http://news.google.com/news?ned=us&topic=t&output=rss', 'Sci/Tech - Google News'],
12 ['http://rss.news.yahoo.com/rss/software', 'Yahoo Software News']
13 ],
14
15 defaultFocus: '#feed',
16
17 width: 500,
18 title: 'Add Feed',
19 iconCls: 'feed-add',
20 layout: 'fit',
21 modal: true,
22 plain: true,
23
24 initComponent: function() {
25 Ext.apply(this, {
26 buttons: [{
27 text: 'Add feed',
28 action: 'create'
29 }, {
30 text: 'Cancel',
31 scope: this,
32 handler: this.close
33 }],
34
35 items: [{
36 xtype: 'form',
37 bodyPadding: '12 10 10',
38 border: false,
39 unstyled: true,
40 items: [{
41 itemId: 'feed',
42 anchor: '0',
43 fieldLabel: 'Enter the URL of the feed to add',
44 labelAlign: 'top',
45 msgTarget: 'under',
46 xtype: 'combo',
47 store: this.defaultFeeds,
48 getInnerTpl: function() {
49 return '<div class="feed-picker-url">{field1}</div><div class="feed-picker-title">{field2}</div>';
50 }
51 }]
52 }]
53 });
54
55 this.callParent(arguments);
56 }
57 });