From 07390e2fcb4adf27c928335bf27ae7939c5a80ad Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期二, 23 五月 2023 11:28:12 +0800
Subject: [PATCH] bakcup20230523

---
 force-app/main/default/components/RelationListPagingCmp.component |  128 ++++++++++++++++++++++++++++++++----------
 1 files changed, 98 insertions(+), 30 deletions(-)

diff --git a/force-app/main/default/components/RelationListPagingCmp.component b/force-app/main/default/components/RelationListPagingCmp.component
index 38b89d0..9910d6b 100644
--- a/force-app/main/default/components/RelationListPagingCmp.component
+++ b/force-app/main/default/components/RelationListPagingCmp.component
@@ -77,35 +77,42 @@
                     <apex:inputHidden id="currentPageRecordCnt" value="{!currentPageRecordCnt}"/>
                     <!-- 宸︺��銉樸儍銉� -->
                     <div id="out_Div_L">
-                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader_L">
-                            <tr class="dataRow" height="1px">
+                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;table-layout:fixed" border="" id="tableHeader_L">
+                            <!-- 20230511 ljh lightning start -->
+                            <!-- <tr class="dataRow" height="1px">
 <apex:outputPanel layout="none" rendered="{!hasChkBox}">
                                 <td class="col_chk"></td>
 </apex:outputPanel>
 <apex:outputPanel layout="none" rendered="{!Not(hasChkBox)}">
-                                <td class="col_noChk"></td>
+                                
+                                <td class="col_noChk"></td>                                
 </apex:outputPanel>
 <apex:variable value="{!0}" var="cnt" />
 <apex:repeat value="{!titleLeft}" var="t">
                                 <td class="col_{!columnLeftCss[cnt]}"></td>
     <apex:variable value="{!cnt + 1}" var="cnt" />
 </apex:repeat>
-                            </tr>
+                            <tr> -->
+                            <!-- 20230511 ljh lightning end -->
+                            <thead>
                             <tr class="headerRow" height="30px">
 <apex:outputPanel layout="none" rendered="{!hasChkBox}">
     <apex:outputPanel layout="none" rendered="{!Not(isRadioBox)}">
-                                <td style="width:20px" class="col_chk" align="center">
+                                <td style="width:32px" class="col_chk" align="center">
                                     <input type='checkbox' onClick='checkAll()' id='checker'/>
                                 </td>
     </apex:outputPanel>
 </apex:outputPanel>
 
 <apex:outputPanel layout="none" rendered="{!isRadioBox}">
-                             <td class="col_chk"></td>
+                             <td style="width:32px;" class="col_chk"></td>
 </apex:outputPanel>
 
 <apex:outputPanel layout="none" rendered="{!Not(hasChkBox)}">
-                                <td class="col_noChk"></td>
+                                <!-- 20230511 ljh lightning start-->
+                                <!-- <td class="col_noChk"></td> -->
+                                <td class="col_noChk" style="display:none"></td>
+                                <!-- 20230511 ljh lightning end-->
 </apex:outputPanel>
 <apex:variable value="{!0}" var="cnt" />
 <apex:repeat value="{!titleLeft}" var="t">
@@ -128,23 +135,31 @@
     <apex:variable value="{!cnt + 1}" var="cnt" />
 </apex:repeat>
                             </tr>
+                        </thead>
                         </table>
                     </div>
                     <!-- 鍙炽��銉樸儍銉� -->
                     <div id="out_Div">
-                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader">
-                            <tr class="dataRow" height="1px">
+                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;table-layout:fixed;" border="" id="tableHeader">
+                            <!-- 20230512 ljh -->
+                            <!-- <tr > -->
+                                <!-- <colgroup class="dataRow" height="1px">
                             <apex:variable value="{!0}" var="cnt" />
                             <apex:repeat value="{!titleRight}" var="t">
-                                <td class="col_{!columnRightCss[cnt]}"></td>
+                                <col class="col_{!columnRightCss[cnt]}"></col>
                                 <apex:variable value="{!cnt + 1}" var="cnt" />
                             </apex:repeat>
-                            <td class="col_Scroll"></td>
-                            </tr>
+                            <col class="col_Scroll"></col> -->
+                            <!-- </tr> -->
+                        <!-- </colgroup> -->
+                        <thead>
                             <tr class="headerRow" height="30px">
                             <apex:variable value="{!0}" var="cnt" />
                             <apex:repeat value="{!titleRight}" var="t">
-                                <td class="col_{!columnRightCss[cnt]}">
+                                <!-- 20230511 ljh lightning start -->
+                                <!-- <td class="col_{!columnRightCss[cnt]} "> -->
+                                <td class="col_{!columnRightCss[cnt]} colViewing" onclick ="test(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;">
                                         <!-- 20220107 ljh update start -->
@@ -164,18 +179,19 @@
                             </apex:repeat>
                             <td class="col_Scroll"></td>
                             </tr>
+                        </thead>
                         </table>
                     </div>    <!-- out_Div -->
                     <div style="clear:both;height:0px;"></div>
                     <!--銆�宸� 銉囥兗銈裤儶銈广儓 -->
                     <div id="in_Div_L">
-                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" 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);}">
 
     <apex:outputPanel layout="none" rendered="{!hasChkBox}">
