|
6 | 6 | */ |
7 | 7 | Ext4.define('Laboratory.panel.WorkbookHeaderPanel', { |
8 | 8 | extend: 'LDK.panel.WebpartPanel', |
| 9 | + panelTitle: 'Details', |
| 10 | + |
9 | 11 | initComponent: function(){ |
10 | 12 | Ext4.apply(this, { |
11 | | - title: 'Details', |
| 13 | + title: this.panelTitle, |
12 | 14 | defaults: { |
13 | 15 | border: false |
14 | 16 | }, |
15 | | - items: [{ |
16 | | - html: 'Description:', |
17 | | - style: 'font-weight: bold;' |
18 | | - }, |
19 | | - this.getFieldCfg('description', this.description) |
20 | | - ,{ |
21 | | - html: 'Materials:', |
22 | | - style: 'font-weight: bold;padding-top: 10px;' |
23 | | - }, |
24 | | - this.getFieldCfg('materials', this.materials) |
25 | | - ,{ |
26 | | - html: 'Methods:', |
27 | | - style: 'font-weight: bold;padding-top: 10px;' |
28 | | - }, |
29 | | - this.getFieldCfg('methods', this.methods) |
30 | | - ,{ |
31 | | - html: 'Results:', |
32 | | - style: 'font-weight: bold;padding-top: 10px;' |
33 | | - }, |
34 | | - this.getFieldCfg('results', this.results) |
35 | | - ,{ |
36 | | - html: 'Tags:', |
37 | | - style: 'font-weight: bold;padding-top: 10px;' |
38 | | - }, |
39 | | - this.getTagFieldCfg() |
40 | | - ] |
| 17 | + items: this.getPanelItems() |
41 | 18 | }); |
42 | 19 |
|
43 | 20 | this.callParent(arguments); |
44 | 21 | }, |
45 | 22 |
|
| 23 | + getPanelItems: function() { |
| 24 | + return [{ |
| 25 | + html: 'Description:', |
| 26 | + style: 'font-weight: bold;' |
| 27 | + }, |
| 28 | + this.getFieldCfg('description', this.description) |
| 29 | + ,{ |
| 30 | + html: 'Materials:', |
| 31 | + style: 'font-weight: bold;padding-top: 10px;' |
| 32 | + }, |
| 33 | + this.getFieldCfg('materials', this.materials) |
| 34 | + ,{ |
| 35 | + html: 'Methods:', |
| 36 | + style: 'font-weight: bold;padding-top: 10px;' |
| 37 | + }, |
| 38 | + this.getFieldCfg('methods', this.methods) |
| 39 | + ,{ |
| 40 | + html: 'Results:', |
| 41 | + style: 'font-weight: bold;padding-top: 10px;' |
| 42 | + }, |
| 43 | + this.getFieldCfg('results', this.results) |
| 44 | + ,{ |
| 45 | + html: 'Tags:', |
| 46 | + style: 'font-weight: bold;padding-top: 10px;' |
| 47 | + }, |
| 48 | + this.getTagFieldCfg() |
| 49 | + ]; |
| 50 | + }, |
| 51 | + |
46 | 52 | getTagFieldCfg: function(){ |
47 | 53 | var cfg = { |
48 | 54 | layout: 'hbox', |
|
0 commit comments