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 standardStylesheets="false" showHeader="false" applyHtmlTag="false" docType="html-5.0"> | |
<html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Hello React</title> | |
<apex:stylesheet value="{!URLFOR($Resource.SLDS090, 'assets/styles/salesforce-lightning-design-system-vf.css')}" /> | |
</head> |
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 = { | |
MINIFIED_OUT: 'build.min.js', | |
OUT: 'build.js', | |
DEST: 'dist', | |
DEST_BUILD: 'dist/build', | |
DEST_SRC: 'dist/src', | |
ENTRY_POINT: 'ReactJS/js/App.js', | |
RESOURCE_DESTINATION: 'src/staticresources', | |
RESOURCE_NAME: 'App.resource' | |
}; |
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
gulp.task ('zip',function(){ | |
gulp.src ('dist/build/*') | |
.pipe(zip(path.RESOURCE_NAME)) | |
.pipe(gulp.dest (path.RESOURCE_DESTINATION)); | |
}); |
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
gulp.task('build', function(){ | |
browserify({ | |
entries: [path.ENTRY_POINT], | |
transform: [reactify] | |
}) | |
.bundle() | |
.pipe(source(path.MINIFIED_OUT)) | |
//.pipe(streamify(uglify(path.MINIFIED_OUT))) | |
//Open the above line for final PRODUCTION deployment | |
.pipe(gulp.dest(path.DEST_BUILD)); |
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
git clone https://github.com/msrivastav13/SalesforceReact.git |
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 standardStylesheets="false" showHeader="false" applyHtmlTag="false" docType="html-5.0"> | |
<html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Hello React</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/react.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/JSXTransformer.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> | |
<apex:includeScript value="{!$Resource.makeDeferredProvider}"/> |
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
/** | |
* Extends the DataSource.Provider base class to create a | |
* custom adapter for Lightning Connect. The class informs | |
* Salesforce of the functional and authentication | |
* capabilities that are supported by or required to connect | |
* to an external system. | |
**/ | |
global class CurrencyDataSourceProvider extends DataSource.Provider { | |
/** |
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
/** | |
* Extends the DataSource.Connection class to enable | |
* Salesforce to sync the external system’s metadata schema | |
* and to handle queries and searches of the external data. | |
**/ | |
global class CurrencyDataSourceConnection extends DataSource.Connection { | |
private DataSource.ConnectionParams connectionInfo; | |
/** |
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:attribute name="messages" type="Aura.Component[]" access="GLOBAL"/> | |
<div aura:id="messages"> | |
{!v.messages} | |
</div> | |
//Script for Error handling | |
else if (state === "ERROR") { | |
var errors = response.getError(); |
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
hidenewBtn:function(component,event) { | |
var toggleBtn= component.find("Newbtn"); | |
$A.util.removeClass(toggleBtn,'btn btn-primary btn-lg btn-block'); | |
$A.util.addClass(toggleBtn,'toggle'); | |
} | |
//CSS file | |
/*toggleCss.css*/ | |
.THIS .toggle { |