-                                <td class="dataCellBorder1" style="" align="center">
+                                <td class="dataCellBorder1" style="width:32px;" align="center">
         <apex:outputPanel layout="none" rendered="{!Not(isRadioBox)}">
                                   <apex:inputCheckbox value="{!or.check}" id="rowCheck" styleClass="rowchkcls" disabled="{!!or.canEdit}" onchange="setChangeFlg('{!or.lineNo}')"/>
         </apex:outputPanel>
@@ -224,7 +240,7 @@
                     </div>
                     <!--銆�鍙� 銉囥兗銈裤儶銈广儓 -->
                     <div id="in_Div">
-                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData">
+                        <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;table-layout:fixed;" border="" id="tableData">
                             <apex:variable value="{!1}" var="cnt" />
                             <apex:repeat value="{!pageController.viewList}" var="or" id="oppTable">
                                 <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);}">
@@ -287,7 +303,33 @@
                         </table>
                     </div><!-- /in_Div -->
                 </apex:outputPanel>
-                <apex:outputPanel layout="none" rendered="{!isDisplayPaging}">
+                <!-- <apex:outputPanel layout="none" rendered="{!isDisplayPaging}">
+
+                    <apex:outputPanel layout="none" rendered="{!hasPrevious}">
+                        <button onclick="if('{!userCustomPaging}' == 'true') {searchPreviousCustom();} else {searchPreviousJs();}return false;" class="btn">鍓嶃伕</button>
+                    </apex:outputPanel>
+                    <apex:outputPanel layout="none" rendered="{!!hasPrevious}">
+                        <button class="btn" disabled="disabled"
+                                style="cursor: default;border-color: #e5e5e5; background: #f0f0f0;color: #a8a8a8;">鍓嶃伕</button>
+                    </apex:outputPanel>
+
+                    <span class="count">{!page}</span><span>|</span>
+                    <span class="count">{!maxPage}</span>
+                    <apex:outputPanel layout="none" rendered="{!hasNext}">
+                        <button onclick="if('{!userCustomPaging}' == 'true') {searchNextCustom();} else {searchNextJs();}return false;" class="btn" >娆°伕</button>
+                    </apex:outputPanel>
+                    <apex:outputPanel layout="none" rendered="{!!hasNext}">
+                        <button class="btn" disabled="disabled"
+                        style="cursor: default;border-color: #e5e5e5; background: #f0f0f0;color: #a8a8a8;">娆°伕</button>
+                    </apex:outputPanel>
+    &nbsp;&nbsp;
+                    <apex:outputPanel id="canGoPage" layout="none" rendered="{!canGoPage}">
+                        <apex:selectList value="{!goPageInt}" size="1" style="width:50px" id="goPageInt"><apex:selectOptions value="{!pageNumList}" id="pageNumList"/></apex:selectList>銆�
+                        <button onclick="if('{!userCustomPaging}' == 'true') {searchGoPageCustom();} else {searchGoPageJs();}return false;" class="btn">go</button>
+                    </apex:outputPanel>
+                </apex:outputPanel> -->
+            </apex:pageBlock>
+            <apex:outputPanel layout="none" rendered="{!isDisplayPaging}">
 
                     <apex:outputPanel layout="none" rendered="{!hasPrevious}">
                         <button onclick="if('{!userCustomPaging}' == 'true') {searchPreviousCustom();} else {searchPreviousJs();}return false;" class="btn">鍓嶃伕</button>
@@ -312,16 +354,42 @@
                         <button onclick="if('{!userCustomPaging}' == 'true') {searchGoPageCustom();} else {searchGoPageJs();}return false;" class="btn">go</button>
                     </apex:outputPanel>
                 </apex:outputPanel>
-            </apex:pageBlock>
 <script type="text/javascript">
 var heightAjustment = 120;
 var widthAjustment = 30;
 var bottomspace = '{!bottomSp}';
+var i = 0;
 j$(document).ready(function(){
+    console.log({!isFirstRefresh});
     if({!isFirstRefresh}){
       blockme();
       init();
     }
+    
+    if(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();
+            }
+        });
+        i++;
+    }
+    // windowResize();
+    // 銈广偗銉兗銉�e嫊
+    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());
+    });
 });
 
 function runSFDCAddRemote(MetadataConnectionWarning) {
@@ -333,19 +401,19 @@
 }
 
 j$(function() {
-    var tableWidth = 0;
-    j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
-        var colClass = getColClassName(this);
-        if (colClass != 'col_Scroll') {
-            var headerCol = j$('body .pbBody table.list tr.headerRow td.' + colClass);
-            tableWidth += headerCol.width();
-        }
-    });
-    j$('table#tableData').css('width', (tableWidth + 2) + 'px');
-    j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
+    // var tableWidth = 0;
+    // j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
+    //     var colClass = getColClassName(this);
+    //     if (colClass != 'col_Scroll') {
+    //         var headerCol = j$('body .pbBody table.list tr.headerRow td.' + colClass);
+    //         tableWidth += headerCol.width();
+    //     }
+    // });
+    // j$('table#tableData').css('width', (tableWidth + 2) + 'px');
+    // j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
 
     // list 銇� headerRow 銇� td銇� toggleWidth() 銈掕拷鍔�
-    bindTdToggleWidth();
+    // bindTdToggleWidth();
 });
 var elements = document.getElementsByTagName("select");
 for (i = 0; i < elements.length; i++) {
@@ -374,7 +442,7 @@
 j$("a[name='out_Div_a']").bind("click",function(event){
     event.stopPropagation();
 });
-windowResize();
+// windowResize();
 </script>
         </apex:outputPanel>
     <!-- </apex:form> -->

--
Gitblit v1.9.1