Skip to content
This repository was archived by the owner on Jan 10, 2024. It is now read-only.

Commit 7b2c9b3

Browse files
author
Pat Patterson
committed
Merge pull request #26 from cwarden/managed-package-support
Support RemoteTK within a namespace
2 parents 35397b1 + c2bd05f commit 7b2c9b3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

RemoteTK.component

+8-8
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if (remotetk.Client === undefined) {
7272
* @param [error=null] function to which jqXHR will be passed in case of error
7373
*/
7474
remotetk.Client.prototype.describe = function(objtype, callback, error) {
75-
RemoteTKController.describe(objtype, function(result){
75+
Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.RemoteTKController.describe}', objtype, function(result){
7676
handleResult(result, callback, error);
7777
}, {
7878
escape: false
@@ -89,7 +89,7 @@ if (remotetk.Client === undefined) {
8989
* @param [error=null] function to which jqXHR will be passed in case of error
9090
*/
9191
remotetk.Client.prototype.create = function(objtype, fields, callback, error) {
92-
RemoteTKController.create(objtype, JSON.stringify(fields), function(result){
92+
Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.RemoteTKController.create}', objtype, JSON.stringify(fields), function(result){
9393
handleResult(result, callback, error);
9494
}, {
9595
escape: false
@@ -106,7 +106,7 @@ if (remotetk.Client === undefined) {
106106
* @param [error=null] function to which jqXHR will be passed in case of error
107107
*/
108108
remotetk.Client.prototype.retrieve = function(objtype, id, fieldlist, callback, error) {
109-
RemoteTKController.retrieve(objtype, id, fieldlist, function(result){
109+
Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.RemoteTKController.retrieve}', objtype, id, fieldlist, function(result){
110110
handleResult(result, callback, error);
111111
}, {
112112
escape: false
@@ -127,7 +127,7 @@ if (remotetk.Client === undefined) {
127127
*/
128128
/*
129129
remotetk.Client.prototype.upsert = function(objtype, externalIdField, externalId, fields, callback, error) {
130-
RemoteTKController.upser(objtype, externalIdField, externalId, JSON.stringify(fields), function(result){
130+
Visualforce.remoting.Manager.invokeAction('$RemoteAction.RemoteTKController.upser', objtype, externalIdField, externalId, JSON.stringify(fields), function(result){
131131
handleResult(result, callback, error, true);
132132
}, {
133133
escape: false
@@ -146,7 +146,7 @@ if (remotetk.Client === undefined) {
146146
* @param [error=null] function to which jqXHR will be passed in case of error
147147
*/
148148
remotetk.Client.prototype.update = function(objtype, id, fields, callback, error) {
149-
RemoteTKController.updat(objtype, id, JSON.stringify(fields), function(result){
149+
Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.RemoteTKController.updat}', objtype, id, JSON.stringify(fields), function(result){
150150
handleResult(result, callback, error, true);
151151
}, {
152152
escape: false
@@ -162,7 +162,7 @@ if (remotetk.Client === undefined) {
162162
* @param [error=null] function to which jqXHR will be passed in case of error
163163
*/
164164
remotetk.Client.prototype.del = function(objtype, id, callback, error) {
165-
RemoteTKController.del(objtype, id, function(result){
165+
Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.RemoteTKController.del}', objtype, id, function(result){
166166
handleResult(result, callback, error, true);
167167
}, {
168168
escape: false
@@ -177,7 +177,7 @@ if (remotetk.Client === undefined) {
177177
* @param [error=null] function to which jqXHR will be passed in case of error
178178
*/
179179
remotetk.Client.prototype.query = function(soql, callback, error) {
180-
RemoteTKController.query(soql, function(result){
180+
Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.RemoteTKController.query}', soql, function(result){
181181
handleResult(result, callback, error);
182182
}, {
183183
escape: false
@@ -192,7 +192,7 @@ if (remotetk.Client === undefined) {
192192
* @param [error=null] function to which jqXHR will be passed in case of error
193193
*/
194194
remotetk.Client.prototype.search = function(sosl, callback, error) {
195-
RemoteTKController.search(sosl, function(result){
195+
Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.RemoteTKController.search}', sosl, function(result){
196196
handleResult(result, callback, error);
197197
}, {
198198
escape: false

0 commit comments

Comments
 (0)