我想限制一些用户在看板上看到的内容。所以开发人员接受,作为ToDo并发布。我试过这个
Ext.define('CustomApp', {
extend: 'Rally.app.App',
launch: function() {
var cardBoardConfig = {
xtype: 'KanbanCardBoard',
cardConfig: { xtype: 'KanBanCard'},
types: ['User Story', 'Defect'],
attribute: "KanbanState",
storeConfig:{
filters: [{
property: 'KanbanState',
operator: '<',
value: 'Released'
}],
},
listeners: {
columnsretrieved: this._columnsretrieved,
}
};
this.add(cardBoardConfig);
},
_columnsretrieved: function(firstObj, retrievedColumns) { retrievedColumns = retrievedColumns.slice(2,8);} //remove first 2 and last one
});
然后这个
Ext.define('Rally.ui.cardboard.KanbanCardBoard', {
extend: 'Rally.ui.cardboard.CardBoard',
alias: 'widget.KanbanCardBoard',
_renderColumns: function() {
this.columnDefinitions.slice(2, 8); //remove first 2 and last one
if (this.columnDefinitions.length) {
this.add(this.columnDefinitions);
this.columnDefinitions[0].addCls("firstColumn");
this.columnDefinitions[this.columnDefinitions.length - 1].addCls("lastColumn");
this.showMask(this.maskMsg || 'Loading...');
}
}
});
但我不能限制显示的列。即使我将它们切掉,所有列仍然显示。