From 0793b78361e77ac25bb3a38da75678ff5d40eaed Mon Sep 17 00:00:00 2001
From: 高章伟 <gaozhangwei@prec-tech.com>
Date: 星期四, 24 三月 2022 18:33:18 +0800
Subject: [PATCH] PDF空白优化
---
force-app/main/default/pages/NewOnCall.page | 48 ++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 40 insertions(+), 8 deletions(-)
diff --git a/force-app/main/default/pages/NewOnCall.page b/force-app/main/default/pages/NewOnCall.page
index 6eac16b..98ab01f 100644
--- a/force-app/main/default/pages/NewOnCall.page
+++ b/force-app/main/default/pages/NewOnCall.page
@@ -2,7 +2,7 @@
@description :
@author : ChangeMeIn@UserSettingsUnder.SFDoc
@group :
- @last modified on : 03-17-2022
+ @last modified on : 03-23-2022
@last modified by : ChangeMeIn@UserSettingsUnder.SFDoc
-->
<apex:page standardController="On_Call__c" extensions="OnCallController" id="page">
@@ -201,7 +201,7 @@
//Alert Error Message
function alertErrorMessage(errorMsg) {
- let errorMsgNode = document.getElementById("page:form:msgContent");
+ let errorMsgNode = document.getElementById("page:form:block:msgContent");
errorMsg = '閿欒锛氭棤鏁堟暟鎹��' + '\n' + errorMsg;
errorMsgNode.innerText = errorMsg;
errorMsgNode.className = 'pbError';
@@ -210,7 +210,7 @@
//Hide Error Message
function hiddenErrorMsgNode() {
- let errorMsgNode = document.getElementById("page:form:msgContent");
+ let errorMsgNode = document.getElementById("page:form:block:msgContent");
errorMsgNode.innerText = '';
errorMsgNode.className = '';
}
@@ -236,11 +236,7 @@
<div class="ptBreadcrumb"></div>
</div>
<apex:form id="form">
- <!-- Error Msg-->
- <apex:outputPanel id="errorMsg">
- <apex:pageMessages id="msgContent" escape="false" />
- </apex:outputPanel>
- <apex:pageblock >
+ <apex:pageblock id="block" >
<div class="pbHeader">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
@@ -257,6 +253,12 @@
</tr>
</tbody>
</table>
+ </div>
+ <!-- Error Msg-->
+ <div style="text-align: center;">
+ <apex:outputPanel id="errorMsg">
+ <apex:pageMessages id="msgContent" escape="false" />
+ </apex:outputPanel>
</div>
<!-- Iterate the layoutSections, which is a list of sections -->
<apex:repeat value="{!layoutSections}" var="layoutSection">
@@ -292,6 +294,36 @@
QueryOnCallFromAWS();
};
document.querySelector("[data-id='OwnerId']").classList.add("disabledbutton");
+
+ jQuery(".lookupInput").each(function(i,e){
+ let je =jQuery(e).find('input');
+ je.attr("readonly","");
+ je.css("background","unset");
+
+ let dataid = je.attr('data-id');
+ if(['Hospital_Name__c','Department_Class__c','OwnerId'].indexOf(dataid) > -1) return;
+ jQuery(e).children(":last-child").before('<img class="closeIcon" data-id="'+dataid+'" generate="" alt="Clear" src="/s.gif" style="display: inline-block;">');
+ })
+
+ jQuery(".lookupInput").on("mouseenter","img[generate]",function(e){
+ this.className = "closeIconOn";
+ });
+
+ jQuery(".lookupInput").on("mouseleave","img[generate]",function(e){
+ this.className = "closeIcon"
+ });
+
+ jQuery(".lookupInput").on("click","img[generate]",function(e){
+ let id = jQuery("input[data-id='"+jQuery(this).attr("data-id")+ "']").attr("id");
+ let input = document.getElementById(id);
+ if(input){
+ input.value = '';
+ let hidden = document.getElementById(id+'_lkid');
+ if(hidden){
+ hidden.value = '';
+ }
+ }
+ });
});
</script>
<div class="pbBottomButtons">
--
Gitblit v1.9.1