]> git.proxmox.com Git - extjs.git/blame - extjs/examples/classic/MVC/pandora/app/view/SongInfo.js
add extjs 6.0.1 sources
[extjs.git] / extjs / examples / classic / MVC / pandora / app / view / SongInfo.js
CommitLineData
6527f429
DM
1Ext.define('Pandora.view.SongInfo', {\r
2 extend: 'Ext.panel.Panel',\r
3 alias: 'widget.songinfo',\r
4 border: false,\r
5 \r
6 tpl: '<h1>About {artist}</h1><p>{description}</p>',\r
7 \r
8 initComponent: function() {\r
9 this.dockedItems = [{\r
10 xtype: 'container',\r
11 layout: {\r
12 type: 'hbox',\r
13 align: 'middle',\r
14 pack: 'end'\r
15 },\r
16 height: 100,\r
17 items: [{\r
18 xtype: 'component',\r
19 width: 200,\r
20 itemId: 'songdescription',\r
21 tpl: '<h2>{artist}</h2><h1>{name}</h1><h2>{album}</h2>'\r
22 }, {\r
23 xtype: 'button',\r
24 text: 'menu',\r
25 action: 'song-menu'\r
26 }]\r
27 }];\r
28 \r
29 this.callParent();\r
30 },\r
31 \r
32 update: function(record) {\r
33 var data = record ? record.data : {};\r
34 this.down('#songdescription').update(data);\r
35 this.callParent([data]);\r
36 }\r
37});