Rally 应用程序在汇流中扩展到全屏

Rally 应用程序在汇流中扩展到全屏,rally,confluence,Rally,Confluence,我正试图通过SDK向Confluence添加一个拉力赛应用程序。我成功了,但是,该应用程序扩展到整个页面,覆盖合流标题。如何限制应用程序全屏扩展?我添加了一个类来限制应用程序的高度和宽度,但它仍然可以扩展到覆盖汇流头的全屏 这是我的密码: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-

我正试图通过SDK向Confluence添加一个拉力赛应用程序。我成功了,但是,该应用程序扩展到整个页面,覆盖合流标题。如何限制应用程序全屏扩展?我添加了一个类来限制应用程序的高度和宽度,但它仍然可以扩展到覆盖汇流头的全屏

这是我的密码:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Hierarchical Grid Example</title>
<script type="text/javascript"
    src="https://rally1.rallydev.com/apps/2.0rc3/sdk.js">
</script>
<script type="text/javascript">
    Ext.override('Rally.sdk.Bootstrapper', {
        _launchAppInViewport: function (className, settings, timeboxScope) {
            this._wireIoHeaderHandlers();
            this.app = this._createApp(className, settings, timeboxScope);
            this.app.render('rallyDiv');
        }
    });
        Rally.onReady(function() {
        Ext.define('Rally.example.HierarchicalGrid', {
                extend: 'Rally.app.App',
                componentCls: 'app',
                items: [
                { xtype: 'container', itemId: 'rallyDiv'}
                ],
                autoCreateViewPort:false,
                launch: function() {
                    Ext.create('Rally.data.wsapi.TreeStoreBuilder').build({
                        context: {project: '/project/9400054800'},
                        models: ['userstory'],
                        autoLoad: true,
                        enableHierarchy: true
                    }).then({
                        success: this._onStoreBuilt,
                        scope: this
                    });
                },            
                _onStoreBuilt: function(store) {
                    this.down('#rallyDiv').add({
                        xtype: 'rallytreegrid',
                        context: this.getContext(),
                        store: store,
                        columnCfgs: [
                            'Name',
                            'ScheduleState',
                            'Owner'
                        ]
                    });
                }
            });

            Rally.launchApp('Rally.example.HierarchicalGrid', {
              name: 'Hierarchical Grid Example',
            });
        });
    </script>
</head>

<body>
<div id="rallyDiv"></div>
</body>
</html>

谢谢

应用程序设计用于填充整个窗口,并使用视口对象来完成此操作-这就是它填充屏幕的原因。是否可以只创建一个大小合适的iframe并链接到其他地方提供的App-external.html

否则,您应该能够在App.js的顶部添加一个小覆盖,以更改Rally.launchApp的行为,从而实现您想要的:

Ext.override('Rally.sdk.Bootstrapper', {
    _launchAppInViewport: function (className, settings, timeboxScope) {
        this._wireIoHeaderHandlers();
        this.app = this._createApp(className, settings, timeboxScope);

        //this is the code that launches the app in the viewport
        //Ext.create('Ext.Viewport', {
        //    layout: 'fit',
        //    items: [ this.app ]
        //});

        //instead, just render it to your target div
        this.app.render('myElement');
    }
});

这并不理想,但应该适合你。我将提交一个功能请求,以更好地支持非全屏环境中的渲染应用程序。

是的,我可以使用iframe,但我希望使用autoCreateViewPort:false之类的工具禁用视口,或者使用renderto将其渲染到div,但我似乎无法实现这两种功能。建议?非常感谢你的帮助。凯尔,你能更明确一点我是如何添加覆盖的吗?我假设它位于App.js的顶部。我需要在您的代码中更改什么才能使其与我的代码一起工作?我知道部门ID肯定需要更改。我是否取消了Ext.create'Ext.Viewport'代码的注释并将代码合并到那里?谢谢是的,只需将覆盖块添加到上面包含的Ext.override行上方。您可以删除注释掉的外部视口代码。然后只需将“myElement”更改为您希望应用程序呈现到的div的id。我修改了上面的代码以包含您的覆盖,但它仍然没有呈现到div标记。它对你有用吗?