From 959d6f5d59d38f096b0d6fa454936015cfa80d71 Mon Sep 17 00:00:00 2001
From: LiJinHuan <lijinhuan@prec-tech.com>
Date: 星期三, 31 五月 2023 16:49:00 +0800
Subject: [PATCH] 备品页面框架
---
force-app/main/default/components/RelationListPagingCmp.component | 53 +++++++++++++++++++-------
force-app/main/default/staticresources/RelationListPagingCmpJS.js | 13 ++++--
force-app/main/default/staticresources/RelationListPagingCmpCss.css | 4 +-
3 files changed, 48 insertions(+), 22 deletions(-)
diff --git a/force-app/main/default/components/RelationListPagingCmp.component b/force-app/main/default/components/RelationListPagingCmp.component
index b37cf06..b7945a1 100644
--- a/force-app/main/default/components/RelationListPagingCmp.component
+++ b/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();
-
// 銈广偗銉兗銉�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());
- });
+ // 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
});
diff --git a/force-app/main/default/staticresources/RelationListPagingCmpCss.css b/force-app/main/default/staticresources/RelationListPagingCmpCss.css
index d949557..6b092c2 100644
--- a/force-app/main/default/staticresources/RelationListPagingCmpCss.css
+++ b/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銈掕〃绀恒仚銈嬮珮銇曘�佸緦銇s銇仸瑾挎暣 */
- width: 1100px;
+ /* width: 1200px; */
}
div#in_Div_L {
position:relative;
diff --git a/force-app/main/default/staticresources/RelationListPagingCmpJS.js b/force-app/main/default/staticresources/RelationListPagingCmpJS.js
index c47f7d6..821480a 100644
--- a/force-app/main/default/staticresources/RelationListPagingCmpJS.js
+++ b/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
//銈炽兂銉濄儘銉笺儓銇伄銇D銈掑鏇�
// 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) {
--
Gitblit v1.9.1