forked from Echo3ToEcho7/app-catalog
-
Notifications
You must be signed in to change notification settings - Fork 192
/
Copy pathStatsBannerField.js
77 lines (66 loc) · 2.09 KB
/
StatsBannerField.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
(function() {
var Ext = window.Ext4 || window.Ext;
/**
* @private
* Allows displaying the stats banner settings
*
*
* @example
* Ext.create('Ext.Container', {
* items: [{
* xtype: 'rallystatsbannersettingsfield',
* value: {
* showStatsBanner: true
* }
* }],
* renderTo: Ext.getBody().dom
* });
*
*/
Ext.define('Rally.apps.iterationtrackingboard.StatsBannerField', {
extend: 'Ext.form.FieldContainer',
requires: [
'Rally.ui.CheckboxField'
],
alias: 'widget.rallystatsbannersettingsfield',
mixins: {
field: 'Ext.form.field.Field'
},
layout: 'hbox',
cls: 'stats-banner-settings',
config: {
/**
* @cfg {Object}
*
* The column settings value for this field
*/
value: undefined
},
initComponent: function() {
this.callParent(arguments);
this.mixins.field.initField.call(this);
this.add([
{
xtype: 'rallycheckboxfield',
name: 'showStatsBanner',
boxLabel: 'Show the Iteration Progress Banner',
submitValue: false,
margin: '0 0 0 80',
value: this.getValue().showStatsBanner
}
]);
},
/**
* When a form asks for the data this field represents,
* give it the name of this field and the ref of the selected project (or an empty string).
* Used when persisting the value of this field.
* @return {Object}
*/
getSubmitData: function() {
var data = {};
var showStatsBannerField = this.down('rallycheckboxfield');
data[showStatsBannerField.name] = showStatsBannerField.getValue();
return data;
}
});
})();