Skip to content

Instantly share code, notes, and snippets.

Avatar

Keir Bowden keirbowden

View GitHub Profile
@keirbowden
keirbowden / NotHotDog.cmp
Created Jul 21, 2017
Not Hotdog Lightning Component
View NotHotDog.cmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,force:hasRecordId" access="global" controller="EinsteinVision_Admin">
<aura:attribute name="initialised" type="boolean" default="false" />
<aura:attribute name="files" type="Object[]"/>
<aura:attribute name="spinnerWaiting" type="Boolean" default="false"/>
<aura:attribute name="image" type="String" />
<aura:attribute name="imagedata" type="String" />
<aura:attribute name="result" type="String" default="Need a picture"/>
<aura:attribute name="showResult" type="Boolean" default="false" />
<div class="slds-page-header">
View VFPageMetrics.page
<apex:page >
<script type="text/javascript">
var __sfdcSessionId = '{!GETSESSIONID()}';
</script>
<script src="../../soap/ajax/40.0/connection.js"
type="text/javascript"></script>
<script type="text/javascript">
function getMetrics()
{
@keirbowden
keirbowden / UserFreezerApp.app
Created Jan 31, 2016
Lightning Application for the User Freezer Blog Post
View UserFreezerApp.app
<aura:application >
<c:UserFreezer />
</aura:application>
@keirbowden
keirbowden / UserFreezer.css
Created Jan 31, 2016
Lightning Component Style for the User Freezer Blog Post
View UserFreezer.css
.THIS td {
padding: 3px 5px 2px 5px;
}
.THIS th {
padding: 3px 5px 2px 5px;
font-weight: bold;
border-bottom: 1px solid black;
}
.THIS .apply {
text-align: right;
@keirbowden
keirbowden / UserFreezerHelper.js
Created Jan 31, 2016
Lightning Component JavaScript Helper for the User Freezer Blog Post
View UserFreezerHelper.js
({
doInit : function(cmp, ev) {
cmp.set('v.Message', 'Retrieving user details');
var action = cmp.get("c.GetUserDetails");
var self = this;
action.setCallback(this, function(response) {
self.actionResponseHandler(response, cmp, self, self.gotUserDetails, 'Retrieved User Details');
});
$A.enqueueAction(action);
@keirbowden
keirbowden / UserFreezerController.js
Created Jan 31, 2016
Lightning Component JavaScript Controller for the User Freezer Blog Post
View UserFreezerController.js
({
doInit : function(component, event, helper) {
helper.doInit(component, event);
},
frozenChanged: function(component, event, helper) {
helper.updateCheckbox(component, event);
},
applyChanges : function(component, event, helper) {
helper.applyChanges(component, helper);
}
@keirbowden
keirbowden / UserFreezer.cmp
Last active Jan 31, 2016
Lightning Component for the User Freezer Blog Post
View UserFreezer.cmp
<aura:component controller="UserFreezer">
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
<aura:attribute name="UserDetails" type="Object" />
<aura:attribute name="Message" type="String" />
<table>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Username</th>
@keirbowden
keirbowden / UserFreezer.cls
Created Jan 31, 2016
Lightning Component Apex Controller for the User Freezer Blog Post
View UserFreezer.cls
/** *****************************************************************************
* User Freezer
*
* Description:
*
* Apex controller for the Freeze Users Lightning Component.
*
* If you are the sort of person who likes reading code, BrightGen is the place
* for you - check out http://www.brightgen.com to see our latest vacancies.
*
@keirbowden
keirbowden / AccountWrappers.css
Created Dec 12, 2015
Lightning Component CSS for the Lightning Component Wrapper Class blog post
View AccountWrappers.css
.THIS .cell {
padding: 5px 5px 5px 5px;
}
.THIS .head {
padding: 5px 5px 5px 5px;
font-weight: bold;
}
.THIS.big {
font-size: 20px;
font-weight: bold;
View AccountWrappersController.js
({
doInit : function(component, event, helper) {
helper.init(component, event);
},
getAccounts : function(component, event, helper) {
helper.getAccounts(component, event);
}
})
You can’t perform that action at this time.