forked from RallyApps/app-catalog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTeamBoardSettings.js
60 lines (54 loc) · 1.87 KB
/
TeamBoardSettings.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
(function() {
var Ext = window.Ext4 || window.Ext;
Ext.define('Rally.apps.teamboard.TeamBoardSettings', {
requires: [
'Rally.ui.picker.FieldPicker',
'Rally.ui.picker.MultiObjectPicker'
],
singleton: true,
getFields: function(){
return [this._getTeamsPickerConfig(), this._getFieldPickerConfig()];
},
_getTeamsPickerConfig: function(){
return {
xtype: 'rallymultiobjectpicker',
alwaysExpanded: true,
availableTextLabel: 'Available Teams',
fieldLabel: 'Teams',
pickerCfg: {
style: {
border: '1px solid #DDD',
'border-top': 'none'
},
height: 248,
shadow: false
},
margin: '10px 0 265px 0',
maintainScrollPosition: true,
modelType: 'Project',
name: 'teamOids',
pickerAlign: 'tl-bl',
selectedTextLabel: 'Selected Teams',
selectionKey: 'ObjectID',
storeLoadOptions: {
params: {
order: 'Name ASC'
}
},
width: 300
};
},
_getFieldPickerConfig: function(){
var config = {
xtype: 'rallyfieldpicker',
fieldLabel: 'Card Fields',
name: 'cardFields',
modelTypes: ['User']
};
if(!Rally.environment.getContext().getPermissions().isWorkspaceOrSubscriptionAdmin()){
config.fieldWhiteList = Rally.apps.teamboard.TeamBoardApp.ATTRIBUTES_VISIBLE_TO_WS_NON_ADMIN_USERS;
}
return config;
}
});
})();