From dfff58b7cd897b824a129edba6b5cdae20bb1e5c Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期三, 23 八月 2023 17:40:58 +0800
Subject: [PATCH] 发起再注册分析并同步SAP

---
 force-app/main/default/staticresources/RelationListPagingCmpJS.js |  110 ++++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 89 insertions(+), 21 deletions(-)

diff --git a/force-app/main/default/staticresources/RelationListPagingCmpJS.js b/force-app/main/default/staticresources/RelationListPagingCmpJS.js
index 0ed2bd5..c836700 100644
--- a/force-app/main/default/staticresources/RelationListPagingCmpJS.js
+++ b/force-app/main/default/staticresources/RelationListPagingCmpJS.js
@@ -283,9 +283,16 @@
         }
     }
 }
-
+// 20230511 ljh start 
+function ToggleWidth(obj){
+    var colClass = getColClassName(obj);
+    j$(obj).toggleClass("colUnHideIcon");
+    // j$('<col class="col_Irreplaceable_flag__c">').toggleClass("colUnHideIcon");
+    rerenderColWidth(colClass, false);
+}
+// 20230511 ljh 娉ㄩ噴 start 
 // list 銇� headerRow 銇� td銇� toggleWidth() 銈掕拷鍔�
-function bindTdToggleWidth() {
+/*function bindTdToggleWidth() {
 
     var i = 0;
     j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
@@ -317,7 +324,8 @@
     j$('div#in_Div_L').scroll(function() {
         j$('div#in_Div').scrollTop(j$(this).scrollTop());
     });
-}
+}*/
+// 20230511 ljh 娉ㄩ噴 start 
 function windowResize() {
 
     var heightsp = 0;
@@ -325,13 +333,22 @@
         heightsp = bottomspace;
     }
     blockHeight = j$(window).innerHeight() - j$(escapeVfId('allPage:allForm:searchBlock')).height() - heightAjustment;
+    // console.log(j$(window).innerHeight() +'-'+ j$(escapeVfId('allPage:allForm:searchBlock')).height() +'-'+ heightAjustment+'-'+heightsp);
     blockHeight = blockHeight - heightsp;
+
     sbwidth = scrollbarWidth();
+    // 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()- sbwidth;
+    var tableWidth = j$('table#tableData').width();
+    // 20230531 ljh end 
     //銈炽兂銉濄儘銉笺儓銇伄銇D銈掑鏇�
-    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');
+    // 20230519 ljh start
+    // j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock')).css('height', blockHeight + 78 + 'px');
+    j$(escapeVfId('allPage:allForm:cmpid:cmpinnerid:dataBlock')).css('height', blockHeight  + 48 + 'px');
+    // 20230519 ljh end 
+    // j$('div#in_Div').css('width', blockWidth + 'px'); // 20230519 ljh 
+    // j$('div#out_Div').css('width', blockWidth + 'px'); // 20230519 ljh 
     j$('div#in_Div').css('height', blockHeight + 'px');
     j$('div#in_Div_L').css('height', blockHeight + 'px');
 
@@ -351,14 +368,53 @@
     }
 
     if (j$('table#tableData').height() > j$('div#in_Div').height()) {
-        j$('div#in_Div').css('width', (blockWidth + sbwidth) + 'px');
+        // 20230519 ljh 澧炶if鍒ゆ柇
+        // 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');
+        // 20230519 ljh 澧炶if鍒ゆ柇
+        // j$('div#out_Div').css('width', (blockWidth + sbwidth) + 'px');
+        // j$('div#in_Div').css('width', (blockWidth + sbwidth) + 'px');
+        // 20230704 ljh start
+        /*if(blockWidth > 1000){
+            console.log('333');
+            // 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()) {
+                j$('div#out_Div').css('width', (blockWidth) + 'px');
+                j$('div#in_Div').css('width', (blockWidth) + 'px');
+            }
+        }else{
+            console.log('222');
+            j$('table#tableData').css('width', (blockWidth) + 'px');
+            j$('table#tableHeader').css('width', (blockWidth) + 'px');
+            tableWidth = blockWidth; // 20230725 ljh
+        }*/
+        if (j$('table#tableData').width() > j$('div#in_Div').width()) {
+            j$('div#out_Div').css('width', (blockWidth) + 'px');
+            j$('div#in_Div').css('width', (blockWidth) + 'px');
+            j$('table#tableData').css('width', (tableWidth) + 'px');
+            j$('table#tableHeader').css('width', (tableWidth) + 'px');           
+        }
+        // 20230704 ljh end
     }
     if (j$('table#tableData').width() > j$('div#in_Div').width()) {
         j$('div#in_Div').css('height', (blockHeight + sbwidth) +'px');
     }
+
+    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 expandAll(){
@@ -379,33 +435,45 @@
 var listColClassWidthMap = {};     // colclass ==> class銇畐idth
 var blockHeight = 0;
 var sbwidth = 0;
+var tableWidth = 0;// 20230519 ljh lightning add
 window.onresize = windowResize;
 
 function rerenderColWidth(colClass, isFirst) {
-
-    var tableWidth = j$('body .pbBody table#tableHeader').width();
+    // tableWidth = j$('body .pbBody table#tableHeader').width();// 20230519 ljh lightning add
+    console.log('555'+tableWidth);
     var headerCol = j$('body .pbBody table.list tr.headerRow td.' + colClass);
     if (headerCol.hasClass("colUnHideIcon")) {
         listColClassMap[colClass] = "colUnHideIcon";
-        tableWidth -= headerCol.width();
+        // 20230519 ljh lightning start
+        // tableWidth -= headerCol.width();
+        console.log('666'+listColClassWidthMap[colClass]);
+        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");
+        // 20230728 ljh 浼樺寲
+        // j$('body .pbBody table.list td.' + colClass).width(7).css("font-size", "0");
+        j$('body .pbBody table.list td.' + colClass).outerWidth(10).css("font-size", "0");
     } else {
         listColClassMap[colClass] = "colViewing";
-        if (isFirst == false) {
+        console.log('888'+tableWidth);
+        // if (isFirst == false) { // 20230519 ljh lightning  鍘绘帀鍒ゆ柇
             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('777'+listColClassWidthMap[colClass]);
     }
-    // 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
+    console.log('444'+tableWidth);
+    // 20230725 ljh start
+    // if(tableWidth < 1000){
+    //     j$('div#in_Div').css('width', tableWidth + 'px'); 
+    //     j$('div#out_Div').css('width', tableWidth + 'px');
+    // }
+    // 20230725 ljh start
+    j$('table#tableData').css('width', (tableWidth + 2) + 'px');
+    j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
 }
 function getColClassName(pObj) {
 

--
Gitblit v1.9.1