diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2013-01-25 16:11:07 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2013-01-25 16:11:07 +0100 |
commit | 047f1988c3d3831e46504e0083372602a3f5446b (patch) | |
tree | 282af0690052a911d2c93e9f47ccf4493d2b0f23 /core/js | |
parent | ff4d62132af1950c77a6fb56bc16e3cc9d3a83a0 (diff) | |
parent | 688fe0baa89f0150f3c8123c64d7cff5caa0511b (diff) | |
download | nextcloud-server-047f1988c3d3831e46504e0083372602a3f5446b.tar.gz nextcloud-server-047f1988c3d3831e46504e0083372602a3f5446b.zip |
Merge branch 'master' into no-inline-js
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/js.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js index 6241036b1b8..6e0a405114b 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -101,6 +101,27 @@ var OC={ return OC.filePath(app,'',file); }, /** + * Creates an url for remote use + * @param string $service id + * @return string the url + * + * Returns a url to the given service. + */ + linkToRemoteBase:function(service) { + return OC.webroot + '/remote.php/' + service; + }, + /** + * @brief Creates an absolute url for remote use + * @param string $service id + * @param bool $add_slash + * @return string the url + * + * Returns a absolute url to the given service. + */ + linkToRemote:function(service) { + return window.location.protocol + '//' + window.location.host + OC.linkToRemoteBase(service); + }, + /** * get the absolute url for a file in an app * @param app the id of the app * @param type the type of the file to link to (e.g. css,img,ajax.template) |