-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathStoryTreeItem.js
37 lines (35 loc) · 1.37 KB
/
StoryTreeItem.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
Ext.define('PlanIterationsAndReleases.StoryTreeItem', {
extend: 'Rally.ui.tree.TreeItem',
alias: 'widget.rallystorytreeitem',
getPillTpl: function(){
var me = this;
return Ext.create('Ext.XTemplate',
'<div class="pill">',
'<tpl if="this.canDrag()"><div class="icon drag"></div></tpl>',
'{[this.getActionsGear()]}',
'<div class="textContent ellipses">{[this.getFormattedId()]} - {Name}</div>',
'<div class="rightSide">',
'{[this.getPlanEstimate(values)]}',
'</div>',
'</div>',
{
canDrag: function(){
return me.getCanDrag();
},
getActionsGear: function(){
return '<div class="row-action icon"></div>';
},
getFormattedId: function(){
return me.getRecord().getField('FormattedID')? me.getRecord().render('FormattedID'): '';
},
getPlanEstimate: function(){
if(me.getRecord().get('PlanEstimate') > 0){
return '<div class="planEstimate">' + me.getRecord().get('PlanEstimate') + '</div>';
} else {
return '';
}
}
}
);
}
});