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 TaskWrapper { | |
public Boolean markedComplete { get; set; } | |
public Boolean markedIncomplete { get; set; } | |
public Boolean markedReviewed { get; set; } | |
public Boolean created { get; set; } | |
public String assignedTo { get; set; } | |
//public Boolean markedReviewedIncomplete { get; set; } | |
public NewsFeed taskFeedItem { get; set; } | |
public Integer commentCount { get; set; } |
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 void getLabelsAndWidthsfromFields(List<String> fieldNames, String objectName) | |
{ | |
labels = new List<String>(); | |
widths = new List<String>(); | |
try { | |
Map<String, Schema.SObjectType> gd = Schema.getGlobalDescribe(); | |
SObjectType sot = gd.get(objectName); | |
Map<String, SObjectField> fields = sot.getDescribe().fields.getMap(); | |
List<SObjectField> fieldtokens = fields.values(); |
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
//prototype only. Does not actually work yet... | |
public with sharing class SObjectUtils { | |
//Does not support fields with multiple reference object types | |
public SObject deepClone(SObject so) { | |
SObject newSO = so.clone(false,true); | |
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
host = ApexPages.currentPage().getHeaders().get('Host'); | |
Integer startIndex = siteUrl.indexOf(host) + host.length() + 1; | |
Integer endIndex = siteUrl.lastIndexOf('/'); | |
System.debug('si:' + startIndex + 'ei: ' + endIndex); | |
if(startIndex < endIndex && startIndex != -1) | |
extension = siteUrl.substring(startIndex,endIndex); | |
else | |
extension = ''; | |
if(extension != 'apex') | |
testUrl2 = siteUrl.substring(0, startIndex) + extension + System.Page.largeLookup.getUrl(); |
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
// The step is the distance between each label on the y axis | |
public Integer calculateStepSize(Integer highestVal) | |
{ | |
//calculates the appropriate step to display on the y axis | |
List<Integer> possibleSteps = New Integer[]{1,2,5,10,20,50}; | |
for(Integer i= (possibleSteps.size() - 1);i >= 0; i--) { | |
System.debug('HIGH DIV 6:' + (highestVAl / 6) + ' POSS STEP:' + possibleSteps[i]); | |
if ((highestVal / 6) > possibleSteps[i]) | |
return possibleSteps[i]; | |
} |
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
<div id="addTask" style="display: none" > | |
<apex:outputpanel id="atd"> | |
<h2>New Task</h2> | |
<apex:form > | |
<apex:panelGrid columns="2" width="85%"> |
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
// see: http://community.salesforce.com/t5/Apex-Code-Development/Building-a-reusable-JSON-component/m-p/172428 | |
// and: http://joe-ferraro.com/2009/04/extjs-vf-json/ | |
public static String getJsonFromObject(String objectName, List<String> columns, String filterString) | |
{ | |
if(filterString == null) | |
filterString = ''; | |
String jsonData = '[ '; | |
try { |
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
/* Joel Dietz | |
[email protected] | |
03/26/2010 | |
*/ | |
public class TaskController { | |
public TaskPage activePage { get; set; } | |
public List<TaskPage> pages { get; set; } | |
public List<TaskPage> activePages { get; set; } |
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:pageBlock id="recordsection" > | |
<div id="myrecordsection"> | |
<apex:pageBlockSection title="All Assigned Tasks" columns="1"> | |
<apex:pageBlockTable value="{!activePage.pageTasks}" title="Tasks to Review" var="td" id="ttr"> | |
<apex:column headerValue="Name"> | |
<apex:outputField value="{!td.name}"/> | |
</apex:column> |
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
<script type="text/javascript" src="{!URLFOR($Resource.JQAutocomplete11,'jquery-autocomplete/jquery.autocomplete.pack.js')}"></script> |