Skip to content

Instantly share code, notes, and snippets.

View srujan21's full-sized avatar

GANGASRUJAN GURUDU srujan21

View GitHub Profile
@srujan21
srujan21 / 0_reuse_code.js
Created June 2, 2016 09:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@srujan21
srujan21 / callcontrollerfunction
Created July 21, 2016 05:01
A way of invoking apex method from javascript
<apex:page controller="actionfun">
<apex:form >
<apex:actionFunction action="{!call}" name="hold"/>
</apex:form>
<script>
hold();
</script>
@srujan21
srujan21 / setvariable
Created July 21, 2016 05:03
A way to set value of controller variable from javascript
<script>
j$('input[id$=offset]').val(joffset);
</script>
<apex:inputHidden value="{!offset}" id="offset" />
@srujan21
srujan21 / fullcalendar.css
Created September 9, 2016 09:49
YearView fullcalendar 2.2.7 css file
/*!
* FullCalendar v2.2.7 Stylesheet
* Docs & License: http://arshaw.com/fullcalendar/
* (c) 2013 Adam Shaw
*/
.fc {
direction: ltr;
text-align: left;
@srujan21
srujan21 / fullcalendar.js
Last active September 12, 2016 05:56
this is full calendar js 2.2.7
/*!
* FullCalendar v2.2.7
* Docs & License: http://arshaw.com/fullcalendar/
* (c) 2013 Adam Shaw
* (c) 2015 Tanguy Pruvot
*/
(function(factory) {
if (typeof define === 'function' && define.amd) {
define([ 'jquery', 'moment' ], factory);
@srujan21
srujan21 / bootstrap-datetimepicker.min.css
Created November 20, 2016 10:21
this is bootstrap datetimepicker with imp for SF
/*!
* Datetimepicker for Bootstrap 3
* version : 4.17.43
* https://github.com/Eonasdan/bootstrap-datetimepicker/
*/
.bootstrap-datetimepicker-widget {
list-style: none !important;
}
.bootstrap-datetimepicker-widget.dropdown-menu {
margin: 2px 0 !important;
@srujan21
srujan21 / custombutton.cls
Created November 22, 2016 15:12 — forked from sbob-sfdc/custombutton.cls
Workshop 201, Tutorial 4, Step 1, Apex
{!REQUIRESCRIPT("/soap/ajax/25.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/25.0/apex.js")}
var result = sforce.apex.execute("InvoiceUtilities","renumberLineItems",{invoice:"{!Invoice__c.Name}"});
alert(result);
window.location.reload();
@srujan21
srujan21 / Isregistered
Last active January 6, 2017 10:09
Panel to distinguish between guest and registered
<apex:outputPanel rendered="{!ISPICKVAL($User.UserType,'Guest')}">
Not logged in. Code for log in form goes here.
</apex:outputPanel>
<apex:outputPanel rendered="{! NOT(ISPICKVAL($User.UserType,'Guest'))}">
Logged in. Code for link to post log in landing page or something else.
</apex:outputPanel>
@page {
margin-top: 4cm;
margin-bottom: 3cm;
@top-center {
content: element(header);
}
@bottom-left {
content: element(footer);
}
@srujan21
srujan21 / if elseif
Created February 7, 2017 06:51
multi If condition in visualforce
<tr class="{!IF(ISNULL(Eslot.sEvent), 'Free', IF(Eslot.sEvent.Appointment_Type__c == 'Personal', 'Pers', 'Fill'))}">