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
| //Add a placeholder image on img load error using jQuery | |
| $("img").on('error', function () { | |
| $(this).attr("src", "https://www.imgServer.com/myExampleImgURL.jpg"); | |
| }); |
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
| //CHANGE THESE | |
| String family = 'Tissue Expanders'; | |
| String category = 'Miscellaneous'; | |
| String subcategory = 'Accessory Items'; | |
| ccrz__E_Category_c cat = [SELECT Id, Name, ccrz_ParentCategory_r.Name, ccrz_ParentCategory_r.ccrz_ParentCategory_r.Name FROM ccrz_E_Category__c WHERE | |
| Name = :subcategory AND | |
| ccrz_ParentCategory_r.Name = :category AND | |
| ccrz_ParentCategory_r.ccrz_ParentCategory_r.Name = :family | |
| LIMIT 1]; | |
| List<ccrz__E_ProductCategory_c> existingProdCats = [SELECT Id, ccrz_Product_c, ccrz_Category_c FROM ccrz_E_ProductCategory_c WHERE ccrz_Category__r.Id = :cat.Id]; |
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="forceCommunity:availableForAllPageTypes" access="global"> | |
| <aura:attribute name="url" type="String" /> | |
| <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | |
| <ui:outputURL aura:id="url" value="{!v.url}" label = "Back To Home" /> | |
| </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
| <!-- This component displays and autoplays a mp4 video from the Asset Library --> | |
| <apex:component controller="autoPlayVidController"> | |
| <apex:attribute name="vidName" description="This is the name of the mp4 video in Asset Library" type="String" required="required" assignTo="{!userInput}"/> | |
| <apex:attribute name="width" description="This is the width of the video in pixels." type="Integer" required="required" /> | |
| <apex:attribute name="height" description="This is the height of the video in pixels." type="Integer" required="required"/> | |
| <!-- BEGIN DEBUG SECTION-----------------------------------------> | |
| <!-- | |
| <h3>DEBUG SECTION</h3> | |
| <p>vidSource: {!vidName}</p> |
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
| ({ | |
| insertNewStatus : function(component) { | |
| //Get the Apex function you want to call | |
| var action = component.get("c.insertStatus"); | |
| //Set the params for the function | |
| action.setParams({ | |
| text : component.get("v.status") | |
| }); |
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
| ({ | |
| doInit : function(component, event, helper) { | |
| helper.loadStatuses(component); | |
| }, | |
| submitStatusButtonClick : function(component, event, helper) { | |
| helper.insertNewStatus(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 controller="StatusService"> | |
| <aura:attribute name="status" type="String" /> | |
| <aura:attribute name="statuses" type="String[]" /> | |
| <!-- fetch the statuses when the component initializes --> | |
| <aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | |
| <p>Input New Status:</p> | |
| <ui:inputTextArea value="{!v.status}" /> | |
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 StatusService { | |
| @AuraEnabled | |
| public static List<Status__c> getStatuses() { | |
| return [SELECT Name, StatusText__c, CreatedDate | |
| FROM Status__c ORDER BY CreatedDate DESC LIMIT 10]; } | |
| @AuraEnabled | |
| public static List<Status__c> insertStatus(String text) { | |
| Status__c myStatus = new Status__c(); |
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:application > | |
| <c:StatusPage /> | |
| </aura:application> |
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
| ({ | |
| doInit : function(component, event, helper) { | |
| let action = component.get('c.getStatuses'); | |
| action.setParams({ | |
| accountId: '123', | |
| someOtherParameter: 'value' | |
| }); | |
| //Callback executed after server action returns | |
| action.setCallback(this, function(response) { |
NewerOlder