添加多个过滤器到纸板app集会

时间:2014-12-26 08:23:45

标签: extjs extjs4.1 rally

我有一个纸板应用程序,显示每个PortfolioItem / Feature的卡片数量。同样它也在拉力赛平台Release Planning上。我想像那样实现过滤盒。

附上过滤器的屏幕截图,我想实现它。

enter image description here

1 个答案:

答案 0 :(得分:3)

您有时可以通过Rally App Catalog的开源代码获取应用的提示/代码。对于您的示例,Release Planning App有可用的源代码。查看源代码,您可以看到过滤器选择器由源中定义的以下要求定义:

Rally.ui.gridboard.plugin.GridBoardCustomFilterControl

通过将其插件添加到电路板配置中,将其整合到电路板中。

将其添加到Simple Grid示例中很有吸引力,就像Release规划板一样,我尝试按照以下方式执行此操作:

<!DOCTYPE html>
<html>
<head>
    <title>Rally Example: Simple Board</title>

    <script type="text/javascript" src="/apps/2.0rc3/sdk.js"></script>

    <script type="text/javascript">
        Rally.onReady(function () {
                Ext.define('Rally.example.SimpleBoard', {
                    extend: 'Rally.app.App',
                    requires: [
                        'Rally.ui.gridboard.plugin.GridBoardCustomFilterControl'
                    ],

                    launch: function() {
                        this.add({
                            xtype: 'rallycardboard',
                            types: ['User Story'],
                            attribute: 'ScheduleState',
                            context: this.getContext(),
                            readOnly: true,
                            cardConfig: {
                                showIconsAndHighlightBorder: false,
                                editable: false
                            },
                            plugins: [
                                {
                                    ptype: 'rallygridboardcustomfiltercontrol',
                                    filterChildren: false,
                                    filterControlConfig: {
                                        margin: '3 9 3 30',
                                        blackListFields: ['PortfolioItemType', 'Release'],
                                        whiteListFields: [this._milestonesAreEnabled() ? 'Milestones' : ''],
                                        modelNames: ['HierarchicalRequirement']                                           
                                    }
                                }
                            ]
                        });
                    }
                });

            Rally.launchApp('Rally.example.SimpleBoard', {
                name:"Rally Example: Simple Board",
                parentRepos:""
            });

        });
    </script>


    <style type="text/css">
        .app {
  /* Add app styles here */
}

    </style>
</head>
<body>
</body>
</html>

但是,如果您尝试以这种方式加载应用,那么当您查找Rally.ui.gridboard.plugin.GridBoardCustomFilterControl类时,您将获得404。

查看AppSDK2.0rc3 docs,此插件似乎在捆绑到SDK中的Rally.ui.cardboard.plugins。*树下可用。请看这里的截图:

AppSDK2.0rc3截图摘录:

AppSDK2.0rc3 screenshot excerpt

看起来似乎没有将Rally.ui.gridboard.plugin。*树捆绑到AppSDK中。然而,类可能是,可以通过Rally开发人员使用的不同javascript包(非公开)提供给Rally UI。

也许Rally Engineering将此插件捆绑到AppSDK中是可行的,这样客户开发人员就可以使用它 - 可能会在Rally Ideas上提交功能请求或类似的东西,看看这是否可以实现。