| | |
| | | } |
| | | // 20230523 ljh lightning start |
| | | if(i == 0){ |
| | | sbwidth = scrollbarWidth(); |
| | | i++; |
| | | tableWidth = j$('body .pbBody table#tableHeader').width(); |
| | | // var widthTemp = 0; |
| | | j$('body .pbBody table#tableHeader tr.headerRow td').each(function() { |
| | | var colClass = getColClassName(this); |
| | | if (colClass != 'col_Scroll') { |
| | | var temp = j$('body .pbBody table.list tr.headerRow td.' + colClass).width(); |
| | | listColClassWidthMap[colClass] = temp; |
| | | //widthTemp += temp; |
| | | } |
| | | }); |
| | | var blockWidthNew = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width(); |
| | | // console.log(widthTemp+'~'+blockWidthNew+'~'+tableWidth); |
| | | // var blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width()-sbwidth; |
| | | var blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width() - widthAjustment - sbwidth - 20; |
| | | var tableHeader_L = j$(escapeVfId('tableHeader_L')).width(); |
| | | console.log('~'+tableHeader_L); |
| | | j$('div#in_Div_L').css('width', tableHeader_L+ 'px'); |
| | | j$('table#tableData_L').css('width', tableHeader_L + 'px'); |
| | | // j$('table#tableHeader').css('width', (tableWidth + 2) + 'px'); |
| | | if(tableWidth > blockWidthNew){ |
| | | j$('div#in_Div').css('width', blockWidthNew + 'px'); // 20230519 ljh |
| | | j$('div#out_Div').css('width', blockWidthNew + 'px'); // 20230519 ljh |
| | | console.log('tableWidth:'+tableWidth+'blockWidth:'+blockWidth); |
| | | if(tableWidth > blockWidth){ |
| | | console.log('111'); |
| | | j$('div#in_Div').css('width', blockWidth+ 'px'); // 20230519 ljh +20 |
| | | j$('div#out_Div').css('width', blockWidth + 'px'); // 20230519 ljh |
| | | j$('table#tableHeader').css('width', tableWidth + 'px'); // 20230725 ljh |
| | | j$('table#tableData').css('width', tableWidth + 'px'); // 20230725 ljh |
| | | } |
| | | j$('div#in_Div').scroll(function() { |
| | | j$('div#out_Div').scrollLeft(j$(this).scrollLeft()); |
| | |
| | | }); |
| | | j$('div#in_Div_L').scroll(function() { |
| | | j$('div#in_Div').scrollTop(j$(this).scrollTop()); |
| | | }); |
| | | |
| | | j$('body .pbBody table#tableHeader tr.headerRow td').each(function() { |
| | | var colClass = getColClassName(this); |
| | | if (colClass != 'col_Scroll') { |
| | | var temp = j$('body .pbBody table.list tr.headerRow td.' + colClass).width(); |
| | | console.log('colClass'+temp); |
| | | listColClassWidthMap[colClass] = temp; |
| | | } |
| | | }); |
| | | |
| | | } |
| | |
| | | </script> |
| | | </apex:outputPanel> |
| | | <!-- </apex:form> --> |
| | | </apex:component> |
| | | </apex:component> |