This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ({ | |
| init : function(component, event, helper) { | |
| helper.retrievePageLayout(component, helper); | |
| } | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <aura:component controller="PageLayoutRecordDisplayController" implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:hasSObjectName"> | |
| <aura:attribute name="PageLayoutName" type="String" /> | |
| <aura:attribute name="PageLayout" type="Object" access="private" /> | |
| <aura:handler name="init" value="{!this}" action="{!c.init}" /> | |
| <div class="slds-box slds-theme_default"> | |
| <aura:if isTrue="{! v.recordId }"> | |
| <lightning:recordViewForm recordId="{! v.recordId }" objectApiName="{! v.sObjectName }"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <c:CollapsibleSection title="<Some_Title_Here>"> | |
| <!-- Body Content Here --> | |
| </c:CollapsibleSection> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ({ | |
| handleSectionHeaderClick : function(component, event, helper) { | |
| var button = event.getSource(); | |
| button.set('v.state', !button.get('v.state')); | |
| var sectionContainer = component.find('collapsibleSectionContainer'); | |
| $A.util.toggleClass(sectionContainer, "slds-is-open"); | |
| } | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <aura:component> | |
| <aura:attribute name="title" type="String" /> | |
| <div class="slds-section slds-is-open" | |
| aura:id="collapsibleSectionContainer"> | |
| <h3 class="slds-section__title slds-theme_shade"> | |
| <!-- button state defaults to false so state | |
| represents "is collapsed" | |
| --> | |
| <lightning:buttonStateful labelWhenOff="{! v.title }" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <aura:component implements="..."> | |
| <c:customDataTable viewRecordOverride="{! c.viewRecordOverride }" | |
| ... /> | |
| </aura:component> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <aura:component implements="..."> | |
| <aura:attribute name="viewRecordOverride" type="Aura.Action" /> | |
| <table> | |
| ... | |
| <tr> | |
| <td> | |
| <a onclick="{! v.viewRecordOverride ? v.viewRecordOverride : c.viewRecord }>{! record.Name }</a> | |
| </td> | |
| </td> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="slds-box"> | |
| <!-- Lightning component body markup here --> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @isTest | |
| public with sharing class RecordVideoViewerControllerTest { | |
| @isTest | |
| static void getVideoURL_accountWithWebsiteAsVideoSource_expectVideoSourceUrlReturnedTest() { | |
| String videoSrcURL = 'http://vid@example.com'; | |
| Account acct = new Account( | |
| Name = 'Test Account', | |
| Website = videoSrcURL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public with sharing class RecordVideoViewerController { | |
| @AuraEnabled | |
| public static String getVideoURL(Id recordId, String videoField) { | |
| Schema.SObjectType objectType = recordId.getSobjectType(); | |
| String objectName = objectType.getDescribe().getName(); | |
| String videoSOQL = 'SELECT ' + videoField + | |
| ' FROM ' + objectName + | |
| ' WHERE Id = :recordId'; |