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
<!-- TestWsCallout.page --> | |
<apex:page controller="TestWsCallout" tabstyle="Account"> | |
<apex:form > | |
<apex:actionFunction action="{!InsertRecord}" name="InsertRecord_JS" Rerender="statuses" status="Status1" oncomplete="CallWebService_JS();"/> | |
<apex:actionFunction action="{!CallWebService}" name="CallWebService_JS" status="Status2" reRender="statuses, msg"/> | |
<apex:outputPanel id="statuses"> | |
<apex:actionStatus id="Status1" startText="...Inserting Record Into DB..." /> | |
<apex:actionStatus id="Status2" startText="...Calling Web Service..." /> | |
</apex:outputPanel> |
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 class DynamicTabsCntl { | |
@AuraEnabled | |
public static List< foolish__TabsOnLightningComponent__mdt > getData () { | |
return [SELECT Id, foolish__ComponentName__c , DeveloperName, MasterLabel, foolish__IsActive__c ,foolish__Params__c | |
FROM foolish__TabsOnLightningComponent__mdt WHERE foolish__IsActive__c = 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
/*Source : | |
https://gomakethings.com/getting-all-query-string-values-from-a-url-with-vanilla-js/ | |
*/ | |
/* @param {String} url The URL | |
* @return {Object} The URL parameters | |
*/ | |
var getParams = function (url) { | |
var params = {}; | |
var parser = document.createElement('a'); |
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> | |
<!--- Your component --> | |
</aura:component> |
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
let express = require ('express'); | |
let express_graphql = require('express-graphql'); | |
let {buildSchema} = require ('graphql'); | |
//GraphQL schema | |
var schema = buildSchema (` | |
type Query { | |
message : String | |
} |
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
let express = require ('express'); | |
let express_graphql = require('express-graphql'); | |
let {buildSchema} = require ('graphql'); | |
//GraphQL schema | |
var schema = buildSchema (` | |
type Query { | |
course(id: Int!): Course | |
courses(topic: String): [Course] |
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
$.getScript( "https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" ) | |
.done(function( script, textStatus ) { | |
console.log( textStatus ); | |
}) | |
.fail(function( jqxhr, settings, exception ) { | |
$( "div.log" ).text( "Triggered ajaxError handler." ); | |
}); |
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
var lastHeight = 0, curHeight = 0, iframe = $('.recaptchaFrame'); | |
iframe = iframe[0]; | |
setInterval(function(){ | |
// for lwciframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px'; | |
curHeight = $frame.contents().find('body').height(); | |
if ( curHeight != lastHeight ) { | |
$frame.css('height', (lastHeight = curHeight) + 'px' ); | |
} | |
},500); |
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
var path = $A.get("$Resource.sampleScript"); | |
var req = new XMLHttpRequest(); | |
req.open("GET", path); | |
req.addEventListener("load", $A.getCallback(function() { | |
$A.createComponent ('aura:unescapedHTML', {value: req.response}, | |
function(newComp, status, errorMessage ) { | |
if (status === 'SUCCESS') { | |
component.set ('v.scriptDataComp',newComp ); | |
} | |
}); |
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 showHeader="false" applyBodyTag="false"> | |
<apex:includeScript value="{!$Resource.jQuery_3_1_1}"/> | |
<script src='{!$Setup.foolish__reCaptcha__c.foolish__libraryUrl__c}?onload=onloadCallback&render=explicit' type="application/javascript"/> | |
<style> | |
body, div{ | |
background:transparent !important; | |
} | |
html {overflow:hidden;} | |
.recaptcha { | |
transform: scale(0.74); |