UI 和 info_dialog Jqgrid [英] UI and 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 内部使用 $.jgrid.createModal 使用 $.jgrid.jqModal
(参见 行) 不久就引入了(见我的建议 这里).所以你可以做类似的事情
$.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屋!