界面数据列表,表头浮动
This commit is contained in:
@@ -547,6 +547,10 @@ $(function(){
|
||||
$(".protocol").removeClass("hidden").removeClass("disabled");
|
||||
$(".btn-red-hollow").addClass("hidden");
|
||||
}
|
||||
|
||||
$("#messageBox .close").on("click",function(){
|
||||
heightDiv(1);
|
||||
})
|
||||
});
|
||||
window.onload=function(){
|
||||
$("span[id^=open]").click(function(){
|
||||
@@ -596,6 +600,18 @@ window.onload=function(){
|
||||
heightDiv();
|
||||
},500);
|
||||
|
||||
var tableCont = document.querySelector('.table-responsive');
|
||||
function scrollHandle (e){
|
||||
console.log(this);
|
||||
var scrollTop = this.scrollTop;
|
||||
$('th').css('transform','translateY(' + scrollTop + 'px)');
|
||||
$('thead tr').css('z-index','2147482468');
|
||||
$('thead tr').css('position','relative');
|
||||
$('th').css('border','1px solid rgb(255, 255, 255)');
|
||||
$('th').css('background-clip','padding-box');
|
||||
}
|
||||
tableCont.addEventListener('scroll',scrollHandle);
|
||||
$('#contentTable').attr("margin-top",'0px');
|
||||
}
|
||||
var setInterceptDefaultInfo=function(cfgId){
|
||||
var action=$("input[name='action']:checked").val();
|
||||
@@ -1835,14 +1851,23 @@ var initCommIpVal=function(){
|
||||
}
|
||||
}
|
||||
|
||||
function heightDiv(){
|
||||
|
||||
function heightDiv(type){
|
||||
var hei=document.documentElement.clientHeight;
|
||||
hei=hei-71;
|
||||
hei=hei-91;
|
||||
var rowheigth=0;
|
||||
if($('.row')){
|
||||
rowheigth=$('.row').height();
|
||||
hei=hei-rowheigth;
|
||||
}
|
||||
if(type != 1){
|
||||
if($("#messageBox")){
|
||||
var messageH=$("#messageBox").height();
|
||||
if(messageH > 0){
|
||||
hei=hei-messageH-52;
|
||||
}
|
||||
}
|
||||
}
|
||||
if($('.table-responsive')){
|
||||
$('.table-responsive').css({'height':hei+'px'});
|
||||
}
|
||||
|
||||
@@ -325,12 +325,18 @@ function filterActionInit() {
|
||||
|
||||
function tzheight(){
|
||||
var hei=document.documentElement.clientHeight;
|
||||
hei=hei-71;
|
||||
hei=hei-91;
|
||||
var rowheigth=0;
|
||||
if($('.row')){
|
||||
rowheigth=$('.row').height();
|
||||
hei=hei-rowheigth;
|
||||
}
|
||||
if($("#messageBox")){
|
||||
var messageH=$("#messageBox").height();
|
||||
if(messageH > 0){
|
||||
hei=hei-messageH-52;
|
||||
}
|
||||
}
|
||||
if($('.table-responsive')){
|
||||
$('.table-responsive').css({'height':hei+'px'});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user