Sencha - 模态在另一个模态之上?

时间:2015-12-28 20:53:17

标签: extjs sencha-touch

另一个模态面板顶部的模态面板?

Sencha有可能吗?我的模态窗口打开,但它在我已打开的模态后打开。任何帮助将不胜感激。

另外......不确定这是否重要,但我对两种模态使用相同的控制器。

这是我的第二个模态视图:

Ext.define('CAMSApp.view.OpBuyoffVoidView', {
extend: 'Ext.Panel',
alias: ['widget.opbuyoffvoidview'], //ToDo Use I18N 
    config: {
        xtype: 'panel',
        cls: 'dialogview formview',
        centered: true,
        scrollable: 'vertical',
        modal: true,
        screenId: 'opbuyoffvoidview',
        layout: {
            type: 'vbox',
            align: 'center',
        },
        defaults: {
            minHeight: 46
        },
        items: [
        {
        xtype: 'toolbar',
        docked: 'top',
        title: 'Void Buyoff',
        cls: 'grey-bold-34pt',
        ui: 'transparent',
        items: [{
            xtype: 'button',
            cls: 'grey-bold-40pt greyBtn',
            text: 'Cancel',
            idForAction: 'opbuyoff-void-cancel_btn',
        },  {
            xtype: 'spacer',
        },{
            xtype: 'button',
            cls: 'grey-bold-40pt greyBtn',
            textI18N: 'Save',
            idForAction: 'opbuyoff-void-save_btn',
        }],
        },
        {
        xtype: 'container',
        ui: 'transparent',
        layout: 'vbox',
        cls: 'OpBuyoffVoidContainer',
        items: [{
            xtype: 'panel',
            flex: 1,
            ui: 'transparent',
            items: [{
                xtype: 'container',
                cls: 'formContainer dialogContentScrolling',
                items: [{
                    xtype: 'formpanel',
                    scrollable: null,
                    ui: 'transparent',
                    cls: 'fieldSetReadOnly',
                    defaults: {
                        xtype: 'textfield',
                        labelCls: 'lightgrey-bold-28pt',
                        readOnly: true,
                    },
                    items: [{
                        labelI18N: 'Buyoff:',
                    },{
                        id: 'buyoff_group_void',
                    },{
                        labelI18N: 'User:',
                    },{
                        id: 'buyoff_user_void',
                    }],
                }],
            },{
                xtype: 'label',
                htmlI18N: 'You are voiding the above Buyoff.  Please enter the reason for the void below:',
                //cls: 'priorityLowLabel',
            },{
                xtype: 'textareafield',
                idForUpdate: 'buyoff_reason_void',
                //cls: 'priorityMedLabel',
            },{
                xtype: 'label',
                htmlI18N: '*Reason is required to void a buyoff',
                //cls: 'priorityHighLabel',
            }],
        }],
    }],
        listeners: {
        initialize: function(me, eOpts) {
            CAMSApp.util.I18N.resolveStaticUIBindings(me); 
        },
        show: function (me, eOpts) {
            // Publish the screen id event.
            log('[OpBuyoffVoid.show]');
            CAMSApp.app.fireEvent('setscreenfocus', this);
        },
    },
}

});

1 个答案:

答案 0 :(得分:1)

那应该不是问题。当您打开2个模态窗口时,第二个窗口与第一个窗口重叠,其中z-index 10高于第一个窗口。我认为问题在于你显示模态窗口的顺序。看看我创建的一个快速小提琴,以便在ExtJS 6上进行验证

https://fiddle.sencha.com/#fiddle/133n