LiJinHuan
2023-05-31 959d6f5d59d38f096b0d6fa454936015cfa80d71
备品页面框架
3个文件已修改
70 ■■■■■ 已修改文件
force-app/main/default/components/RelationListPagingCmp.component 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/staticresources/RelationListPagingCmpCss.css 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/staticresources/RelationListPagingCmpJS.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/components/RelationListPagingCmp.component
@@ -160,7 +160,7 @@
                            <apex:repeat value="{!titleRight}" var="t">
                                <!-- 20230511 ljh lightning start -->
                                <!-- <td class="col_{!columnRightCss[cnt]} "> -->
                                <td class="col_{!columnRightCss[cnt]} colViewing" onclick ="test(this);return false;">
                                <td class="col_{!columnRightCss[cnt]} colViewing" onclick ="ToggleWidth(this);return false;">
                                <!-- 20230511 ljh lightning end -->
                                    <apex:outputPanel layout="none" rendered="{!Not(noSortHeader)}">
                                      <a href="#" name="out_Div_a" onclick="sortTableJs('{!cnt + titleLeft.size}');return false;" style="text-decoration: underline;">
@@ -187,7 +187,7 @@
                    <!-- 左 データリスト -->
                    <div id="in_Div_L">
                        <!-- 20230512 ljh lightning add table-layout:fixed" -->
                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;table-layout:fixed" border="" id="tableData_L">
                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;table-layout:fixed;" border="" id="tableData_L">
<apex:variable value="{!1}" var="cnt" />
<apex:repeat value="{!pageController.viewList}" var="or" id="oppTable_L">
                            <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
@@ -374,28 +374,51 @@
    }
    // 20230523  ljh lightning start 
    if(i == 0){
        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') {
                listColClassWidthMap[colClass] = j$('body .pbBody table.list tr.headerRow td.' + colClass).width();
                var temp = j$('body .pbBody table.list tr.headerRow td.' + colClass).width();
                listColClassWidthMap[colClass] = temp;
                //widthTemp += temp;
            }
        });
        i++;
        var blockWidthNew = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width();
        // console.log(widthTemp+'~'+blockWidthNew+'~'+tableWidth);
        var tableHeader_L =  j$(escapeVfId('tableHeader_L')).width();
        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
        }
        j$('div#in_Div').scroll(function() {
            j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
            j$('div#in_Div_L').scrollTop(j$(this).scrollTop());
        });
        j$('div#out_Div').scroll(function() {
            j$('div#in_Div').scrollLeft(j$(this).scrollLeft());
        });
        j$('div#in_Div_L').scroll(function() {
            j$('div#in_Div').scrollTop(j$(this).scrollTop());
        });
    }
    // windowResize();
    // スクロール連動
    j$('div#in_Div').scroll(function() {
        j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
        j$('div#in_Div_L').scrollTop(j$(this).scrollTop());
    });
    j$('div#out_Div').scroll(function() {
        j$('div#in_Div').scrollLeft(j$(this).scrollLeft());
    });
    j$('div#in_Div_L').scroll(function() {
        j$('div#in_Div').scrollTop(j$(this).scrollTop());
    });
    // j$('div#in_Div').scroll(function() {
    //     j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
    //     j$('div#in_Div_L').scrollTop(j$(this).scrollTop());
    // });
    // j$('div#out_Div').scroll(function() {
    //     j$('div#in_Div').scrollLeft(j$(this).scrollLeft());
    // });
    // j$('div#in_Div_L').scroll(function() {
    //     j$('div#in_Div').scrollTop(j$(this).scrollTop());
    // });
    // 20230523  ljh lightning end 
});
force-app/main/default/staticresources/RelationListPagingCmpCss.css
@@ -12,7 +12,7 @@
  overflow: hidden;
  float:left;
  /* width:32768px; */ /* 20230523 ljh lightning */
  width: 1100px;
  /* width: 1200px; */
}
div#out_Div_L {
  position:relative;
@@ -25,7 +25,7 @@
  float:left;
  /* width:32768px; */ /* 20230523 ljh lightning */
  height: 100px; /* tbodyを表示する高さ、後でjsにて調整 */
  width: 1100px;
  /* width: 1200px; */
}
div#in_Div_L {
  position:relative;
force-app/main/default/staticresources/RelationListPagingCmpJS.js
@@ -335,7 +335,10 @@
    blockHeight = j$(window).innerHeight() - j$(escapeVfId('allPage:allForm:searchBlock')).height() - heightAjustment;
    blockHeight = blockHeight - heightsp;
    sbwidth = scrollbarWidth();
    blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width() - widthAjustment - sbwidth - 20;
    // 20230531 ljh start
    // blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width() - widthAjustment - sbwidth - 20;
    blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width();
    // 20230531 ljh end
    //コンポネートなのでIDを変更
    // 20230519 ljh start
    // j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock')).css('height', blockHeight + 78 + 'px');
@@ -372,8 +375,8 @@
        // 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');
            j$('div#out_Div').css('width', (blockWidth) + 'px');
            j$('div#in_Div').css('width', (blockWidth) + 'px');
        }
    }
    if (j$('table#tableData').width() > j$('div#in_Div').width()) {
@@ -411,7 +414,6 @@
        // tableWidth -= headerCol.width();
        tableWidth -= listColClassWidthMap[colClass];
        // 20230519 ljh lightning end
        // 全部最小化する
        j$('body .pbBody table.list td.' + colClass).children().hide();
        j$('body .pbBody table.list td.' + colClass).width(7).css("font-size", "0");
@@ -424,9 +426,10 @@
            tableWidth += listColClassWidthMap[colClass] + 2 - hiddenWidth;    // 2 is border
        // }
    }
    j$('table#tableData').css('width', (tableWidth + 2) + 'px');
    j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
}
function getColClassName(pObj) {