UI和info_dialog Jqgrid [英] UI and info_dialog Jqgrid

查看:146
本文介绍了UI和info_dialog Jqgrid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用UI对话框时,如何为info_dialog设置z-index?

How do I set the z-index for info_dialog, when using UI dialog ?

推荐答案

此处).所以你可以做类似的事情

$.jgrid.info_dialog uses internally $.jgrid.createModal which uses $.jgrid.jqModal (see the line) which introduced since not so long time (see my suggestion here). So you can do something like

$.jgrid.jqModal = $.extend($.jgrid.jqModal || {}, {
    zIndex: 1234
});

由于navGrid的另一个参数,您必须另外添加

because of another parameter of navGrid you have to add additionally

$.extend($.jgrid.nav, {
    alertzIndex: 1234
});

使$.jgrid.jqModal.zIndex设置生效.

已更新:您可以通过任何方式使用$.jgrid.info_dialog的子类化"(例如答案).相应的代码可能如下所示:

UPDATED: In any way you can use "subclassing" of $.jgrid.info_dialog (like in the answer for example). The corresponding code could be like the following:

var oldInfoDialog = $.jgrid.info_dialog;
$.extend($.jgrid,{
    info_dialog: function (caption, content, c_b, modalopt) {
        if (modalopt && (modalopt.zIndex === null || modalopt.zIndex === undefined ||
            (typeof modalopt.zIndex === "number" && modalopt.zIndex < 1234))) {

            modalopt.zIndex = 1234;
        }
        return oldInfoDialog.call (this, caption, content, c_b, modalopt);
    }
});

这篇关于UI和info_dialog Jqgrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