aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/files.js
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-10-08 13:50:59 +0200
committerRobin Appelman <icewind@owncloud.com>2012-10-08 13:53:53 +0200
commite7899e17dea21d5b5e8d2e3ccd1640ab7684d685 (patch)
tree469a431482bffe6e4c17b9724d5a75cd1331b5f0 /apps/files/js/files.js
parentb9b9fd9dbaae47b3a15aed9694c18b95404550b0 (diff)
parent2de94f9c8574d8662bf0993999ca2f7bbff1f115 (diff)
downloadnextcloud-server-e7899e17dea21d5b5e8d2e3ccd1640ab7684d685.tar.gz
nextcloud-server-e7899e17dea21d5b5e8d2e3ccd1640ab7684d685.zip
merge phpunit into filesystem
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r--apps/files/js/files.js17
1 files changed, 13 insertions, 4 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 0c00fe8c922..b36e46813dc 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -178,7 +178,12 @@ $(document).ready(function() {
var dir=$('#dir').val()||'/';
$('#notification').text(t('files','generating ZIP-file, it may take some time.'));
$('#notification').fadeIn();
- window.location=OC.filePath('files', 'ajax', 'download.php') + '?'+ $.param({ dir: dir, files: files });
+ // use special download URL if provided, e.g. for public shared files
+ if ( (downloadURL = document.getElementById("downloadURL")) ) {
+ window.location=downloadURL.value+"&download&files="+files;
+ } else {
+ window.location=OC.filePath('files', 'ajax', 'download.php') + '?'+ $.param({ dir: dir, files: files });
+ }
return false;
});
@@ -194,7 +199,8 @@ $(document).ready(function() {
$(document).bind('drop dragover', function (e) {
e.preventDefault(); // prevent browser from doing anything, if file isn't dropped in dropZone
});
-
+
+ if ( document.getElementById("data-upload-form") ) {
$(function() {
$('.file_upload_start').fileupload({
dropZone: $('#content'), // restrict dropZone to content div
@@ -408,7 +414,7 @@ $(document).ready(function() {
}
})
});
-
+ }
$.assocArraySize = function(obj) {
// http://stackoverflow.com/a/6700/11236
var size = 0, key;
@@ -592,7 +598,10 @@ $(document).ready(function() {
var lastWidth = 0;
var breadcrumbs = [];
- var breadcrumbsWidth = $('#navigation').get(0).offsetWidth;
+ var breadcrumbsWidth = 0;
+ if ( document.getElementById("navigation") ) {
+ breadcrumbsWidth = $('#navigation').get(0).offsetWidth;
+ }
var hiddenBreadcrumbs = 0;
$.each($('.crumb'), function(index, breadcrumb) {