Skip to content

Instantly share code, notes, and snippets.

View msrivastav13's full-sized avatar
🎯
Focusing

Mohith Shrivastava msrivastav13

🎯
Focusing
View GitHub Profile
@msrivastav13
msrivastav13 / LC_Communities
Created January 19, 2016 02:20
Lightning component for communities
<aura:component implements="forceCommunity:availableForAllPageTypes">
</aura:component>
@msrivastav13
msrivastav13 / LDAppBuilder
Created January 19, 2016 02:27
LDAppBuilder
<aura:component implements="flexipage:availableForAllPageTypes">
</aura:component>
@msrivastav13
msrivastav13 / LCRecordHome.cmp
Last active January 19, 2016 03:15
LCRecordHome.cmp
<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,force:hasSObjectName">
</aura:component>
<aura:component implements="forceCommunity:availableForAllPageTypes" controller="FuncommunityController">
<aura:attribute name="topic" type="String" />
<aura:handler name="init" value="{!this}" action="{!c.getTopicName}" />
<div>
<h1>TOPIC FROM SERVER {!v.topic}</h1>
</div>
</aura:component>
@msrivastav13
msrivastav13 / FunCommunityComponentController.js
Created January 31, 2016 01:09
FunCommunityComponentController.js
({
getTopicName: function(component, event, helper) {
helper.getTopicName(component);
}
})
@msrivastav13
msrivastav13 / FunCommunityComponentHelper.js
Created January 31, 2016 01:09
FunCommunityComponentHelper.js
({
getTopicName: function(component) {
console.log('here');
var action = component.get("c.fetchTopicName");
var self = this;
var topicvar = component.get("v.topic");
console.log(topicvar);
action.setParams({
"topicname": topicvar
});
@msrivastav13
msrivastav13 / FunCommunityComponent.design
Last active January 31, 2016 01:11
FunCommunityComponent.design
<design:component>
<design:attribute name="topic" label="Topic Name" description="Please add Topic Name" />
</design:component>
@msrivastav13
msrivastav13 / FuncommunityController.apex
Created January 31, 2016 01:10
FuncommunityController
public class FuncommunityController {
@AuraEnabled
public static String fetchTopicName(String topicname){
system.debug(topicname);
return topicname;
}
}
<div class="slds">
<div aria-hidden="true" role="dialog" class="slds-modal slds-modal--large slds-fade-in-hide" aura:id="modaldialog">
</div>
<!--Other markups-->
<div class="slds-backdrop slds-backdrop--hide" aura:id="backdrop">
</div>
({
showOppmodal: function(component, event, helper) {
//Toggle CSS styles for opening Modal
helper.toggleClass(component,'backdrop','slds-backdrop--');
helper.toggleClass(component,'modaldialog','slds-fade-in-');
helper.getopportunitylst(component,event);
},
hideModal : function(component, event, helper) {
//Toggle CSS styles for hiding Modal