From 2f183a6b0a83ec3f7d35375d5d25d200efc2a3e1 Mon Sep 17 00:00:00 2001 From: Li Jun <buli@deloitte.com.cn> Date: 星期二, 19 四月 2022 18:46:18 +0800 Subject: [PATCH] 20220419FixIssue --- force-app/main/default/pages/NewAndEditCase.page | 27 ++++++++++++++++++++++----- 1 files changed, 22 insertions(+), 5 deletions(-) diff --git a/force-app/main/default/pages/NewAndEditCase.page b/force-app/main/default/pages/NewAndEditCase.page index 44934f5..6e6c791 100644 --- a/force-app/main/default/pages/NewAndEditCase.page +++ b/force-app/main/default/pages/NewAndEditCase.page @@ -395,7 +395,7 @@ <img src="/img/s.gif" alt="" class="minWidth" title="" width="1" height="1" /> <h2 class="mainTitle">CIC缂栬緫</h2> </td> - <td class="pbButton" id="topButtonRow"> + <td class="pbButton" id="topButtonRow" style="pointer-events: none; opacity: 0.4;"> <input class="btn" type="Button" value="淇濆瓨" onclick="saveCaseProcess('Save')" /> <input class="btn" type="Button" value="淇濆瓨骞跺叧闂�" onclick="saveCaseProcess('SaveAndClose')" /> <input class="btn" type="Button" value="淇濆瓨骞舵柊寤�" onclick="saveCaseProcess('SaveAndNew')" /> @@ -417,8 +417,10 @@ <apex:pageBlockSection title="{!layoutSection.name}" showHeader="{!layoutSection.useHeader}" collapsible="{!layoutSection.allowCollapse}" columns="{!layoutSection.columns}"> <!--Each section has layoutFields, let's iterate them as well--> <apex:repeat value="{!layoutSection.layoutFields}" var="layoutField"> - <apex:inputField html-data-id="{!layoutField.fieldAPI}" value="{!Case[layoutField.fieldAPI]}" rendered="{!not(layoutField.isPlaceHOlder)}" - required="{!layoutField.isRequired}" /> + <apex:inputField html-data-id="{!layoutField.fieldAPI}" value="{!Case[layoutField.fieldAPI]}" rendered="{!not(layoutField.isPlaceHOlder)&&isNewMode}" required="{!layoutField.isRequired}" /> + <apex:inputField html-data-id="{!layoutField.fieldAPI}" value="{!Case[layoutField.fieldAPI]}" rendered="{!not(layoutField.isPlaceHOlder)&¬(isNewMode)&&layoutField.fieldAPI!='RecordTypeId'}}" required="{!layoutField.isRequired}" /> + <apex:outputField html-data-id="{!layoutField.fieldAPI}" value="{!Case[layoutField.fieldAPI]}" rendered="{!not(layoutField.isPlaceHOlder)&¬(isNewMode)&&layoutField.fieldAPI=='RecordTypeId'}}" /> + <apex:pageblocksectionitem rendered="{!layoutField.isPlaceHolder}"> </apex:pageblocksectionitem> </apex:repeat> @@ -432,7 +434,19 @@ for (let n = 0; n < layoutSection.length; n++) { let layoutField = layoutSection[n]; if (layoutField.fieldAPI != '' && document.querySelector("[data-id='"+layoutField.fieldAPI+"']") != null) { - document.querySelector("[data-id='"+layoutField.fieldAPI+"']").disabled = !(layoutField.editableField); + let e = document.querySelector("[data-id='"+layoutField.fieldAPI+"']"); + e.disabled = !(layoutField.editableField); + /* + if (!(layoutField.editableField)) { + if (e.getAttribute("multiple") && e.getAttribute("multiple") == 'multiple') { + e.parentNode.classList.add("disabledbutton"); + }else if (e.tagName == 'DIV') { + e.classList.add("disabledbutton"); + }else if (VLookUpFields.indexOf(layoutField.fieldAPI) >= 0) { + e.parentNode.classList.add("disabledbutton"); + } + } + */ } } } @@ -450,6 +464,9 @@ //3. Set Readonly Attribute document.querySelector("[data-id='OwnerId']").classList.add("disabledbutton"); document.querySelector("[data-id='RecordTypeId']").classList.add("disabledbutton"); + + document.getElementById('topButtonRow').style = ''; + document.getElementById('bottomButtonRow').style = ''; //闇�瑕侀殣钘� // document.querySelector("[data-id='SuppliedEmail']").classList.add("displayblock"); @@ -509,7 +526,7 @@ <tr> <td class="pbTitle"> <img src="/img/s.gif" alt="" class="minWidth" title="" width="1" height="1" /> </td> - <td class="pbButton" id="bottomButtonRow"> + <td class="pbButton" id="bottomButtonRow" style="pointer-events: none; opacity: 0.4;"> <input class="btn" type="Button" value="淇濆瓨" onclick="saveCaseProcess('Save')" /> <input class="btn" type="Button" value="淇濆瓨骞跺叧闂�" onclick="saveCaseProcess('SaveAndClose')" /> <input class="btn" type="Button" value="淇濆瓨骞舵柊寤�" onclick="saveCaseProcess('SaveAndNew')" /> -- Gitblit v1.9.1