From 47efcaa6a55e4b397442616f8b24d672afddefd8 Mon Sep 17 00:00:00 2001
From: 沙世明 <shashiming@prec-tech.com>
Date: 星期五, 08 四月 2022 17:13:48 +0800
Subject: [PATCH] SWAG-CC58ME
---
force-app/main/default/pages/NewAndEditASEActivity.page | 42 +++++++++++++++++++++++++++++++++++++++---
1 files changed, 39 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/pages/NewAndEditASEActivity.page b/force-app/main/default/pages/NewAndEditASEActivity.page
index 8017b88..6d10370 100644
--- a/force-app/main/default/pages/NewAndEditASEActivity.page
+++ b/force-app/main/default/pages/NewAndEditASEActivity.page
@@ -1,3 +1,10 @@
+<!--
+ @description :
+ @author : ChangeMeIn@UserSettingsUnder.SFDoc
+ @group :
+ @last modified on : 03-23-2022
+ @last modified by : ChangeMeIn@UserSettingsUnder.SFDoc
+-->
<apex:page standardController="ASEActivity__c" extensions="NewAndEditASEActivityController" id="page">
<apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
<script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
@@ -397,10 +404,11 @@
accountValue = document.getElementById(accountNodeId).value;
}
console.log('accountValue = ' + accountValue);
+ let searchContactKeyWord = document.querySelector("[data-id='ReporterASE__c']").value;
if(accountValue !='000000000000000'){
- suffixUrl = "?contactId="+contactNodeId+"&accountId="+accountValue;
+ suffixUrl = "?contactId="+contactNodeId+"&accountId="+accountValue+"&searchContactKeyWord=" + searchContactKeyWord;
}else{
- suffixUrl = "?contactId="+contactNodeId;
+ suffixUrl = "?contactId="+contactNodeId+"&searchContactKeyWord=" + searchContactKeyWord;
}
let baseUrl = "/apex/SearchContactPage";
let newSearchContactParam = 'height=600,width=800,left=100,top=100,dialogHide=true,resizable=no,scrollbars=yes,toolbar=no,status=no';
@@ -545,7 +553,16 @@
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");
+ }
+ if (e.tagName == 'DIV') {
+ e.classList.add("disabledbutton");
+ }
+ }
}
}
}
@@ -561,6 +578,7 @@
replaceSearchContactLookup();
document.querySelectorAll("[data-id='OwnerId']")[0].classList.add("disabledbutton");
jQuery('a[data-id="OwnerId"]').remove();
+ /*
jQuery(".lookupInput").each(function(i,e){
let je =jQuery(e).find('input');
je.attr("readonly","");
@@ -590,6 +608,24 @@
}
}
});
+ */
+ let previous_value = {};
+ jQuery(".lookupInput input").each(function(i,e){
+ let je =jQuery(e);
+
+ let dataid = je.attr('data-id');
+ if(['ContactId'].indexOf(dataid) < 0) return;
+
+ jQuery(e).focus(function(){
+ previous_value[this.id] = this.value;
+ })
+
+ jQuery(e).change(function(){
+ if (previous_value[this.id] != jQuery(this).val()) {
+ document.getElementById(this.id+'_lkid').value = '';
+ }
+ })
+ })
});
</script>
<div class="pbBottomButtons">
--
Gitblit v1.9.1