Skip to content

Instantly share code, notes, and snippets.

View sujeshramachandran's full-sized avatar

sujeshramachandran

View GitHub Profile
@sujeshramachandran
sujeshramachandran / Demo_CRUD_Component_ROW.cmp
Created June 26, 2017 12:40
Demo Update/Delete in DataTable - Child
<aura:component controller="Demo_CRUD_CompCtrl">
<aura:attribute access="PUBLIC" name="view" type="Object"/>
<tr>
<th scope="row" data-label="Account Name">
<div class="slds-truncate" ><a href="javascript:void(0);">{!v.view.Name}</a></div>
</th>
<td data-label="Industry">
<div class="slds-truncate" >{!v.view.Industry}</div>
</td>
<td data-label="Close Date">
@sujeshramachandran
sujeshramachandran / Demo_CRUD_CompCtrl.cls
Created June 26, 2017 12:36
Demo Update/Delete in DataTable - Parent
public class Demo_CRUD_CompCtrl {
@AuraEnabled
public static List<Account> getAllRecords()
{
return [select id, Name,Industry, Phone from Account where Industry != null and Phone != null Limit 10];
}
}
<design:component label="Theme Color Picker">
<design:attribute name="themeColor" label="Theme Color" description="Enter color name, Color code of theme color" />
</design:component>
<design:component label="Theme Color Picker">
<design:attribute description="Enter color name, Color code of theme color" label="Theme Color" name="themeColor">
<sfdc:objects>
<sfdc:object>Account</sfdc:object>
</sfdc:objects>
</design:attribute></design:component>
<design:attribute name="Name" datasource="value1,value2,value3" default="value1" />
<design:attribute name="Name" datasource="value1,value2,value3" />
<aura:component implements="flexipage:availableForAllPageTypes" access="GLOBAL">
<aura:attribute name="themeColor" type="String" default="blue"/>
<div class="StyleDiv" style="{! 'background-color:' + v.themeColor }">
</div>
</aura:component>
<apex:page>
<apex:slds />
<span class="slds-icon_container slds-icon--small slds-icon-standard-account" title="Contact Avatar">
<img src="{!URLFOR($Asset.SLDS, 'assets/images/avatar1.jpg')}" alt="Contact Avatar"/>
</span>
</apex:page>
<design:component label="App Builder Check">
<design:attribute name="isAppbuilderView" default="true" label="is App Builder View"
description="Set is App builder view or not" />
</design:component>
<aura:component implements="flexipage:availableForAllPageTypes">
<aura:attribute name="isAppbuilderView" type="boolean" default="false" />
<div style="slds">
<div class="slds-grid slds-wrap slds-grid--pull-padded">
<div class="{!if(v.isAppbuilderView, 'slds-p-horizontal--small slds-size--1-of-2',
'slds-p-horizontal--small slds-size--1-of-1')}">
<div class="slds-form-element">
<label class="slds-form-element__label" for="text-input-01">First Name</label>
<div class="slds-form-element__control">
<input id="text-input-01" class="slds-input" type="text" placeholder="First Name" />