Skip to content

Instantly share code, notes, and snippets.

View keirbowden's full-sized avatar

Keir Bowden keirbowden

View GitHub Profile
@keirbowden
keirbowden / gist:7292906
Created November 3, 2013 17:58
The Freezer - Visualforce page to allow users to be frozen or defrosted
<apex:page >
<script type="text/javascript">
var __sfdcSessionId = '{!GETSESSIONID()}';
</script>
<script src="../../soap/ajax/29.0/connection.js"
type="text/javascript"></script>
<script type="text/javascript">
function getUserInfo()
{
<apex:page standardController="Lead">
<style>
.fieldempty
{
background-color: yellow;
}
.fieldpopulated
{
background-color: white;
@keirbowden
keirbowden / gist:6204673
Created August 11, 2013 12:27
Visualforce/JQuery Mobile application to demonstrate swipe navigation
<apex:page docType="html-5.0" applyHtmlTag="false" controller="LaunchpadController" showHeader="false" sidebar="false" standardStyleSheets="false">
<head>
<title>Swipe Demo App</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"></meta>
<!-- JQuery Mobile -->
<apex:includeScript value="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js"/>
<apex:styleSheet value="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
<apex:includeScript value="https://ajax.aspnetcdn.com/ajax/jquery.mobile/1.3.1/jquery.mobile-1.3.1.min.js"/>
</head>
@keirbowden
keirbowden / gist:6044766
Created July 20, 2013 11:55
Visualforce page for a Publisher action that posts case information to an account feed.
<apex:page standardcontroller="Account" extensions="ChatterAccountSnapshotExt">
<apex:form >
<apex:pageMessages />
<apex:pageBlock title="Service Snapshot">
<apex:pageBlockButtons location="bottom">
<apex:commandButton value="Post to Feed" action="{!post}" />
</apex:pageBlockButtons>
<apex:pageBlockSection columns="1">
<apex:pageBlockSectionItem >
<apex:outputLabel value="Closed Cases" />
@keirbowden
keirbowden / gist:6044762
Created July 20, 2013 11:53
Extension controller for a Publisher action that posts case information to an account feed.
public with sharing class ChatterAccountSnapshotExt
{
private Id accId;
public Boolean posted {get; set;}
public ChatterAccountSnapshotExt(ApexPages.StandardController std)
{
accId=std.getId();
posted=false;
}