Skip to content

Commit

Permalink
Dependencies, fix proxying in Visualforce
Browse files Browse the repository at this point in the history
  • Loading branch information
Pat Patterson committed Mar 9, 2015
1 parent 2349e0a commit c3edd29
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions bulk.page
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ Sample Visualforce page for Force.com Bulk API JavaScript Toolkit
<script src="{!$Resource.forcetk}"></script>
<script src="{!$Resource.jxon}"></script>
<script src="{!$Resource.bulkTK}"></script>
<!-- From https://github.com/vkiryukhin/vkBeautify -->
<script src="{!$Resource.vkbeautify}"></script>
<script>
var client = new forcetk.Client();
Expand Down
10 changes: 6 additions & 4 deletions bulktk.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
/*
* BulkTK: JavaScript library to wrap Force.com Bulk API. Extends ForceTK.
* Dependencies:
* jquery - http://jquery.com/
* ForceTK - https://github.com/developerforce/Force.com-JavaScript-REST-Toolkit
* jxon - https://github.com/wireload/Ratatosk/blob/master/jxon.js
* jquery - http://jquery.com/
* ForceTK - https://github.com/developerforce/Force.com-JavaScript-REST-Toolkit/blob/master/forcetk.js
* jxon - https://github.com/developerforce/Force.com-JavaScript-REST-Toolkit/blob/master/jxon.js
* (originally from the [Ratatosk](https://github.com/wireload/Ratatosk)
* project; this version preserves case in element and attribute names)
*/

forcetk.Client.prototype.xmlHeader = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
Expand Down Expand Up @@ -85,7 +87,7 @@ forcetk.Client.prototype.bulkAjax = function(path, parseXML, callback, error, me
},
dataType: "text",
beforeSend: function(xhr) {
if (that.proxyUrl !== null && ! that.visualforce) {
if (that.proxyUrl !== null) {
xhr.setRequestHeader('SalesforceProxy-Endpoint', url);
}
xhr.setRequestHeader('X-SFDC-Session', that.sessionId);
Expand Down

0 comments on commit c3edd29

Please sign in to comment.