| | |
| | | } |
| | | } |
| | | } |
| | | // 20230511 ljh start |
| | | function test(aa){ |
| | | var aatableWidth = j$('body .pbBody table#tableHeader').width(); |
| | | console.log(aa); |
| | | console.log('检测:'+tableWidth+'~~~'+aatableWidth); |
| | | var colClass = getColClassName(aa); |
| | | j$(aa).toggleClass("colUnHideIcon"); |
| | | j$('<col class="col_Irreplaceable_flag__c">').toggleClass("colUnHideIcon"); |
| | | rerenderColWidth(colClass, false); |
| | | |
| | | } |
| | | // 20230511 ljh end |
| | | // list の headerRow の tdに toggleWidth() を追加 |
| | | function bindTdToggleWidth() { |
| | | /*function bindTdToggleWidth() { |
| | | |
| | | var i = 0; |
| | | tableWidth = j$('body .pbBody table#tableHeader').width(); |
| | | console.log('关键aaa:'+tableWidth); |
| | | j$('body .pbBody table#tableHeader tr.headerRow td').each(function() { |
| | | console.log(this); |
| | | var colClass = getColClassName(this); |
| | | if (colClass != 'col_Scroll') { |
| | | listColClassWidthMap[colClass] = j$('body .pbBody table.list tr.headerRow td.' + colClass).width(); |
| | |
| | | j$('div#in_Div_L').scroll(function() { |
| | | j$('div#in_Div').scrollTop(j$(this).scrollTop()); |
| | | }); |
| | | } |
| | | }*/ |
| | | function windowResize() { |
| | | |
| | | var heightsp = 0; |
| | |
| | | sbwidth = scrollbarWidth(); |
| | | blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width() - widthAjustment - sbwidth - 20; |
| | | //コンポネートなのでIDを変更 |
| | | j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock')).css('height', blockHeight + 78 + 'px'); |
| | | j$('div#in_Div').css('width', blockWidth + 'px'); |
| | | j$('div#out_Div').css('width', blockWidth + 'px'); |
| | | |
| | | // j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock')).css('height', blockHeight + 78 + 'px'); |
| | | j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock')).css('height', blockHeight + 48 + 'px'); |
| | | |
| | | // j$('div#in_Div').css('width', blockWidth + 'px'); |
| | | // j$('div#out_Div').css('width', blockWidth + 'px'); |
| | | j$('div#in_Div').css('height', blockHeight + 'px'); |
| | | j$('div#in_Div_L').css('height', blockHeight + 'px'); |
| | | |
| | |
| | | } |
| | | |
| | | if (j$('table#tableData').height() > j$('div#in_Div').height()) { |
| | | j$('div#in_Div').css('width', (blockWidth + sbwidth) + 'px'); |
| | | // j$('div#in_Div').css('width', (blockWidth + sbwidth) + 'px'); |
| | | if (j$('table#tableData').width() > j$('div#in_Div').width()) { |
| | | j$('div#in_Div').css('width', (blockWidth + sbwidth) + 'px'); |
| | | } |
| | | } else { |
| | | j$('div#out_Div').css('width', (blockWidth + sbwidth) + 'px'); |
| | | j$('div#in_Div').css('width', (blockWidth + sbwidth) + 'px'); |
| | | // j$('div#out_Div').css('width', (blockWidth + sbwidth) + 'px'); |
| | | // j$('div#in_Div').css('width', (blockWidth + sbwidth) + 'px'); |
| | | if (j$('table#tableData').width() > j$('div#in_Div').width()) { |
| | | j$('div#out_Div').css('width', (blockWidth + sbwidth) + 'px'); |
| | | j$('div#in_Div').css('width', (blockWidth + sbwidth) + 'px'); |
| | | } |
| | | } |
| | | if (j$('table#tableData').width() > j$('div#in_Div').width()) { |
| | | j$('div#in_Div').css('height', (blockHeight + sbwidth) +'px'); |
| | |
| | | var listColClassWidthMap = {}; // colclass ==> classのwidth |
| | | var blockHeight = 0; |
| | | var sbwidth = 0; |
| | | var tableWidth = 0; |
| | | window.onresize = windowResize; |
| | | |
| | | function rerenderColWidth(colClass, isFirst) { |
| | | |
| | | var tableWidth = j$('body .pbBody table#tableHeader').width(); |
| | | // tableWidth = j$('body .pbBody table#tableHeader').width(); |
| | | console.log('关键:'+tableWidth); |
| | | var headerCol = j$('body .pbBody table.list tr.headerRow td.' + colClass); |
| | | if (headerCol.hasClass("colUnHideIcon")) { |
| | | listColClassMap[colClass] = "colUnHideIcon"; |
| | | tableWidth -= headerCol.width(); |
| | | console.log('隐藏:'+headerCol.width()); |
| | | console.log(listColClassWidthMap); |
| | | // tableWidth -= headerCol.width(); |
| | | tableWidth -= listColClassWidthMap[colClass]; |
| | | |
| | | // 全部最小化する |
| | | j$('body .pbBody table.list td.' + colClass).children().hide(); |
| | | j$('body .pbBody table.list td.' + colClass).width(7).css("font-size", "0"); |
| | | console.log('IF'); |
| | | } else { |
| | | console.log('ELSE'+isFirst); |
| | | listColClassMap[colClass] = "colViewing"; |
| | | if (isFirst == false) { |
| | | // if (isFirst == false) { |
| | | var hiddenWidth = headerCol.width(); |
| | | j$('body .pbBody table.list td.' + colClass).width("").css("font-size", ""); |
| | | j$('body .pbBody table.list td.' + colClass).children().show(); |
| | | tableWidth += listColClassWidthMap[colClass] + 2 - hiddenWidth; // 2 is border |
| | | } |
| | | console.log('重大发现:'+listColClassWidthMap[colClass]+'~'+tableWidth); |
| | | // } |
| | | } |
| | | // 2023-05-04 zyh lightning升级 start |
| | | // j$('table#tableData').css('width', (tableWidth + 2) + 'px'); |
| | | j$('table#tableData').css('width', (150) + '%'); |
| | | // j$('table#tableHeader').css('width', (tableWidth + 2) + 'px'); |
| | | j$('table#tableHeader').css('width', (150) + '%'); |
| | | // 2023-05-04 zyh lightning升级 end |
| | | |
| | | j$('table#tableData').css('width', (tableWidth + 2) + 'px'); |
| | | j$('table#tableHeader').css('width', (tableWidth + 2) + 'px'); |
| | | |
| | | j$('body .pbBody table#tableHeader').css('width', (tableWidth + 2) + 'px'); |
| | | |
| | | var tableWidthnew = j$('body .pbBody table#tableHeader').width(); |
| | | console.log('关键new:'+tableWidthnew+'~'+tableWidth); |
| | | document.getElementById("tableHeader").style.width=tableWidth; |
| | | tableWidthnew = j$('body .pbBody table#tableHeader').width(); |
| | | console.log('关键new111:'+tableWidthnew+'~'+tableWidth); |
| | | } |
| | | function getColClassName(pObj) { |
| | | |