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 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 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
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
<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 RequiredCtrl | |
{ | |
public List<Row> rows {get; set;} | |
public String name {get; set;} | |
public Account acc {get; set;} | |
public RequiredCtrl() | |
{ | |
rows=new List<Row>(); | |
rows.add(new Row()); |
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="RequiredCtrl" tabstyle="Account" doctype="html-5.0"> | |
<apex:pageMessages id="msgs"/> | |
<apex:form> | |
<apex:pageBlock mode="maindetail"> | |
<apex:pageBlockButtons location="top"> | |
<apex:commandButton value="Save" action="{!save}" /> | |
</apex:pageBlockButtons> | |
<apex:pageBlockSection title="Account Information"> | |
<apex:pageBlockSectionItem> | |
<apex:outputlabel value="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 controller="AccountsListController" implements="flexipage:availableForAllPageTypes"> | |
<link href="/resource/Bootstrap_3_3_2/bootstrap-3.3.2-dist/css/bootstrap.min.css" rel="stylesheet" /> | |
<link class="user" href="/resource/Bootstrap_3_3_2/bootstrap-3.3.2-dist/css/bootstrap-theme.min.css" | |
rel="stylesheet" type="text/css" /> | |
<aura:attribute name="accounts" type="Account[]" /> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | |
<div class="container-fluid"> | |
<div class="row-fluid"> |
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 > | |
<script> | |
var accsListCtrl={ | |
// renders the HTML to display the supplied accounts in bootstrap panels | |
renderAccs : function(accounts) { | |
var markup=''; | |
$.each(accounts, function(idx, acc) { | |
markup+= ' <div class="row-fluid"> \n' + | |
' <div class="col-xs-12 fullwidth"> \n' + | |
' <div class="panel panel-primary"> \n' + |
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 controller="CasesController"> | |
<aura:attribute type="Case[]" name="cases" description="casesToIterate" /> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/> | |
<aura:iteration items="{!v.cases}" var="case"> | |
<c:RWDCase case="{!case}" /> | |
</aura:iteration> | |
</aura:application> |