This file contains 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" /> | |
<aura:attribute name="message" type="String" /> | |
<aura:attribute name="showConfirmButton" type="Boolean" default="true" /> | |
<aura:attribute name="showCancelButton" type="Boolean" default="false" /> | |
<aura:attribute name="confirmButtonLabel" type="String" default="OK" /> | |
<aura:attribute name="cancelButtonLabel" type="String" default="Cancel" /> | |
<!-- accepting user input --> | |
<aura:attribute name="inputType" type="String" /> |
This file contains 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="forceCommunity:availableForAllPageTypes" controller="ProfilePhotoCtrl" access="global"> | |
<aura:attribute name="photo" type="Object" /> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | |
<aura:handler name="render" value="{!this}" action="{!c.onRender}"/> | |
<lightning:card class="slds-p-horizontal_medium"> | |
<lightning:spinner aura:id="spinner" /> | |
<aura:if isTrue="{!empty(v.photo) == false}"> | |
<div class="c-profile-img"> |
This file contains 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 DeletePhotoCtrl { | |
@AuraEnabled @RemoteAction | |
public static Map<String, Object> deleteCommunityUserPhoto() { | |
Map<String, Object> result = new Map<String, Object>(); | |
try { | |
// get logged in user id | |
String userId = UserInfo.getUserId(); | |
// get community id | |
String networkId = Network.getNetworkId(); |
This file contains 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 class LoadRecordsCtrl { | |
@RemoteAction | |
public static Map<String, Object> fetchRecords(String sObjectName, String lastKnownId, Integer pageSize, Integer direction) { | |
Map<String, Object> result = new Map<String, Object>(); | |
try { | |
SObject sObj = (SObject) Type.forName(sObjectName).newInstance(); | |
Integer totalRecords = SObjectQueryService.getTotalCount(sObjectName); | |
Integer totalPages = (Integer) Math.ceil((Decimal) totalRecords / pageSize); | |
Integer maxResults = pageSize; |
This file contains 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
<apex:page standardController="Account" extensions="SaveDOMToImageCtrl" docType="html-5.0"> | |
<!-- load domtoimage JS library --> | |
<apex:includeScript value="{!$Resource.DomToImage}" /> | |
<style type="text/css"> | |
#image_data { | |
border: red 2px solid; | |
background-color: white; | |
} |
This file contains 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
// case comment trigger helper class | |
public with sharing class CaseCommentHelper { | |
public static void handleFirstResponse(List<CaseComment> comments){ | |
DateTime completionDate = System.now(); | |
List<String> caseIds = new List<String>(); | |
for (CaseComment cc : comments){ | |
// Only public comments qualify | |
if(cc.IsPublished == true) caseIds.add(cc.ParentId); | |
} |
This file contains 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="CreateQuoteController" implements="force:hasRecordId,force:hasSObjectName,flexipage:availableForRecordHome,force:lightningQuickActionWithoutHeader" access="global" > | |
<aura:attribute name="recordId" type="String" /> | |
<aura:attribute name="defaults" type="Object" /> | |
<aura:attribute name="editSection" type="List" /> | |
<aura:attribute name="readSection" type="List" /> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | |
<lightning:notificationsLibrary aura:id="notificationsLibrary" /> |