Fre jqGrid 4.8.0 - 更改模态颜色
Fre jqGrid 4.8.0 - Changing the modal colors
我熟悉覆盖模态行为的技巧:
$.extend($.jgrid, {
showModal : function(h) {
h.w.show("blind");
},
closeModal : function(h) {
h.w.hide("blind").attr("aria-hidden", "true");
if(h.o) {h.o.remove();}
}
});
我也在寻找一种方法来更改相同模式的颜色 header。 (我不想更改整个 .ui-widget-header 的颜色,只是为了那个特定的模态 window)。我可以使用某种 "h.w.css" 实现吗?
这是打开此模式的方式:
$(nameOfGrid).jqGrid('searchGrid', {
multipleSearch:true,
showQuery: true,
multipleGroup:true,
caption: "Advanced Search",
sFilter: "afilters",
Find: "Apply",
Reset: "Reset & Close",
closeAfterReset: true,
closeAfterSearch: false,
searchOnEnter: true,
width:'auto',
recreateForm: true,
recreateFilter: false,
errorcheck: true,
overlay:false,
谢谢,
您可以在 header 模态对话框创建后添加额外的 class。搜索对话框 header 的 ID 将由前缀 searchhdfbox_
和网格 ID 构成。因此,您可以执行以下操作
var $grid = $(nameOfGrid);
// create the Searching Dialog
$grid.jqGrid('searchGrid', {...});
// add the class "ui-state-error" to the dialog header
$("#searchhdfbox_" + $.jgrid.jqID($grid[0].id)).addClass("ui-state-error");
我熟悉覆盖模态行为的技巧:
$.extend($.jgrid, {
showModal : function(h) {
h.w.show("blind");
},
closeModal : function(h) {
h.w.hide("blind").attr("aria-hidden", "true");
if(h.o) {h.o.remove();}
}
});
我也在寻找一种方法来更改相同模式的颜色 header。 (我不想更改整个 .ui-widget-header 的颜色,只是为了那个特定的模态 window)。我可以使用某种 "h.w.css" 实现吗?
这是打开此模式的方式:
$(nameOfGrid).jqGrid('searchGrid', {
multipleSearch:true,
showQuery: true,
multipleGroup:true,
caption: "Advanced Search",
sFilter: "afilters",
Find: "Apply",
Reset: "Reset & Close",
closeAfterReset: true,
closeAfterSearch: false,
searchOnEnter: true,
width:'auto',
recreateForm: true,
recreateFilter: false,
errorcheck: true,
overlay:false,
谢谢,
您可以在 header 模态对话框创建后添加额外的 class。搜索对话框 header 的 ID 将由前缀 searchhdfbox_
和网格 ID 构成。因此,您可以执行以下操作
var $grid = $(nameOfGrid);
// create the Searching Dialog
$grid.jqGrid('searchGrid', {...});
// add the class "ui-state-error" to the dialog header
$("#searchhdfbox_" + $.jgrid.jqID($grid[0].id)).addClass("ui-state-error");