summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-01-24 13:32:31 +0100
committerVincent Petry <pvince81@owncloud.com>2014-01-24 13:38:39 +0100
commitc6695bbd764be9f43067c09894e36422c2b92b49 (patch)
tree0d1ad131a1c7f0ff4dd0aa8df09e0f47f4ea93d8 /core
parent0671c58e361f2ccf2cd23d73a9712c1a31e838ce (diff)
downloadnextcloud-server-c6695bbd764be9f43067c09894e36422c2b92b49.tar.gz
nextcloud-server-c6695bbd764be9f43067c09894e36422c2b92b49.zip
Fixed download URL in public page
- Refactored download URL building to make it overridable - Added download URL override in public page - Added JS unit tests for download URL - Added OC.redirect() method to facilitate unit testing
Diffstat (limited to 'core')
-rw-r--r--core/js/js.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/js/js.js b/core/js/js.js
index 976027dd06b..1c7d89ea055 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -253,6 +253,12 @@ var OC={
return link;
},
/**
+ * Redirect to the target URL, can also be used for downloads.
+ */
+ redirect: function(targetUrl) {
+ window.location = targetUrl;
+ },
+ /**
* get the absolute path to an image file
* @param app the app id to which the image belongs
* @param file the name of the image file