Skip to content

Instantly share code, notes, and snippets.

@mtetlow
Created January 30, 2018 17:38
Show Gist options
  • Save mtetlow/4e04d6c0348406810d1ba2ff5bf9bcc1 to your computer and use it in GitHub Desktop.
Save mtetlow/4e04d6c0348406810d1ba2ff5bf9bcc1 to your computer and use it in GitHub Desktop.
<apex:page standardController="TASKRAY__Project_Task__c" sidebar="false" showHeader="false">
<apex:slds />
<!-- Need to include chatter so the new button on the AttachedContentNotes related list works -->
<style>
.hidden {
display: none;
}
</style>
<div class="hidden">
<chatter:newsfeed />
</div>
<apex:relatedList list="AttachedContentNotes" />
<script>
function navigateToUrlNewTab(a){
if("undefined"!==typeof sforce&&"undefined"!==typeof sforce.one){
sforce.one.navigateToURL(a);
}else{
newwindow=window.open(a);
if (window.focus) {setTimeout(newwindow.focus(),1);}
}
}
window.navigateToUrl = window.navigateToUrlNewTab;
var anchors = document.querySelectorAll('tbody a');
for (var i = 0; i < anchors.length; ++i) {
anchors[i].setAttribute('target','_blank');
}
</script>
</apex:page>
<apex:page standardController="TASKRAY__Project_Task__c" sidebar="false" showHeader="false">
<apex:slds />
<body style="margin:0px;padding:0px;overflow:hidden">
<button style="margin: 4px" class="slds-button" onclick="document.getElementById('related-list-frame').contentWindow.location.reload();">Refresh</button>
<iframe id="related-list-frame" name="enhancedNotesFrame" src="{!URLFOR($Page.EnhancedNotes)}?Id={!TASKRAY__Project_Task__c.Id}" frameborder="0" style="overflow:hidden;height:calc(100vh - 34px);width:100%" height="100%" width="100%" />
</body>
</apex:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment