forked from p81075629/datagear
解决表格固定选择列后hover效果不同步的问题
This commit is contained in:
parent
c556ff6259
commit
40de49fe21
|
@ -211,6 +211,41 @@ page_js_obj.jsp
|
|||
pageObj.table.DataTable().row(tr).deselect();
|
||||
else
|
||||
pageObj.table.DataTable().row(tr).select();
|
||||
})
|
||||
.hover(
|
||||
function(event)
|
||||
{
|
||||
var rowIndex = $(this).parent().index() + 1;
|
||||
pageObj.element(".dataTable").each(function()
|
||||
{
|
||||
$("tr:eq("+rowIndex+")", this).addClass("hover");
|
||||
});
|
||||
},
|
||||
function(event)
|
||||
{
|
||||
var rowIndex = $(this).parent().index() + 1;
|
||||
pageObj.element(".dataTable").each(function()
|
||||
{
|
||||
$("tr:eq("+rowIndex+")", this).removeClass("hover");
|
||||
});
|
||||
});
|
||||
|
||||
$(row).hover(
|
||||
function(event)
|
||||
{
|
||||
var rowIndex = $(this).index() + 1;
|
||||
pageObj.element(".dataTable").each(function()
|
||||
{
|
||||
$("tr:eq("+rowIndex+")", this).addClass("hover");
|
||||
});
|
||||
},
|
||||
function()
|
||||
{
|
||||
var rowIndex = $(this).index() + 1;
|
||||
pageObj.element(".dataTable").each(function()
|
||||
{
|
||||
$("tr:eq("+rowIndex+")", this).removeClass("hover");
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -381,6 +416,8 @@ page_js_obj.jsp
|
|||
pageObj.element('.dataTables_scrollHeadInner').css('width', width);
|
||||
pageObj.element('.dataTables_scrollHeadInner > .dataTable').css('width', width);
|
||||
|
||||
pageObj.table.DataTable().fixedColumns().relayout();
|
||||
|
||||
//XXX 不能使用下面的代码让表格自适应宽度,因为在隐藏选项卡中的表格宽度计算会有问题
|
||||
//var height = pageObj.calTableHeight();
|
||||
//pageObj.element('.dataTables_scrollBody').css('height', height);
|
||||
|
|
|
@ -107,9 +107,12 @@ table.dataTable tbody tr {
|
|||
table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd {
|
||||
background-color: #1e1e1e;
|
||||
}
|
||||
table.dataTable.hover tbody tr.hover,
|
||||
table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
|
||||
background-color: #303030;
|
||||
}
|
||||
table.dataTable.hover tbody tr.hover.selected,
|
||||
|
||||
table.dataTable tbody > tr.selected,
|
||||
table.dataTable tbody > tr > .selected,
|
||||
|
||||
|
|
|
@ -107,9 +107,12 @@ table.dataTable tbody tr {
|
|||
table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd {
|
||||
background-color: #245500;
|
||||
}
|
||||
table.dataTable.hover tbody tr.hover,
|
||||
table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
|
||||
background: #3f8f03;
|
||||
}
|
||||
table.dataTable.hover tbody tr.hover.selected,
|
||||
|
||||
table.dataTable tbody > tr.selected,
|
||||
table.dataTable tbody > tr > .selected,
|
||||
|
||||
|
|
|
@ -107,9 +107,12 @@ table.dataTable tbody tr {
|
|||
table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd {
|
||||
background-color: #f6f6f6;
|
||||
}
|
||||
table.dataTable.hover tbody tr.hover,
|
||||
table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
table.dataTable.hover tbody tr.hover.selected,
|
||||
|
||||
table.dataTable tbody > tr.selected,
|
||||
table.dataTable tbody > tr > .selected,
|
||||
|
||||
|
|
Loading…
Reference in New Issue