Skip to content

Instantly share code, notes, and snippets.

Avatar
👩‍💻

Shruti Sridharan shrutis22

👩‍💻
View GitHub Profile
@shrutis22
shrutis22 / formatDate.js
Last active Jul 27, 2016
Convert a date to system locale date.
View formatDate.js
var formatDate = function() {
moment.locale( window.navigator.userLanguage || window.navigator.language );
$( "[data-type='date']" ).each(
function() {
var currentDate = $( this ).html();
if( currentDate !== '' ) {
var formatedDate = moment( currentDate ).format( 'L' );
$( this ).html( formatedDate );
@shrutis22
shrutis22 / LeadKanbanController.cls
Created Jul 31, 2016
Creates a Kanban Viewer for the Lead Object in Lightning Design System
View LeadKanbanController.cls
public class LeadKanbanController {
public static String LEAD_MOVED = '{0} was moved successfully to {1}';
public List<Schema.PicklistEntry> leadStatuses { get; set; }
public Map<String, List<Lead>> allLeads { get; set; }
public class UpdateStatus {
public Boolean isSuccess;
public String message;
}
@shrutis22
shrutis22 / Page1.html
Created Aug 29, 2016
First Visualforce to demonstrate data passing from one page to another.
View Page1.html
<apex:page standardStylesheets="false" showHeader="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5.0" cache="false" expires="0">
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Transferring Data Between VF Pages</title>
<link type="text/css" href="https://www.lightningdesignsystem.com/assets/styles/slds.css" rel="stylesheet" />
@shrutis22
shrutis22 / Page2.html
Created Aug 29, 2016
Second Visualforce page to demonstrate data receiving from Page1 via different methods.
View Page2.html
<apex:page standardStylesheets="false" showHeader="false" applyHtmlTag="false" applyBodyTag="false" docType="html-5.0" cache="false" expires="0">
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Transferring Data Between VF Pages</title>
<link type="text/css" href="https://www.lightningdesignsystem.com/assets/styles/slds.css" rel="stylesheet" />
View ProjectPortfolio.html
<apex:page controller="ProjectPortfolioController" sidebar="false" showHeader="false" standardStylesheets="false" applyHtmlTag="false" applyBodyTag="false" cache="false" expires="0" docType="html-5.0">
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Shruti's Portfolio</title>
<link rel="stylesheet" type="text/css" href="{!URLFOR($Resource.Pace,'flash.css')}" />
View ProjectPortfolioJS.js
var animator = function( timeOut ) {
$( "[name='animation']" ).removeAttr( "class" );
window.setTimeout(
function() {
$( "[name='animation']" ).each(
function() {
var animToBeApplied = $( this ).attr( "animation" );
$( this ).addClass( "animated " + animToBeApplied );
}
@shrutis22
shrutis22 / ProjectPortfolio.css
Created Oct 6, 2016
CSS Styles which are applied to Project Portfolio page
View ProjectPortfolio.css
strong {
font-weight: bold;
}
.button {
background-color: #f2f2f2;
background-image: linear-gradient(to bottom, #f2f2f2, #f2f2f2);
border: 1px solid #bfbfbf;
box-shadow: inset 0 1px 0 white, inset 0 -1px 0 #d9d9d9, inset 0 0 0 1px #f2f2f2, 0 2px 4px rgba(0, 0, 0, 0.2);
color: #8c8c8c;
@shrutis22
shrutis22 / ProjectPortfolioController.cls
Last active Oct 15, 2016
Gets the details of all the Projects in Project custom object.
View ProjectPortfolioController.cls
public class ProjectPortfolioController {
public List<Project__c> allProjects { get; set; }
public ProjectPortfolioController() {
allProjects = new List<Project__c>();
fetchProjects();
}
public void fetchProjects() {
@shrutis22
shrutis22 / FieldSetUIGenerator.cls
Created Oct 16, 2016
Apex Controller for the Field Set UI Generator
View FieldSetUIGenerator.cls
/**
* This Apex Controller is created to
* generate Field Set UI Generator
* which would create dynamic
* Visualforce page with Lightning
* Design System with the Fields
* defined in a Field Set.
*
* @author Shruti Sridharan
* @since 02/09/2016
@shrutis22
shrutis22 / FieldSetUIJS.js
Created Oct 16, 2016
JS File for the Field Set UI Generator
View FieldSetUIJS.js
/**
* This JavaScript file is created to apply
* additional functionalities to the
* 'FieldSetUIGeneratorController' page.
*
* @author Shruti Sridharan
* @since 05/09/2016
* @revisions N/A
*/
var FieldSetUI = {