forked from RallyApps/app-catalog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PlaceholderColumn.js
84 lines (63 loc) · 2.23 KB
/
PlaceholderColumn.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
76
77
78
79
80
81
82
83
84
(function () {
var Ext = window.Ext4 || window.Ext;
Ext.define('Rally.apps.roadmapplanningboard.PlaceholderColumn', {
extend: 'Ext.Component',
alias: 'widget.cardboardplaceholdercolumn',
requires: [ 'Rally.ui.cardboard.Column', 'Rally.ui.cardboard.ColumnHeader' ],
mixins: [ 'Rally.apps.roadmapplanningboard.mixin.CollapsableHeaderContainer' ],
afterRender: function () {
this.drawHeader();
this.fireEvent('ready', this);
},
drawHeader: function () {
var config = {
renderTo: Ext.get(this.headerCell)
};
Ext.fly(this.headerCell).addCls('planning-column');
this.columnHeader = Ext.widget(Ext.merge(config, this.columnHeaderConfig));
// Add a couple of containers to match the structure of the timeframe planning column header
this.columnHeader.add(this._getCollapsableHeaderContainerConfig(this._getTemplateConfig()));
},
_getTemplateConfig: function() {
return {
tpl: [
'<div class="timeframeDatesContainer"></div>',
'<div class="progress-bar-background"></div>',
'<div class="theme_container"></div>'
],
data: {}
};
},
getColumnHeader: function() {
return this.columnHeader;
},
getColumnHeaderCell: function () {
return Ext.get(this.headerCell);
},
getContentCell: function () {
return Ext.get(this.contentCell);
},
getCards: function () {
return [];
},
findCardInfo: function () {
return null;
},
isMatchingRecord: function () {
return false;
},
isVisible: function () {
return true;
},
refresh: function () {
this.fireEvent('ready', this);
return null;
},
getHeaderTitle: function () {
return this.columnHeader.down('#headerTitle');
},
getMinWidth: function () {
return Rally.ui.cardboard.Column.prototype.getMinWidth();
}
});
})();