繁体   English   中英

如何在EXTJS中的另一个网格面板中添加Ext.window.window模式

[英]How to add the Ext.window.window modal positioned inside another grid panel in EXTJS

默认情况下,模态窗口将添加到正文中。 但是,我想在添加按钮单击事件时在面板中添加模态窗口。 我必须添加什么代码。 有人建议一个想法。

模态窗口代码:

        self.sampleWindow = Ext.create("Ext.window.Window", {
        title: 'Add Deals',
        layout: 'vbox',
        closeAction: 'hide',
        padding: 10,
        cls: 'custom-modal',
        constrain:'true',
        height: (mq.matches)?"77%":"70%",
        width: (mq.matches)?"67%":"60%",
        margin:'31 0 0 -36',
        scrollable : true,
        items: [self.buildSample(),
               self.buildSampleGrid()],
        listeners:{
            hide:function(win){
                win.close();
            }
        }
    });

小组代码:

var panel1 = Ext.create("Ext.panel.Panel",{
            id: 'dealInformationblock',
            minHeight:10,
            padding: 10,
            margin:(nq.matches)?'10 30 5 10':'10 10 5 0',
            cls: ['innerCard','card-layout-border'],
            layout:{
                type: 'vbox',
                align: 'center'
            },
            items:[
                SampleInformation
            ]
        })
        return panel1;

上面的模态窗口应放置在面板1内。

使用showAt( x, [y] )显示window.x和y应该是面板内的值。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM