aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/files.js
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-10-05 22:13:41 +0200
committerRobin Appelman <icewind@owncloud.com>2012-10-05 22:13:41 +0200
commita53999e94ebefc7c87830df5bc52c6b975ad45b4 (patch)
treecfc71e7d08702d57be6d056251c11c16a7498665 /apps/files/js/files.js
parent30c2c2c5cd4fb35f99f189d5721cda71a86e8b2b (diff)
parent4f7c7c615e6eb0e3818b28a24d8cf77cd7546e19 (diff)
downloadnextcloud-server-a53999e94ebefc7c87830df5bc52c6b975ad45b4.tar.gz
nextcloud-server-a53999e94ebefc7c87830df5bc52c6b975ad45b4.zip
Merge branch 'master' into phpunit
Diffstat (limited to 'apps/files/js/files.js')
-rw-r--r--apps/files/js/files.js17
1 files changed, 14 insertions, 3 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 0c00fe8c922..e4037454520 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;
});
@@ -195,6 +200,8 @@ $(document).ready(function() {
e.preventDefault(); // prevent browser from doing anything, if file isn't dropped in dropZone
});
+ if ( document.getElementById("file_upload_start") ) {
+
$(function() {
$('.file_upload_start').fileupload({
dropZone: $('#content'), // restrict dropZone to content div
@@ -408,7 +415,8 @@ $(document).ready(function() {
}
})
});
-
+ }
+
$.assocArraySize = function(obj) {
// http://stackoverflow.com/a/6700/11236
var size = 0, key;
@@ -592,7 +600,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) {