var sbt = {}; sbt.Properties = { "libraryUrl": "", "serviceUrl": "<?php echo plugins_url(PLUGIN_NAME); ?> /core/index.php?classpath=services&class=Proxy&method=fileOperations&_redirectUrl=", "sbtUrl": "<?php echo $agnostic_deploy_url; ?> /js/sdk" }; sbt.Endpoints = { <?php foreach ($endpoints as $endpoint) { echo generateEndpoint($endpoint, $agnostic_deploy_url) . "\n"; } ?> }; sbt.findEndpoint = function (endpointName) { // console.log(arguments.callee.caller.toString()); console.log(endpointName); console.log(this.Endpoints[endpointName]); console.log("===="); return this.Endpoints[endpointName]; }; return sbt; }); }; </script>
echo plugins_url(); ?> /index.php?classpath=services&class=Proxy&&uid=<?php global $USER; echo $USER->id; ?> &method=fileOperations&_redirectUrl=", "sbtUrl": "<?php echo $agnostic_deploy_url; ?> /js/sdk" }; sbt.Endpoints = { <?php foreach ($endpoints as $endpoint) { echo generateEndpoint($endpoint->auth_type, $endpoint->server_url, $agnostic_deploy_url, $endpoint->name, $endpoint->api_version); } ?> }; sbt.findEndpoint = function (endpointName) { return this.Endpoints[endpointName]; }; return sbt; }); }; </script> <?php /** * Generates the JavaScript endpoint. */