3

全部,

在弄乱 2.0p5 中的新卡片时,我注意到不再有可用于更改标题或实际卡片内容的模板。

有人可以确认这是不可用的,只是想确保我不会在任何地方错过它......

真的没有办法改变卡的显示吗?

只是为了清楚起见,在 2.0p2 中,您可以在 Card 的 Ext.define 中执行 buildContent 函数或 buildHeader 函数。

4

1 回答 1

3

卡片不再有可以直接修改的模板,但是您可以创建自定义 CardContent 插件来显示自定义 html:

Ext.define('Rally.ui.cardboard.plugin.MyCardContent', {
    alias: 'plugin.rallymycardcontent',
    extend: 'Rally.ui.cardboard.plugin.CardContent',
    getHtml: function() {
        var html = this.callParent(arguments);
        return html + '<span>mycontent</span>';
    }
});

然后配置您的 CardBoard 以使用自定义插件:

Ext.create('Rally.ui.cardboard.CardBoard', {
    types: ['User Story', 'Defect'],
    attribute: "ScheduleState",
    fieldNames: ['Tasks'], // display task information inline on card
    cardConfig: {
        // overriding plugins to add the custom plugin
        // be sure to include the default plugins.
        plugins: [
            {ptype: 'rallycardheader'},
            {ptype: 'rallymycardcontent'},
            {ptype: 'rallycardpopover'}
        ]
    }
});
于 2012-12-05T23:24:54.850 回答