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 sidebar="true" controller="TableSortingCtrl"> | |
<apex:includeScript | |
value="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" /> | |
<apex:includeScript | |
value="//cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.17.8/js/jquery.tablesorter.min.js" /> | |
<apex:stylesheet | |
value="//cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.17.8/css/theme.blue.css" /> | |
<apex:datatable value="{!accounts}" var="acc" id="accsTable" styleclass="tablesorter"> | |
<apex:column headerValue="Created"> |
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 TableSortingCtrl { | |
public List<Account> accounts {get; set;} | |
public TableSortingCtrl() | |
{ | |
accounts=[select id, CreatedDate, Name, BillingStreet, | |
BillingState, BillingCity, | |
BillingPostalCode, BillingCountry | |
from Account | |
where BillingPostalCode!=null |
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 AddAttachmentExt | |
{ | |
private ApexPages.StandardController stdCtrl; | |
public Attachment att {get; set;} | |
public AddAttachmentExt(ApexPages.StandardController inStd) | |
{ | |
stdCtrl=inStd; | |
att=new Attachment(); | |
} |
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 standardController="Account" extensions="AddAttachmentExt"> | |
<apex:includeScript value="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js"/> | |
<apex:form> | |
<apex:sectionHeader title="{!Account.name} Attachments" /> | |
<apex:pageBlock mode="maindetail"> | |
<apex:pageBlockSection title="Existing Attachments" columns="1"> | |
<apex:PageBlockTable value="{!Account.Attachments}" var="attach"> | |
<apex:column value="{!attach.Name}" /> | |
<apex:column headerValue="Length (bytes)" value="{!attach.BodyLength}" /> | |
<apex:column headerValue="Owner" value="{!attach.Owner.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
public with sharing class BarcodeSF1Ctrl | |
{ | |
@RemoteAction | |
public static String getRecordFromBarcode(String bcStr) | |
{ | |
String result; | |
List<String> eles=bcStr.split(':'); | |
String code=eles[1].trim(); | |
List<Account> accs=[select id, Barcode__c from Account where Barcode__c=:code]; |
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 applyHtmlTag="false" showheader="false" sidebar="false" controller="BarcodeSF1Ctrl"> | |
<head> | |
<title>BarcodeReader</title> | |
<apex:stylesheet value="{!URLFOR($Resource.alertify, 'alertify.js-0.3.11/themes/alertify.core.css')}"/> | |
<apex:stylesheet value="{!URLFOR($Resource.alertify, 'alertify.js-0.3.11/themes/alertify.default.css')}"/> | |
<apex:includeScript value="{!URLFOR($Resource.alertify, 'alertify.js-0.3.11/lib/alertify.min.js')}"/> | |
</head> | |
<body> | |
<div> | |
<img width="320" height="240" src="" id="picture" style="border:10px groove silver" /> |
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 > | |
<script type="text/javascript" | |
src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.10.2.min.js"></script> | |
<script type="text/javascript" src="{!URLFOR($Resource.QRCode, 'jsqrcode-master/src/grid.js')}"></script> | |
<script type="text/javascript" src="{!URLFOR($Resource.QRCode, 'jsqrcode-master/src/version.js')}"></script> | |
<script type="text/javascript" src="{!URLFOR($Resource.QRCode, 'jsqrcode-master/src/detector.js')}"></script> | |
<script type="text/javascript" src="{!URLFOR($Resource.QRCode, 'jsqrcode-master/src/formatinf.js')}"></script> | |
<script type="text/javascript" src="{!URLFOR($Resource.QRCode, 'jsqrcode-master/src/errorlevel.js')}"></script> | |
<script type="text/javascript" src="{!URLFOR($Resource.QRCode, 'jsqrcode-master/src/bitmat.js')}"></script> |
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 StreamingController | |
{ | |
public String getTopic() | |
{ | |
String result=''; | |
List<PushTopic> topics=[select id, Name from PushTopic where Name='Cases']; | |
if (0!=topics.size()) | |
{ | |
result='Cases'; |
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 controller="StreamingController"> | |
<apex:pageMessages id="msgs" /> | |
<apex:outputPanel id="all"> | |
<apex:outputPanel rendered="{!topic==''}"> | |
<apex:form > | |
<apex:actionFunction name="createTopic" action="{!CreateTopic}" rerender="all, msgs" /> | |
<script> | |
alert('Creating topic - create topic function = ' + createTopic); | |
createTopic(); | |
</script> |
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:component > | |
<apex:attribute name="topic" description="The topic name" type="String" required="true"/> | |
<apex:includeScript value="{!URLFOR($Resource.streaming, 'streaming/cometd.js')}"/> | |
<apex:includeScript value="{!URLFOR($Resource.streaming, 'streaming/jquery-1.5.1.js')}"/> | |
<apex:includeScript value="{!URLFOR($Resource.streaming, 'streaming/json2.js')}"/> | |
<apex:includeScript value="{!URLFOR($Resource.streaming, 'streaming/jquery.cometd.js')}"/> | |
<script type="text/javascript"> | |
(function($){ | |
$(document).ready(function() { | |
$.cometd.addListener("/meta/*", |