diff options
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/files.js | 17 |
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) { |