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 extends="force:slds"> | |
<!-- All items added to the list --> | |
<aura:attribute name="data" type="List" default="[]" /> | |
<!-- The list of currently viewable items --> | |
<aura:attribute name="filteredData" type="List" default="[]" /> | |
<!-- Input for a new item --> | |
<aura:attribute name="newItem" type="String" /> | |
<!-- Input for the filter text --> | |
<aura:attribute name="filter" type="String" /> | |
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="value" type="Integer" default="0" /> | |
<aura:attribute name="variant" type="String" /> | |
<aura:attribute name="hasVariant" type="Boolean" access="private" default="{!false}" /> | |
<aura:attribute name="ringClass" type="String" access="private" /> | |
<aura:attribute name="iconName" type="String" access="private" /> | |
<aura:attribute name="altText" type="String" access="private" /> | |
<aura:handler name="init" value="{!this}" action="{!c.updateView}" /> |
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
global class PagingSortingController { | |
@AuraEnabled global static Account[] getAccounts() { | |
return [SELECT Name, Industry, AnnualRevenue FROM Account LIMIT 1000]; | |
} | |
} |
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 class PageController { | |
// Transient so we don't exceed view state limits | |
public transient String fileType { get; set; } | |
public transient Blob fileBody { get; set; } | |
ApexPages.StandardController controller; | |
public PageController(ApexPages.StandardController controller) { | |
this.controller = controller; | |
} |
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 class ServerSide50KPagination { | |
Id[] recordIds; | |
public Integer maxPage { get; set; } | |
public Integer pageNumber { get; set; } | |
public Integer pageSize { get; set; } | |
public Account[] records { get; set; } | |
public ServerSide50KPagination() { | |
recordIds = new Id[0]; | |
for(Account record: [SELECT Id FROM Account ORDER BY Name]) { |
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="force:appHostable,flexipage:availableForAllPageTypes" access="global"> | |
<div class="slds-m-around--xx-large slds-text-align--center"> | |
<lightning:button label="Fire toast event" onclick="{! c.fireToastEvent }"/> | |
</div> | |
</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 > | |
<ltng:require scripts="/resource/rating/vendor/jquery.js,/resource/rating/lib/jquery.raty.js" | |
styles="/resource/rating/lib/jquery.raty.css" | |
afterScriptsLoaded="{!c.afterScriptsLoaded}"/> | |
<aura:attribute name="value" type="Integer" required="true"/> | |
<aura:attribute name="ready" type="Boolean" default="false"/> | |
<div aura:id="rating"></div> | |
</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
<apex:page standardStylesheets="true" showHeader="true" sidebar="true"> | |
<html> | |
<head> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet"/> | |
<link href='https://fonts.googleapis.com/css?family=Roboto:400,700italic' rel='stylesheet' type='text/css' /> | |
<!-- Compiled and minified CSS --> | |
<!-- Latest compiled and minified CSS --> | |
<meta name="viewport" content="width=device-width, initial-scale=1,minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" /> | |
<style> | |
/* Code for Responsive Nature */ |
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
<apex:page showHeader="false" sidebar="false" standardStylesheets="false" docType="html-5.0" language="en-US" applyHTMLTag="false"> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<title>Anup's Bootstrap example</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<!-- Bootstrap --> | |
<link href="{!URLFOR($Resource.Bootstrap_3_0_3, 'dist/css/bootstrap.min.css')}" rel="stylesheet" /> |
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 class FileController { | |
@AuraEnabled | |
public static Id saveTheFile(Id parentId, String fileName, String base64Data, String contentType) { | |
base64Data = EncodingUtil.urlDecode(base64Data, 'UTF-8'); | |
Attachment a = new Attachment(); | |
a.parentId = parentId; | |
a.Body = EncodingUtil.base64Decode(base64Data); |