diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-07-07 11:29:46 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-07-07 11:29:46 +0200 |
commit | ba16fd0d337fa26114f55086198979d147a298c1 (patch) | |
tree | 39111cec77d17d5eeb60bd1b609e7a8419310459 /apps/files | |
parent | 5ace43f43895cba4b398367e10731f92450d7da2 (diff) | |
parent | ed28885d73181e61c06802639910014e8a265e42 (diff) | |
download | nextcloud-server-ba16fd0d337fa26114f55086198979d147a298c1.tar.gz nextcloud-server-ba16fd0d337fa26114f55086198979d147a298c1.zip |
Merge branch 'master' into sync-master
Diffstat (limited to 'apps/files')
29 files changed, 628 insertions, 255 deletions
diff --git a/apps/files/admin.php b/apps/files/admin.php index 60f041a400b..48a6100838f 100644 --- a/apps/files/admin.php +++ b/apps/files/admin.php @@ -27,8 +27,6 @@ * */ -OCP\User::checkAdminUser(); - $htaccessWorking=(getenv('htaccessWorking')=='true'); $upload_max_filesize = OC::$server->getIniWrapper()->getBytes('upload_max_filesize'); $post_max_size = OC::$server->getIniWrapper()->getBytes('post_max_size'); diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index 9cc9c279700..d243b6ad97e 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -43,6 +43,7 @@ OCP\JSON::setContentTypeHeader('text/plain'); // If no token is sent along, rely on login only $errorCode = null; +$errorFileName = null; $l = \OC::$server->getL10N('files'); if (empty($_POST['dirToken'])) { @@ -161,6 +162,15 @@ if (\OC\Files\Filesystem::isValidPath($dir) === true) { $resolution = null; } + if(isset($_POST['dirToken'])) { + // If it is a read only share the resolution will always be autorename + $shareManager = \OC::$server->getShareManager(); + $share = $shareManager->getShareByToken((string)$_POST['dirToken']); + if (!($share->getPermissions() & \OCP\Constants::PERMISSION_READ)) { + $resolution = 'autorename'; + } + } + // target directory for when uploading folders $relativePath = ''; if(!empty($_POST['file_directory'])) { @@ -216,6 +226,7 @@ if (\OC\Files\Filesystem::isValidPath($dir) === true) { } else { $error = $l->t('Upload failed. Could not find uploaded file'); + $errorFileName = $files['name'][$i]; } } catch(Exception $ex) { $error = $ex->getMessage(); @@ -247,7 +258,25 @@ if (\OC\Files\Filesystem::isValidPath($dir) === true) { } if ($error === false) { + // Do not leak file information if it is a read-only share + if(isset($_POST['dirToken'])) { + $shareManager = \OC::$server->getShareManager(); + $share = $shareManager->getShareByToken((string)$_POST['dirToken']); + if (!($share->getPermissions() & \OCP\Constants::PERMISSION_READ)) { + $newResults = []; + foreach($result as $singleResult) { + $fileName = $singleResult['originalname']; + $newResults['filename'] = $fileName; + $newResults['mimetype'] = \OC::$server->getMimeTypeDetector()->detectPath($fileName); + } + $result = $newResults; + } + } OCP\JSON::encodedPrint($result); } else { - OCP\JSON::error(array(array('data' => array_merge(array('message' => $error, 'code' => $errorCode), $storageStats)))); + OCP\JSON::error(array(array('data' => array_merge(array( + 'message' => $error, + 'code' => $errorCode, + 'filename' => $errorFileName + ), $storageStats)))); } diff --git a/apps/files/css/detailsView.css b/apps/files/css/detailsView.css index 669a15c4e38..2ec16993ef5 100644 --- a/apps/files/css/detailsView.css +++ b/apps/files/css/detailsView.css @@ -32,17 +32,17 @@ float: left; } -#app-sidebar .thumbnailContainer.image { +#app-sidebar .thumbnailContainer.large { margin-left: -15px; margin-right: -35px; /* 15 + 20 for the close button */ margin-top: -15px; } -#app-sidebar .thumbnailContainer.image.portrait { +#app-sidebar .thumbnailContainer.large.portrait { margin: 0; /* if we don't fit the image anyway we give it back the margin */ } -#app-sidebar .image .thumbnail { +#app-sidebar .large .thumbnail { width:100%; display:block; background-repeat: no-repeat; @@ -53,20 +53,28 @@ height: auto; } -#app-sidebar .image .thumbnail .stretcher { +#app-sidebar .large .thumbnail .stretcher { content: ''; display: block; padding-bottom: 56.25%; /* sets height of .thumbnail to 9/16 of the width */ } -#app-sidebar .image.portrait .thumbnail { +#app-sidebar .large.portrait .thumbnail { background-position: 50% top; } -#app-sidebar .image.portrait .thumbnail { +#app-sidebar .large.portrait .thumbnail { background-size: contain; } +#app-sidebar .large.text { + overflow-y: scroll; + overflow-x: hidden; + padding-top: 15px; + font-size: 80%; + margin-left: 0; +} + #app-sidebar .thumbnail { width: 75px; height: 75px; diff --git a/apps/files/css/files.css b/apps/files/css/files.css index 94eafe27520..ebb44f3070c 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -68,9 +68,23 @@ } .app-files #app-content { + transition: background-color 0.3s ease; overflow-x: hidden; } +.file-drag, .file-drag #filestable tbody tr, .file-drag #filestable tbody tr:hover { + transition: background-color 0.3s ease!important; + background-color: rgb(179, 230, 255)!important; +} + +.app-files #app-content.dir-drop, .file-drag #filestable tbody tr, .file-drag #filestable tbody tr:hover{ + background-color: rgba(0, 0, 0, 0)!important; +} + +.app-files #app-content.dir-drop #filestable tbody tr.dropping-to-dir{ + background-color: rgb(179, 230, 255)!important; +} + /* icons for sidebar */ .nav-icon-files { background-image: url('../img/folder.svg'); @@ -113,6 +127,7 @@ } #filestable tbody tr { + transition: background-color 0.3s ease; background-color: #fff; height: 40px; } @@ -125,6 +140,7 @@ #filestable tbody tr.selected, #filestable tbody tr.searchresult, table tr.mouseOver td { + transition: background-color 0.3s ease; background-color: #f8f8f8; } tbody a { color:#000; } @@ -585,19 +601,19 @@ html.ie8 .column-mtime .selectedActions { #fileList a.action.action-menu { padding-top: 17px; padding-bottom: 17px; - padding-left:14px; - padding-right:0px; + padding-left: 14px; + padding-right: 14px; } #fileList .filesize { - padding-top:0px; - padding-bottom:0px; - padding-left:60px; - padding-right:15px; + padding-top: 0; + padding-bottom: 0; + padding-left: 60px; + padding-right: 15px; } #fileList .popovermenu { - margin-right: -5px; + margin-right: 6px; } .ie8 #fileList .popovermenu { margin-top: -10px; diff --git a/apps/files/css/mobile.css b/apps/files/css/mobile.css index bb20c8c3f77..10a9a57332e 100644 --- a/apps/files/css/mobile.css +++ b/apps/files/css/mobile.css @@ -1,5 +1,9 @@ @media only screen and (max-width: 768px) { +.app-files #app-content.dir-drop{ + background-color: rgba(255, 255, 255, 1)!important; +} + /* don’t require a minimum width for files table */ #body-user #filestable { min-width: initial !important; diff --git a/apps/files/download.php b/apps/files/download.php index 38ac2a074c3..da01f98ed62 100644 --- a/apps/files/download.php +++ b/apps/files/download.php @@ -26,9 +26,6 @@ * */ -// Check if we are a user -OCP\User::checkLoggedIn(); - $filename = $_GET["file"]; if(!\OC\Files\Filesystem::file_exists($filename)) { diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 3257ded7b89..d5470d0be55 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -273,7 +273,7 @@ OC.Upload = { var self = this; if ( $('#file_upload_start').exists() ) { var file_upload_param = { - dropZone: $('#content'), // restrict dropZone to content div + dropZone: $('#app-content'), // restrict dropZone to app-content div pasteZone: null, autoUpload: false, sequentialUploads: true, @@ -494,7 +494,7 @@ OC.Upload = { * @param {object} e * @param {object} data */ - done:function(e, data) { + done: function(e, data) { OC.Upload.log('done', e, data); // handle different responses (json or body from iframe for ie) var response; @@ -667,7 +667,30 @@ OC.Upload = { OC.Upload._hideProgressBar(); } }); + fileupload.on('fileuploaddragover', function(e){ + $('#app-content').addClass('file-drag'); + $('#emptycontent .icon-folder').addClass('icon-filetype-folder-drag-accept'); + var filerow = $(e.delegatedEvent.target).closest('tr'); + + if(!filerow.hasClass('dropping-to-dir')){ + $('.dropping-to-dir .icon-filetype-folder-drag-accept').removeClass('icon-filetype-folder-drag-accept'); + $('.dropping-to-dir').removeClass('dropping-to-dir'); + $('.dir-drop').removeClass('dir-drop'); + } + + if(filerow.attr('data-type') === 'dir'){ + $('#app-content').addClass('dir-drop'); + filerow.addClass('dropping-to-dir'); + filerow.find('.thumbnail').addClass('icon-filetype-folder-drag-accept'); + } + }); + fileupload.on('fileuploaddragleave fileuploaddrop', function (){ + $('#app-content').removeClass('file-drag'); + $('.dropping-to-dir').removeClass('dropping-to-dir'); + $('.dir-drop').removeClass('dir-drop'); + $('.icon-filetype-folder-drag-accept').removeClass('icon-filetype-folder-drag-accept'); + }); } else { // for all browsers that don't support the progress bar // IE 8 & 9 diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 4f4c833a5f3..cb0df9eaf20 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1569,7 +1569,7 @@ return false; } - if (status === 404) { + if (status === 404 || status === 405) { // go back home this.changeDirectory('/'); return false; @@ -2548,12 +2548,13 @@ var self = this; // handle upload events - var fileUploadStart = this.$el.find('#file_upload_start'); + var fileUploadStart = this.$el; + var delegatedElement = '#file_upload_start'; // detect the progress bar resize fileUploadStart.on('resized', this._onResize); - fileUploadStart.on('fileuploaddrop', function(e, data) { + fileUploadStart.on('fileuploaddrop', delegatedElement, function(e, data) { OC.Upload.log('filelist handle fileuploaddrop', e, data); if (self.$el.hasClass('hidden')) { @@ -2561,7 +2562,8 @@ return false; } - var dropTarget = $(e.originalEvent.target); + var dropTarget = $(e.delegatedEvent.target); + // check if dropped inside this container and not another one if (dropTarget.length && !self.$el.is(dropTarget) // dropped on list directly diff --git a/apps/files/js/jquery.fileupload.js b/apps/files/js/jquery.fileupload.js index d7f19b17550..622161ede97 100644 --- a/apps/files/js/jquery.fileupload.js +++ b/apps/files/js/jquery.fileupload.js @@ -1,5 +1,5 @@ /* - * jQuery File Upload Plugin 5.32.2 + * jQuery File Upload Plugin 9.12.5 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2010, Sebastian Tschan @@ -9,10 +9,10 @@ * http://www.opensource.org/licenses/MIT */ -/*jslint nomen: true, unparam: true, regexp: true */ -/*global define, window, document, location, File, Blob, FormData */ +/* jshint nomen:false */ +/* global define, require, window, document, location, Blob, FormData */ -(function (factory) { +;(function (factory) { 'use strict'; if (typeof define === 'function' && define.amd) { // Register as an anonymous AMD module: @@ -20,6 +20,12 @@ 'jquery', 'jquery.ui.widget' ], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS: + factory( + require('jquery'), + require('./vendor/jquery.ui.widget') + ); } else { // Browser globals: factory(window.jQuery); @@ -40,15 +46,36 @@ $('<input type="file">').prop('disabled')); // The FileReader API is not actually used, but works as feature detection, - // as e.g. Safari supports XHR file uploads via the FormData API, - // but not non-multipart XHR file uploads: - $.support.xhrFileUpload = !!(window.XMLHttpRequestUpload && window.FileReader); + // as some Safari versions (5?) support XHR file uploads via the FormData API, + // but not non-multipart XHR file uploads. + // window.XMLHttpRequestUpload is not available on IE10, so we check for + // window.ProgressEvent instead to detect XHR2 file upload capability: + $.support.xhrFileUpload = !!(window.ProgressEvent && window.FileReader); $.support.xhrFormDataFileUpload = !!window.FormData; // Detect support for Blob slicing (required for chunked uploads): $.support.blobSlice = window.Blob && (Blob.prototype.slice || Blob.prototype.webkitSlice || Blob.prototype.mozSlice); + // Helper function to create drag handlers for dragover/dragenter/dragleave: + function getDragHandler(type) { + var isDragOver = type === 'dragover'; + return function (e) { + e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer; + var dataTransfer = e.dataTransfer; + if (dataTransfer && $.inArray('Files', dataTransfer.types) !== -1 && + this._trigger( + type, + $.Event(type, {delegatedEvent: e}) + ) !== false) { + e.preventDefault(); + if (isDragOver) { + dataTransfer.dropEffect = 'copy'; + } + } + }; + } + // The fileupload widget listens for change events on file input fields defined // via fileInput setting and paste or drop events of the given dropZone. // In addition to the default jQuery Widget methods, the fileupload widget @@ -63,9 +90,9 @@ // The drop target element(s), by the default the complete document. // Set to null to disable drag & drop support: dropZone: $(document), - // The paste target element(s), by the default the complete document. - // Set to null to disable paste support: - pasteZone: $(document), + // The paste target element(s), by the default undefined. + // Set to a DOM node or jQuery object to enable file pasting: + pasteZone: undefined, // The file input field(s), that are listened to for change events. // If undefined, it is set to the file input fields inside // of the widget element on plugin initialization. @@ -88,6 +115,14 @@ // To limit the number of files uploaded with one XHR request, // set the following option to an integer greater than 0: limitMultiFileUploads: undefined, + // The following option limits the number of files uploaded with one + // XHR request to keep the request size under or equal to the defined + // limit in bytes: + limitMultiFileUploadSize: undefined, + // Multipart file uploads add a number of bytes to each uploaded file, + // therefore the following option adds an overhead for each file used + // in the limitMultiFileUploadSize configuration: + limitMultiFileUploadSizeOverhead: 512, // Set the following option to true to issue all file upload requests // in a sequential order: sequentialUploads: false, @@ -174,6 +209,9 @@ // handlers using jQuery's Deferred callbacks: // data.submit().done(func).fail(func).always(func); add: function (e, data) { + if (e.isDefaultPrevented()) { + return false; + } if (data.autoUpload || (data.autoUpload !== false && $(this).fileupload('option', 'autoUpload'))) { data.process().done(function () { @@ -239,7 +277,8 @@ // The following are jQuery ajax settings required for the file uploads: processData: false, contentType: false, - cache: false + cache: false, + timeout: 0 }, // A list of options that require reinitializing event listeners and/or @@ -280,7 +319,7 @@ _getFormData: function (options) { var formData; - if (typeof options.formData === 'function') { + if ($.type(options.formData) === 'function') { return options.formData(options.form); } if ($.isArray(options.formData)) { @@ -360,10 +399,18 @@ // Trigger a custom progress event with a total data property set // to the file size(s) of the current upload and a loaded data // property calculated accordingly: - this._trigger('progress', e, data); + this._trigger( + 'progress', + $.Event('progress', {delegatedEvent: e}), + data + ); // Trigger a global progress event for all current file uploads, // including ajax calls queued for sequential file uploads: - this._trigger('progressall', e, this._progress); + this._trigger( + 'progressall', + $.Event('progressall', {delegatedEvent: e}), + this._progress + ); } }, @@ -398,8 +445,9 @@ file = options.files[0], // Ignore non-multipart setting if not supported: multipart = options.multipart || !$.support.xhrFileUpload, - paramName = options.paramName[0]; - options.headers = options.headers || {}; + paramName = $.type(options.paramName) === 'array' ? + options.paramName[0] : options.paramName; + options.headers = $.extend({}, options.headers); if (options.contentRange) { options.headers['Content-Range'] = options.contentRange; } @@ -408,7 +456,7 @@ encodeURI(file.name) + '"'; } if (!multipart) { - options.contentType = file.type; + options.contentType = file.type || 'application/octet-stream'; options.data = options.blob || file; } else if ($.support.xhrFormDataFileUpload) { if (options.postMessage) { @@ -425,7 +473,8 @@ } else { $.each(options.files, function (index, file) { formData.push({ - name: options.paramName[index] || paramName, + name: ($.type(options.paramName) === 'array' && + options.paramName[index]) || paramName, value: file }); }); @@ -448,9 +497,10 @@ if (that._isInstanceOf('File', file) || that._isInstanceOf('Blob', file)) { formData.append( - options.paramName[index] || paramName, + ($.type(options.paramName) === 'array' && + options.paramName[index]) || paramName, file, - file.name + file.uploadName || file.name ); } }); @@ -534,8 +584,10 @@ options.url = options.form.prop('action') || location.href; } // The HTTP request method must be "POST" or "PUT": - options.type = (options.type || options.form.prop('method') || '') - .toUpperCase(); + options.type = (options.type || + ($.type(options.form.prop('method')) === 'string' && + options.form.prop('method')) || '' + ).toUpperCase(); if (options.type !== 'POST' && options.type !== 'PUT' && options.type !== 'PATCH') { options.type = 'POST'; @@ -594,22 +646,32 @@ // Adds convenience methods to the data callback argument: _addConvenienceMethods: function (e, data) { var that = this, - getPromise = function (data) { - return $.Deferred().resolveWith(that, [data]).promise(); + getPromise = function (args) { + return $.Deferred().resolveWith(that, args).promise(); }; data.process = function (resolveFunc, rejectFunc) { if (resolveFunc || rejectFunc) { data._processQueue = this._processQueue = - (this._processQueue || getPromise(this)) - .pipe(resolveFunc, rejectFunc); + (this._processQueue || getPromise([this])).then( + function () { + if (data.errorThrown) { + return $.Deferred() + .rejectWith(that, [data]).promise(); + } + return getPromise(arguments); + } + ).then(resolveFunc, rejectFunc); } - return this._processQueue || getPromise(this); + return this._processQueue || getPromise([this]); }; data.submit = function () { if (this.state() !== 'pending') { data.jqXHR = this.jqXHR = - (that._trigger('submit', e, this) !== false) && - that._onSend(e, this); + (that._trigger( + 'submit', + $.Event('submit', {delegatedEvent: e}), + this + ) !== false) && that._onSend(e, this); } return this.jqXHR || that._getXHRPromise(); }; @@ -617,7 +679,9 @@ if (this.jqXHR) { return this.jqXHR.abort(); } - return that._getXHRPromise(); + this.errorThrown = 'abort'; + that._trigger('fail', null, this); + return that._getXHRPromise(false); }; data.state = function () { if (this.jqXHR) { @@ -627,6 +691,10 @@ return that._getDeferredState(this._processQueue); } }; + data.processing = function () { + return !this.jqXHR && this._processQueue && that + ._getDeferredState(this._processQueue) === 'pending'; + }; data.progress = function () { return this._progress; }; @@ -829,7 +897,11 @@ // Set timer for bitrate progress calculation: options._bitrateTimer = new that._BitrateTimer(); jqXHR = jqXHR || ( - ((aborted || that._trigger('send', e, options) === false) && + ((aborted || that._trigger( + 'send', + $.Event('send', {delegatedEvent: e}), + options + ) === false) && that._getXHRPromise(false, options.context, aborted)) || that._chunkedUpload(options) || $.ajax(options) ).done(function (result, textStatus, jqXHR) { @@ -873,9 +945,9 @@ if (this.options.limitConcurrentUploads > 1) { slot = $.Deferred(); this._slots.push(slot); - pipe = slot.pipe(send); + pipe = slot.then(send); } else { - this._sequence = this._sequence.pipe(send, send); + this._sequence = this._sequence.then(send, send); pipe = this._sequence; } // Return the piped Promise object, enhanced with an abort method, @@ -900,50 +972,93 @@ var that = this, result = true, options = $.extend({}, this.options, data), + files = data.files, + filesLength = files.length, limit = options.limitMultiFileUploads, + limitSize = options.limitMultiFileUploadSize, + overhead = options.limitMultiFileUploadSizeOverhead, + batchSize = 0, paramName = this._getParamName(options), paramNameSet, paramNameSlice, fileSet, - i; - if (!(options.singleFileUploads || limit) || + i, + j = 0; + if (!filesLength) { + return false; + } + if (limitSize && files[0].size === undefined) { + limitSize = undefined; + } + if (!(options.singleFileUploads || limit || limitSize) || !this._isXHRUpload(options)) { - fileSet = [data.files]; + fileSet = [files]; paramNameSet = [paramName]; - } else if (!options.singleFileUploads && limit) { + } else if (!(options.singleFileUploads || limitSize) && limit) { fileSet = []; paramNameSet = []; - for (i = 0; i < data.files.length; i += limit) { - fileSet.push(data.files.slice(i, i + limit)); + for (i = 0; i < filesLength; i += limit) { + fileSet.push(files.slice(i, i + limit)); paramNameSlice = paramName.slice(i, i + limit); if (!paramNameSlice.length) { paramNameSlice = paramName; } paramNameSet.push(paramNameSlice); } + } else if (!options.singleFileUploads && limitSize) { + fileSet = []; + paramNameSet = []; + for (i = 0; i < filesLength; i = i + 1) { + batchSize += files[i].size + overhead; + if (i + 1 === filesLength || + ((batchSize + files[i + 1].size + overhead) > limitSize) || + (limit && i + 1 - j >= limit)) { + fileSet.push(files.slice(j, i + 1)); + paramNameSlice = paramName.slice(j, i + 1); + if (!paramNameSlice.length) { + paramNameSlice = paramName; + } + paramNameSet.push(paramNameSlice); + j = i + 1; + batchSize = 0; + } + } } else { paramNameSet = paramName; } - data.originalFiles = data.files; - $.each(fileSet || data.files, function (index, element) { + data.originalFiles = files; + $.each(fileSet || files, function (index, element) { var newData = $.extend({}, data); newData.files = fileSet ? element : [element]; newData.paramName = paramNameSet[index]; that._initResponseObject(newData); that._initProgressObject(newData); that._addConvenienceMethods(e, newData); - result = that._trigger('add', e, newData); + result = that._trigger( + 'add', + $.Event('add', {delegatedEvent: e}), + newData + ); return result; }); return result; }, - _replaceFileInput: function (input) { - var inputClone = input.clone(true); + _replaceFileInput: function (data) { + var input = data.fileInput, + inputClone = input.clone(true), + restoreFocus = input.is(document.activeElement); + // Add a reference for the new cloned file input to the data argument: + data.fileInputClone = inputClone; $('<form></form>').append(inputClone)[0].reset(); // Detaching allows to insert the fileInput on another form - // without losing the file input value: + // without loosing the file input value: input.after(inputClone).detach(); + // If the fileInput had focus before it was detached, + // restore focus to the inputClone. + if (restoreFocus) { + inputClone.focus(); + } // Avoid memory leaks with the detached file input: $.cleanData(input.unbind('remove')); // Replace the original file input element in the fileInput @@ -975,7 +1090,25 @@ // to be returned together in one set: dfd.resolve([e]); }, - dirReader; + successHandler = function (entries) { + that._handleFileTreeEntries( + entries, + path + entry.name + '/' + ).done(function (files) { + dfd.resolve(files); + }).fail(errorHandler); + }, + readEntries = function () { + dirReader.readEntries(function (results) { + if (!results.length) { + successHandler(entries); + } else { + entries = entries.concat(results); + readEntries(); + } + }, errorHandler); + }, + dirReader, entries = []; path = path || ''; if (entry.isFile) { if (entry._file) { @@ -990,14 +1123,7 @@ } } else if (entry.isDirectory) { dirReader = entry.createReader(); - dirReader.readEntries(function (entries) { - that._handleFileTreeEntries( - entries, - path + entry.name + '/' - ).done(function (files) { - dfd.resolve(files); - }).fail(errorHandler); - }, errorHandler); + readEntries(); } else { // Return an empy list for file system items // other than files or directories: @@ -1013,7 +1139,7 @@ $.map(entries, function (entry) { return that._handleFileTreeEntry(entry, path); }) - ).pipe(function () { + ).then(function () { return Array.prototype.concat.apply( [], arguments @@ -1082,7 +1208,7 @@ return $.when.apply( $, $.map(fileInput, this._getSingleFileInputFiles) - ).pipe(function () { + ).then(function () { return Array.prototype.concat.apply( [], arguments @@ -1099,9 +1225,13 @@ this._getFileInputFiles(data.fileInput).always(function (files) { data.files = files; if (that.options.replaceFileInput) { - that._replaceFileInput(data.fileInput); + that._replaceFileInput(data); } - if (that._trigger('change', e, data) !== false) { + if (that._trigger( + 'change', + $.Event('change', {delegatedEvent: e}), + data + ) !== false) { that._onAdd(e, data); } }); @@ -1118,9 +1248,12 @@ data.files.push(file); } }); - if (this._trigger('paste', e, data) === false || - this._onAdd(e, data) === false) { - return false; + if (this._trigger( + 'paste', + $.Event('paste', {delegatedEvent: e}), + data + ) !== false) { + this._onAdd(e, data); } } }, @@ -1134,32 +1267,32 @@ e.preventDefault(); this._getDroppedFiles(dataTransfer).always(function (files) { data.files = files; - if (that._trigger('drop', e, data) !== false) { + if (that._trigger( + 'drop', + $.Event('drop', {delegatedEvent: e}), + data + ) !== false) { that._onAdd(e, data); } }); } }, - _onDragOver: function (e) { - e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer; - var dataTransfer = e.dataTransfer; - if (dataTransfer) { - if (this._trigger('dragover', e) === false) { - return false; - } - if ($.inArray('Files', dataTransfer.types) !== -1) { - dataTransfer.dropEffect = 'copy'; - e.preventDefault(); - } - } - }, + _onDragOver: getDragHandler('dragover'), + + _onDragEnter: getDragHandler('dragenter'), + + _onDragLeave: getDragHandler('dragleave'), _initEventHandlers: function () { if (this._isXHRUpload(this.options)) { this._on(this.options.dropZone, { dragover: this._onDragOver, - drop: this._onDrop + drop: this._onDrop, + // event.preventDefault() on dragenter is required for IE10+: + dragenter: this._onDragEnter, + // dragleave is not required, but added for completeness: + dragleave: this._onDragLeave }); this._on(this.options.pasteZone, { paste: this._onPaste @@ -1173,7 +1306,7 @@ }, _destroyEventHandlers: function () { - this._off(this.options.dropZone, 'dragover drop'); + this._off(this.options.dropZone, 'dragenter dragleave dragover drop'); this._off(this.options.pasteZone, 'paste'); this._off(this.options.fileInput, 'change'); }, @@ -1220,15 +1353,25 @@ _initDataAttributes: function () { var that = this, - options = this.options; + options = this.options, + data = this.element.data(); // Initialize options set via HTML5 data-attributes: $.each( - $(this.element[0].cloneNode(false)).data(), - function (key, value) { - if (that._isRegExpOption(key, value)) { - value = that._getRegExp(value); + this.element[0].attributes, + function (index, attr) { + var key = attr.name.toLowerCase(), + value; + if (/^data-/.test(key)) { + // Convert hyphen-ated key to camelCase: + key = key.slice(5).replace(/-[a-z]/g, function (str) { + return str.charAt(1).toUpperCase(); + }); + value = data[key]; + if (that._isRegExpOption(key, value)) { + value = that._getRegExp(value); + } + options[key] = value; } - options[key] = value; } ); }, @@ -1308,7 +1451,8 @@ return; } data.files = files; - jqXHR = that._onSend(null, data).then( + jqXHR = that._onSend(null, data); + jqXHR.then( function (result, textStatus, jqXHR) { dfd.resolve(result, textStatus, jqXHR); }, diff --git a/apps/files/js/mainfileinfodetailview.js b/apps/files/js/mainfileinfodetailview.js index c586135b9c7..30b2b531df7 100644 --- a/apps/files/js/mainfileinfodetailview.js +++ b/apps/files/js/mainfileinfodetailview.js @@ -57,6 +57,11 @@ */ _fileActions: null, + /** + * @type {OCA.Files.SidebarPreviewManager} + */ + _previewManager: null, + events: { 'click a.action-favorite': '_onClickFavorite', 'click a.action-default': '_onClickDefaultAction', @@ -81,6 +86,7 @@ if (!this._fileActions) { throw 'Missing required parameter "fileActions"'; } + this._previewManager = new OCA.Files.SidebarPreviewManager(this._fileList); }, _onClickPermalink: function() { @@ -158,7 +164,7 @@ var $container = this.$el.find('.thumbnailContainer'); if (!this.model.isDirectory()) { $iconDiv.addClass('icon-loading icon-32'); - this.loadPreview(this.model.getFullPath(), this.model.get('mimetype'), this.model.get('etag'), $iconDiv, $container, this.model.isImage()); + this._previewManager.loadPreview(this.model, $iconDiv, $container); } else { var iconUrl = this.model.get('icon') || OC.MimeType.getIconUrl('dir'); $iconDiv.css('background-image', 'url("' + iconUrl + '")'); @@ -169,86 +175,6 @@ this.$el.empty(); } this.delegateEvents(); - }, - - loadPreview: function(path, mime, etag, $iconDiv, $container, isImage) { - var maxImageWidth = $container.parent().width() + 50; // 50px for negative margins - var maxImageHeight = maxImageWidth / (16/9); - var smallPreviewSize = 75; - - var isLandscape = function(img) { - return img.width > (img.height * 1.2); - }; - - var isSmall = function(img) { - return (img.width * 1.1) < (maxImageWidth * window.devicePixelRatio); - }; - - var getTargetHeight = function(img) { - if(isImage) { - var targetHeight = img.height / window.devicePixelRatio; - if (targetHeight <= smallPreviewSize) { - targetHeight = smallPreviewSize; - } - return targetHeight; - }else{ - return smallPreviewSize; - } - }; - - var getTargetRatio = function(img){ - var ratio = img.width / img.height; - if (ratio > 16/9) { - return ratio; - } else { - return 16/9; - } - }; - - this._fileList.lazyLoadPreview({ - path: path, - mime: mime, - etag: etag, - y: isImage ? maxImageHeight : smallPreviewSize, - x: isImage ? maxImageWidth : smallPreviewSize, - a: isImage ? 1 : null, - mode: isImage ? 'cover' : null, - callback: function (previewUrl, img) { - $iconDiv.previewImg = previewUrl; - - // as long as we only have the mimetype icon, we only save it in case there is no preview - if (!img) { - return; - } - $iconDiv.removeClass('icon-loading icon-32'); - var targetHeight = getTargetHeight(img); - if (this.model.isImage() && targetHeight > smallPreviewSize) { - $container.addClass((isLandscape(img) && !isSmall(img))? 'landscape': 'portrait'); - $container.addClass('image'); - } - - // only set background when we have an actual preview - // when we don't have a preview we show the mime icon in the error handler - $iconDiv.css({ - 'background-image': 'url("' + previewUrl + '")', - height: (targetHeight > smallPreviewSize)? 'auto': targetHeight, - 'max-height': isSmall(img)? targetHeight: null - }); - - var targetRatio = getTargetRatio(img); - $iconDiv.find('.stretcher').css({ - 'padding-bottom': (100 / targetRatio) + '%' - }); - }.bind(this), - error: function () { - $iconDiv.removeClass('icon-loading icon-32'); - this.$el.find('.thumbnailContainer').removeClass('image'); //fall back to regular view - $iconDiv.css({ - 'background-image': 'url("' + $iconDiv.previewImg + '")' - }); - OC.Util.scaleFixForIE8($iconDiv); - }.bind(this) - }); } }); diff --git a/apps/files/js/sidebarpreviewmanager.js b/apps/files/js/sidebarpreviewmanager.js new file mode 100644 index 00000000000..cfd1fffae13 --- /dev/null +++ b/apps/files/js/sidebarpreviewmanager.js @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2016 + * + * This file is licensed under the Affero General Public License version 3 + * or later. + * + * See the COPYING-README file. + * + */ + +(function () { + SidebarPreviewManager = function (fileList) { + this._fileList = fileList; + this._previewHandlers = {}; + OC.Plugins.attach('OCA.Files.SidebarPreviewManager', this); + }; + + SidebarPreviewManager.prototype = { + addPreviewHandler: function (mime, handler) { + this._previewHandlers[mime] = handler; + }, + + getPreviewHandler: function (mime) { + var mimePart = mime.split('/').shift(); + if (this._previewHandlers[mime]) { + return this._previewHandlers[mime]; + } else if(this._previewHandlers[mimePart]) { + return this._previewHandlers[mimePart]; + } else { + return this.fallbackPreview.bind(this); + } + }, + + loadPreview: function (model, $thumbnailDiv, $thumbnailContainer) { + var handler = this.getPreviewHandler(model.get('mimetype')); + var fallback = this.fallbackPreview.bind(this, model, $thumbnailDiv, $thumbnailContainer); + handler(model, $thumbnailDiv, $thumbnailContainer, fallback); + }, + + // previews for images and mimetype icons + fallbackPreview: function (model, $thumbnailDiv, $thumbnailContainer) { + var isImage = model.isImage(); + var maxImageWidth = $thumbnailContainer.parent().width() + 50; // 50px for negative margins + var maxImageHeight = maxImageWidth / (16 / 9); + var smallPreviewSize = 75; + + var isLandscape = function (img) { + return img.width > (img.height * 1.2); + }; + + var isSmall = function (img) { + return (img.width * 1.1) < (maxImageWidth * window.devicePixelRatio); + }; + + var getTargetHeight = function (img) { + if (isImage) { + var targetHeight = img.height / window.devicePixelRatio; + if (targetHeight <= smallPreviewSize) { + targetHeight = smallPreviewSize; + } + return targetHeight; + } else { + return smallPreviewSize; + } + }; + + var getTargetRatio = function (img) { + var ratio = img.width / img.height; + if (ratio > 16 / 9) { + return ratio; + } else { + return 16 / 9; + } + }; + + this._fileList.lazyLoadPreview({ + path: model.getFullPath(), + mime: model.get('mimetype'), + etag: model.get('etag'), + y: isImage ? maxImageHeight : smallPreviewSize, + x: isImage ? maxImageWidth : smallPreviewSize, + a: isImage ? 1 : null, + mode: isImage ? 'cover' : null, + callback: function (previewUrl, img) { + $thumbnailDiv.previewImg = previewUrl; + + // as long as we only have the mimetype icon, we only save it in case there is no preview + if (!img) { + return; + } + $thumbnailDiv.removeClass('icon-loading icon-32'); + var targetHeight = getTargetHeight(img); + if (isImage && targetHeight > smallPreviewSize) { + $thumbnailContainer.addClass((isLandscape(img) && !isSmall(img)) ? 'landscape' : 'portrait'); + $thumbnailContainer.addClass('large'); + } + + // only set background when we have an actual preview + // when we don't have a preview we show the mime icon in the error handler + $thumbnailDiv.css({ + 'background-image': 'url("' + previewUrl + '")', + height: (targetHeight > smallPreviewSize) ? 'auto' : targetHeight, + 'max-height': isSmall(img) ? targetHeight : null + }); + + var targetRatio = getTargetRatio(img); + $thumbnailDiv.find('.stretcher').css({ + 'padding-bottom': (100 / targetRatio) + '%' + }); + }, + error: function () { + $thumbnailDiv.removeClass('icon-loading icon-32'); + $thumbnailContainer.removeClass('image'); //fall back to regular view + $thumbnailDiv.css({ + 'background-image': 'url("' + $thumbnailDiv.previewImg + '")' + }); + } + }); + } + }; + + OCA.Files.SidebarPreviewManager = SidebarPreviewManager; +})(); diff --git a/apps/files/js/sidebarpreviewtext.js b/apps/files/js/sidebarpreviewtext.js new file mode 100644 index 00000000000..5af17bd5551 --- /dev/null +++ b/apps/files/js/sidebarpreviewtext.js @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2016 + * + * This file is licensed under the Affero General Public License version 3 + * or later. + * + * See the COPYING-README file. + * + */ + +(function () { + var SidebarPreview = function () { + }; + + SidebarPreview.prototype = { + attach: function (manager) { + manager.addPreviewHandler('text', this.handlePreview.bind(this)); + }, + + handlePreview: function (model, $thumbnailDiv, $thumbnailContainer, fallback) { + console.log(model); + var previewWidth = $thumbnailContainer.parent().width() + 50; // 50px for negative margins + var previewHeight = previewWidth / (16 / 9); + + this.getFileContent(model.getFullPath()).then(function (content) { + $thumbnailDiv.removeClass('icon-loading icon-32'); + $thumbnailContainer.addClass('large'); + $thumbnailContainer.addClass('text'); + var $textPreview = $('<pre/>').text(content); + $thumbnailDiv.children('.stretcher').remove(); + $thumbnailDiv.append($textPreview); + $thumbnailContainer.css("max-height", previewHeight); + }, function () { + fallback(); + }); + }, + + getFileContent: function (path) { + console.log(path); + var url = OC.linkToRemoteBase('files' + path); + console.log(url); + return $.get(url); + } + }; + + OC.Plugins.register('OCA.Files.SidebarPreviewManager', new SidebarPreview()); +})(); diff --git a/apps/files/l10n/da.js b/apps/files/l10n/da.js index e585ccacc1c..0829fbc53ee 100644 --- a/apps/files/l10n/da.js +++ b/apps/files/l10n/da.js @@ -21,6 +21,7 @@ OC.L10N.register( "Invalid directory." : "Ugyldig mappe.", "Files" : "Filer", "All files" : "Alle filer", + "File could not be found" : "Filen kunne ikke findes", "Home" : "Hjemme", "Close" : "Luk", "Favorites" : "Foretrukne", @@ -50,6 +51,13 @@ OC.L10N.register( "Could not move \"{file}\", target exists" : "Kunne ikke flytte \"{file}\" - der findes allerede en fil med dette navn", "Could not move \"{file}\"" : "Kunne ikke flytte \"{file}\"", "{newName} already exists" : "{newName} eksistere allerede", + "Could not rename \"{fileName}\", it does not exist any more" : "Kunne ikke omdøbe \"{fileName}\", den findes ikke længere", + "The name \"{targetName}\" is already used in the folder \"{dir}\". Please choose a different name." : "Navnet \"{targetName}\" bruges allerede i mappen \"{dir}\". Vælg et andet navn.", + "Could not rename \"{fileName}\"" : "Kunne ikke omdøbe \"{fileName}\"", + "Could not create file \"{file}\"" : "Kunne ikke oprette filen \"{file}\"", + "Could not create file \"{file}\" because it already exists" : "Kunne ikke oprette filen \"{file}\", da den allerede findes", + "Could not create folder \"{dir}\"" : "Kunne ikke oprette mappen \"{dir}\"", + "Could not create folder \"{dir}\" because it already exists" : "Kunne ikke oprette mappen \"{dir}\", da den allerede findes", "Error deleting file \"{fileName}\"." : "Fejl under sletning af filen \"{fileName}\"", "No entries in this folder match '{filter}'" : "Der er ingen poster i denne mappe, der matcher '{filter}'", "Name" : "Navn", @@ -100,10 +108,12 @@ OC.L10N.register( "Maximum upload size" : "Maksimal upload-størrelse", "max. possible: " : "max. mulige: ", "Save" : "Gem", + "With PHP-FPM it might take 5 minutes for changes to be applied." : "Med PHP-FPM kan det tage 5 minuter for ændringerne at blive udført.", "Missing permissions to edit from here." : "Rettighed mangler til at redigere på dette sted", "Settings" : "Indstillinger", "Show hidden files" : "Vis skjulte filer", "WebDAV" : "WebDAV", + "Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">access your Files via WebDAV</a>" : "Brug denne adresse til at <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">tilgå dine filer via WebDAV</a>", "No files in here" : "Her er ingen filer", "Upload some content or sync with your devices!" : "Overfør indhold eller synkronisér med dine enheder!", "No entries found in this folder" : "Der blev ikke fundet poster i denne mappe", diff --git a/apps/files/l10n/da.json b/apps/files/l10n/da.json index 499533d77ba..51d74687c41 100644 --- a/apps/files/l10n/da.json +++ b/apps/files/l10n/da.json @@ -19,6 +19,7 @@ "Invalid directory." : "Ugyldig mappe.", "Files" : "Filer", "All files" : "Alle filer", + "File could not be found" : "Filen kunne ikke findes", "Home" : "Hjemme", "Close" : "Luk", "Favorites" : "Foretrukne", @@ -48,6 +49,13 @@ "Could not move \"{file}\", target exists" : "Kunne ikke flytte \"{file}\" - der findes allerede en fil med dette navn", "Could not move \"{file}\"" : "Kunne ikke flytte \"{file}\"", "{newName} already exists" : "{newName} eksistere allerede", + "Could not rename \"{fileName}\", it does not exist any more" : "Kunne ikke omdøbe \"{fileName}\", den findes ikke længere", + "The name \"{targetName}\" is already used in the folder \"{dir}\". Please choose a different name." : "Navnet \"{targetName}\" bruges allerede i mappen \"{dir}\". Vælg et andet navn.", + "Could not rename \"{fileName}\"" : "Kunne ikke omdøbe \"{fileName}\"", + "Could not create file \"{file}\"" : "Kunne ikke oprette filen \"{file}\"", + "Could not create file \"{file}\" because it already exists" : "Kunne ikke oprette filen \"{file}\", da den allerede findes", + "Could not create folder \"{dir}\"" : "Kunne ikke oprette mappen \"{dir}\"", + "Could not create folder \"{dir}\" because it already exists" : "Kunne ikke oprette mappen \"{dir}\", da den allerede findes", "Error deleting file \"{fileName}\"." : "Fejl under sletning af filen \"{fileName}\"", "No entries in this folder match '{filter}'" : "Der er ingen poster i denne mappe, der matcher '{filter}'", "Name" : "Navn", @@ -98,10 +106,12 @@ "Maximum upload size" : "Maksimal upload-størrelse", "max. possible: " : "max. mulige: ", "Save" : "Gem", + "With PHP-FPM it might take 5 minutes for changes to be applied." : "Med PHP-FPM kan det tage 5 minuter for ændringerne at blive udført.", "Missing permissions to edit from here." : "Rettighed mangler til at redigere på dette sted", "Settings" : "Indstillinger", "Show hidden files" : "Vis skjulte filer", "WebDAV" : "WebDAV", + "Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">access your Files via WebDAV</a>" : "Brug denne adresse til at <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">tilgå dine filer via WebDAV</a>", "No files in here" : "Her er ingen filer", "Upload some content or sync with your devices!" : "Overfør indhold eller synkronisér med dine enheder!", "No entries found in this folder" : "Der blev ikke fundet poster i denne mappe", diff --git a/apps/files/l10n/de.js b/apps/files/l10n/de.js index 0866279a435..620be95a15d 100644 --- a/apps/files/l10n/de.js +++ b/apps/files/l10n/de.js @@ -14,7 +14,7 @@ OC.L10N.register( "No file was uploaded" : "Es wurde keine Datei hochgeladen", "Missing a temporary folder" : "Kein temporärer Ordner vorhanden", "Failed to write to disk" : "Fehler beim Schreiben auf die Festplatte", - "Not enough storage available" : "Nicht genug Speicher vorhanden.", + "Not enough storage available" : "Nicht genügend Speicherplatz vorhanden.", "The target folder has been moved or deleted." : "Der Zielordner wurde verschoben oder gelöscht.", "Upload failed. Could not find uploaded file" : "Hochladen fehlgeschlagen. Hochgeladene Datei konnte nicht gefunden werden.", "Upload failed. Could not get file info." : "Hochladen fehlgeschlagen. Dateiinformationen konnten nicht abgerufen werden.", @@ -28,7 +28,7 @@ OC.L10N.register( "Upload cancelled." : "Upload abgebrochen.", "Unable to upload {filename} as it is a directory or has 0 bytes" : "Die Datei {filename} kann nicht hochgeladen werden, da sie entweder ein Verzeichnis oder 0 Bytes groß ist", "Total file size {size1} exceeds upload limit {size2}" : "Die Gesamt-Größe {size1} überschreitet die Upload-Begrenzung {size2}", - "Not enough free space, you are uploading {size1} but only {size2} is left" : "Nicht genügend freier Speicherplatz, du möchtest {size1} hochladen, es sind jedoch nur noch {size2} verfügbar.", + "Not enough free space, you are uploading {size1} but only {size2} is left" : "Nicht genügend freier Speicherplatz, Sie möchten{size1} hochladen, es sind jedoch nur noch {size2} verfügbar.", "Error uploading file \"{fileName}\": {message}" : "Fehler beim Hochladen von \"{fileName}\": {message}", "Could not get result from server." : "Ergebnis konnte nicht vom Server abgerufen werden.", "Uploading..." : "Hochladen…", @@ -54,18 +54,18 @@ OC.L10N.register( "Pending" : "Ausstehend", "Unable to determine date" : "Datum konnte nicht ermittelt werden", "This operation is forbidden" : "Diese Operation ist nicht erlaubt", - "This directory is unavailable, please check the logs or contact the administrator" : "Dieses Verzeichnis ist nicht verfügbar, bitte überprüfe die Logdateien oder kontaktiere den Administrator", - "Could not move \"{file}\", target exists" : "Konnte nicht verschieben \"{file}\", Ziel existiert bereits", - "Could not move \"{file}\"" : "Konnte nicht verschieben \"{file}\"", + "This directory is unavailable, please check the logs or contact the administrator" : "Dieses Verzeichnis ist nicht verfügbar, bitte überprüfen Sie die Logdateien oder kontaktieren Sie den Administrator", + "Could not move \"{file}\", target exists" : "\"{file}\" konnte nicht verschoben werden, Ziel existiert bereits", + "Could not move \"{file}\"" : "\"{file}\" konnte nicht verschoben werden", "{newName} already exists" : "{newName} existiert bereits", - "Could not rename \"{fileName}\", it does not exist any more" : "Konnte nicht umbennen \"{fileName}\", da es nicht mehr existiert", - "The name \"{targetName}\" is already used in the folder \"{dir}\". Please choose a different name." : "Der Name \"{targetName}\" wird bereits bereits in diesem Ordner benutzt \"{dir}\". Bitte nimm einen anderen Namen.", + "Could not rename \"{fileName}\", it does not exist any more" : "\"{fileName}\" konnte nicht umbenannt werden, da sie nicht mehr existiert", + "The name \"{targetName}\" is already used in the folder \"{dir}\". Please choose a different name." : "Der Name \"{targetName}\" wird bereits bereits in diesem Ordner benutzt \"{dir}\". Bitte einen anderen Namen verwenden.", "Could not rename \"{fileName}\"" : "Die Datei konnte nicht umbenannt werden \"{fileName}\"", "Could not create file \"{file}\"" : "Die Datei konnte nicht erstellt werden \"{file}\"", "Could not create file \"{file}\" because it already exists" : "Die Datei konnte nicht erstellt werden \"{file}\", da sie bereits existiert.", "Could not create folder \"{dir}\"" : "Der Ordner konnte nicht erstellt werden \"{dir}\"", "Could not create folder \"{dir}\" because it already exists" : "Der Ordner konnte nicht erstellt werden \"{dir}\", da dieser bereits existiert", - "Error deleting file \"{fileName}\"." : "Fehler beim löschen der Datei \"{fileName}\"", + "Error deleting file \"{fileName}\"." : "Fehler beim Löschen der Datei \"{fileName}\"", "No entries in this folder match '{filter}'" : "Keine Einträge in diesem Ordner stimmen mit '{filter}' überein", "Name" : "Name", "Size" : "Größe", @@ -73,7 +73,7 @@ OC.L10N.register( "_%n folder_::_%n folders_" : ["%n Ordner","%n Ordner"], "_%n file_::_%n files_" : ["%n Datei","%n Dateien"], "{dirs} and {files}" : "{dirs} und {files}", - "You don’t have permission to upload or create files here" : "Du hast keine Berechtigung, hier Dateien hochzuladen oder zu erstellen", + "You don’t have permission to upload or create files here" : "Sie haben keine Berechtigung, hier Dateien hochzuladen oder zu erstellen", "_Uploading %n file_::_Uploading %n files_" : ["%n Datei wird hochgeladen","%n Dateien werden hochgeladen"], "New" : "Neu", "\"{name}\" is an invalid file name." : "»{name}« ist kein gültiger Dateiname.", @@ -98,14 +98,14 @@ OC.L10N.register( "Limit notifications about creation and changes to your <strong>favorite files</strong> <em>(Stream only)</em>" : "Benachrichtigungen über Neues und Änderungen auf Deine <strong>favorisierten Dateien</strong> beschränken <em>(nur im Stream)</em>", "A file or folder has been <strong>deleted</strong>" : "Eine Datei oder ein Ordner wurde <strong>gelöscht</strong>", "A file or folder has been <strong>restored</strong>" : "Eine Datei oder ein Ordner wurde <strong>wiederhergestellt</strong>", - "You created %1$s" : "Du hast %1$s erstellt", + "You created %1$s" : "%1$s wurde erstellt", "%2$s created %1$s" : "%2$s hat %1$s erstellt", "%1$s was created in a public folder" : "%1$s wurde in einem öffentlichen Ordner erstellt", - "You changed %1$s" : "Du hast %1$s geändert", + "You changed %1$s" : "%1$s wurde geändert", "%2$s changed %1$s" : "%2$s hat %1$s geändert", - "You deleted %1$s" : "Du hast %1$s gelöscht", + "You deleted %1$s" : "%1$s wurde gelöscht", "%2$s deleted %1$s" : "%2$s hat %1$s gelöscht", - "You restored %1$s" : "Du hast %1$s wiederhergestellt", + "You restored %1$s" : "%1$s wurde wiederhergestellt", "%2$s restored %1$s" : "%2$s wiederhergestellt %1$s", "Changed by %2$s" : "Geändert von %2$s", "Deleted by %2$s" : "Gelöscht von %2$s", @@ -116,19 +116,19 @@ OC.L10N.register( "max. possible: " : "maximal möglich:", "Save" : "Speichern", "With PHP-FPM it might take 5 minutes for changes to be applied." : "Mit PHP-FPM kann es bis zu 5 Minuten dauern, bis die Einstellungen übernommen werden.", - "Missing permissions to edit from here." : "Fehlende Berechtigungen um von hier aus zu bearbeiten.", + "Missing permissions to edit from here." : "Fehlende Berechtigungen, um dies von hier aus zu bearbeiten.", "Settings" : "Einstellungen", "Show hidden files" : "Versteckte Dateien anzeigen", "WebDAV" : "WebDAV", - "Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">access your Files via WebDAV</a>" : "Benutze diese Adresse, um <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">über WebDAV auf Deine Dateien zuzugreifen</a>", + "Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">access your Files via WebDAV</a>" : "Diese Adresse benutzen, um <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">über WebDAV auf Ihre Dateien zuzugreifen</a>", "No files in here" : "Keine Dateien vorhanden", - "Upload some content or sync with your devices!" : "Lade Inhalte hoch oder synchronisiere mit Deinen Geräten!", + "Upload some content or sync with your devices!" : "Inhalte hochladen oder mit Ihren Geräten synchronisieren!", "No entries found in this folder" : "Keine Einträge in diesem Ordner", "Select all" : "Alle auswählen", "Upload too large" : "Der Upload ist zu groß", "The files you are trying to upload exceed the maximum size for file uploads on this server." : "Die Datei überschreitet die Maximalgröße für Uploads auf diesem Server.", "No favorites" : "Keine Favoriten", - "Files and folders you mark as favorite will show up here" : "Dateien und Ordner, die Du als Favoriten markierst, werden hier erscheinen", + "Files and folders you mark as favorite will show up here" : "Dateien und Ordner, die als Favoriten markiert werden, erscheinen hier", "Text file" : "Textdatei", "New text file.txt" : "Neue Textdatei.txt" }, diff --git a/apps/files/l10n/de.json b/apps/files/l10n/de.json index 0f2939217d9..17e8eb3780a 100644 --- a/apps/files/l10n/de.json +++ b/apps/files/l10n/de.json @@ -12,7 +12,7 @@ "No file was uploaded" : "Es wurde keine Datei hochgeladen", "Missing a temporary folder" : "Kein temporärer Ordner vorhanden", "Failed to write to disk" : "Fehler beim Schreiben auf die Festplatte", - "Not enough storage available" : "Nicht genug Speicher vorhanden.", + "Not enough storage available" : "Nicht genügend Speicherplatz vorhanden.", "The target folder has been moved or deleted." : "Der Zielordner wurde verschoben oder gelöscht.", "Upload failed. Could not find uploaded file" : "Hochladen fehlgeschlagen. Hochgeladene Datei konnte nicht gefunden werden.", "Upload failed. Could not get file info." : "Hochladen fehlgeschlagen. Dateiinformationen konnten nicht abgerufen werden.", @@ -26,7 +26,7 @@ "Upload cancelled." : "Upload abgebrochen.", "Unable to upload {filename} as it is a directory or has 0 bytes" : "Die Datei {filename} kann nicht hochgeladen werden, da sie entweder ein Verzeichnis oder 0 Bytes groß ist", "Total file size {size1} exceeds upload limit {size2}" : "Die Gesamt-Größe {size1} überschreitet die Upload-Begrenzung {size2}", - "Not enough free space, you are uploading {size1} but only {size2} is left" : "Nicht genügend freier Speicherplatz, du möchtest {size1} hochladen, es sind jedoch nur noch {size2} verfügbar.", + "Not enough free space, you are uploading {size1} but only {size2} is left" : "Nicht genügend freier Speicherplatz, Sie möchten{size1} hochladen, es sind jedoch nur noch {size2} verfügbar.", "Error uploading file \"{fileName}\": {message}" : "Fehler beim Hochladen von \"{fileName}\": {message}", "Could not get result from server." : "Ergebnis konnte nicht vom Server abgerufen werden.", "Uploading..." : "Hochladen…", @@ -52,18 +52,18 @@ "Pending" : "Ausstehend", "Unable to determine date" : "Datum konnte nicht ermittelt werden", "This operation is forbidden" : "Diese Operation ist nicht erlaubt", - "This directory is unavailable, please check the logs or contact the administrator" : "Dieses Verzeichnis ist nicht verfügbar, bitte überprüfe die Logdateien oder kontaktiere den Administrator", - "Could not move \"{file}\", target exists" : "Konnte nicht verschieben \"{file}\", Ziel existiert bereits", - "Could not move \"{file}\"" : "Konnte nicht verschieben \"{file}\"", + "This directory is unavailable, please check the logs or contact the administrator" : "Dieses Verzeichnis ist nicht verfügbar, bitte überprüfen Sie die Logdateien oder kontaktieren Sie den Administrator", + "Could not move \"{file}\", target exists" : "\"{file}\" konnte nicht verschoben werden, Ziel existiert bereits", + "Could not move \"{file}\"" : "\"{file}\" konnte nicht verschoben werden", "{newName} already exists" : "{newName} existiert bereits", - "Could not rename \"{fileName}\", it does not exist any more" : "Konnte nicht umbennen \"{fileName}\", da es nicht mehr existiert", - "The name \"{targetName}\" is already used in the folder \"{dir}\". Please choose a different name." : "Der Name \"{targetName}\" wird bereits bereits in diesem Ordner benutzt \"{dir}\". Bitte nimm einen anderen Namen.", + "Could not rename \"{fileName}\", it does not exist any more" : "\"{fileName}\" konnte nicht umbenannt werden, da sie nicht mehr existiert", + "The name \"{targetName}\" is already used in the folder \"{dir}\". Please choose a different name." : "Der Name \"{targetName}\" wird bereits bereits in diesem Ordner benutzt \"{dir}\". Bitte einen anderen Namen verwenden.", "Could not rename \"{fileName}\"" : "Die Datei konnte nicht umbenannt werden \"{fileName}\"", "Could not create file \"{file}\"" : "Die Datei konnte nicht erstellt werden \"{file}\"", "Could not create file \"{file}\" because it already exists" : "Die Datei konnte nicht erstellt werden \"{file}\", da sie bereits existiert.", "Could not create folder \"{dir}\"" : "Der Ordner konnte nicht erstellt werden \"{dir}\"", "Could not create folder \"{dir}\" because it already exists" : "Der Ordner konnte nicht erstellt werden \"{dir}\", da dieser bereits existiert", - "Error deleting file \"{fileName}\"." : "Fehler beim löschen der Datei \"{fileName}\"", + "Error deleting file \"{fileName}\"." : "Fehler beim Löschen der Datei \"{fileName}\"", "No entries in this folder match '{filter}'" : "Keine Einträge in diesem Ordner stimmen mit '{filter}' überein", "Name" : "Name", "Size" : "Größe", @@ -71,7 +71,7 @@ "_%n folder_::_%n folders_" : ["%n Ordner","%n Ordner"], "_%n file_::_%n files_" : ["%n Datei","%n Dateien"], "{dirs} and {files}" : "{dirs} und {files}", - "You don’t have permission to upload or create files here" : "Du hast keine Berechtigung, hier Dateien hochzuladen oder zu erstellen", + "You don’t have permission to upload or create files here" : "Sie haben keine Berechtigung, hier Dateien hochzuladen oder zu erstellen", "_Uploading %n file_::_Uploading %n files_" : ["%n Datei wird hochgeladen","%n Dateien werden hochgeladen"], "New" : "Neu", "\"{name}\" is an invalid file name." : "»{name}« ist kein gültiger Dateiname.", @@ -96,14 +96,14 @@ "Limit notifications about creation and changes to your <strong>favorite files</strong> <em>(Stream only)</em>" : "Benachrichtigungen über Neues und Änderungen auf Deine <strong>favorisierten Dateien</strong> beschränken <em>(nur im Stream)</em>", "A file or folder has been <strong>deleted</strong>" : "Eine Datei oder ein Ordner wurde <strong>gelöscht</strong>", "A file or folder has been <strong>restored</strong>" : "Eine Datei oder ein Ordner wurde <strong>wiederhergestellt</strong>", - "You created %1$s" : "Du hast %1$s erstellt", + "You created %1$s" : "%1$s wurde erstellt", "%2$s created %1$s" : "%2$s hat %1$s erstellt", "%1$s was created in a public folder" : "%1$s wurde in einem öffentlichen Ordner erstellt", - "You changed %1$s" : "Du hast %1$s geändert", + "You changed %1$s" : "%1$s wurde geändert", "%2$s changed %1$s" : "%2$s hat %1$s geändert", - "You deleted %1$s" : "Du hast %1$s gelöscht", + "You deleted %1$s" : "%1$s wurde gelöscht", "%2$s deleted %1$s" : "%2$s hat %1$s gelöscht", - "You restored %1$s" : "Du hast %1$s wiederhergestellt", + "You restored %1$s" : "%1$s wurde wiederhergestellt", "%2$s restored %1$s" : "%2$s wiederhergestellt %1$s", "Changed by %2$s" : "Geändert von %2$s", "Deleted by %2$s" : "Gelöscht von %2$s", @@ -114,19 +114,19 @@ "max. possible: " : "maximal möglich:", "Save" : "Speichern", "With PHP-FPM it might take 5 minutes for changes to be applied." : "Mit PHP-FPM kann es bis zu 5 Minuten dauern, bis die Einstellungen übernommen werden.", - "Missing permissions to edit from here." : "Fehlende Berechtigungen um von hier aus zu bearbeiten.", + "Missing permissions to edit from here." : "Fehlende Berechtigungen, um dies von hier aus zu bearbeiten.", "Settings" : "Einstellungen", "Show hidden files" : "Versteckte Dateien anzeigen", "WebDAV" : "WebDAV", - "Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">access your Files via WebDAV</a>" : "Benutze diese Adresse, um <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">über WebDAV auf Deine Dateien zuzugreifen</a>", + "Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">access your Files via WebDAV</a>" : "Diese Adresse benutzen, um <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">über WebDAV auf Ihre Dateien zuzugreifen</a>", "No files in here" : "Keine Dateien vorhanden", - "Upload some content or sync with your devices!" : "Lade Inhalte hoch oder synchronisiere mit Deinen Geräten!", + "Upload some content or sync with your devices!" : "Inhalte hochladen oder mit Ihren Geräten synchronisieren!", "No entries found in this folder" : "Keine Einträge in diesem Ordner", "Select all" : "Alle auswählen", "Upload too large" : "Der Upload ist zu groß", "The files you are trying to upload exceed the maximum size for file uploads on this server." : "Die Datei überschreitet die Maximalgröße für Uploads auf diesem Server.", "No favorites" : "Keine Favoriten", - "Files and folders you mark as favorite will show up here" : "Dateien und Ordner, die Du als Favoriten markierst, werden hier erscheinen", + "Files and folders you mark as favorite will show up here" : "Dateien und Ordner, die als Favoriten markiert werden, erscheinen hier", "Text file" : "Textdatei", "New text file.txt" : "Neue Textdatei.txt" },"pluralForm" :"nplurals=2; plural=(n != 1);" diff --git a/apps/files/l10n/fr.js b/apps/files/l10n/fr.js index b09bea28607..9ca03c43a01 100644 --- a/apps/files/l10n/fr.js +++ b/apps/files/l10n/fr.js @@ -39,7 +39,7 @@ OC.L10N.register( "{minutes}:{seconds}m" : "{minutes}:{seconds}m", "{seconds} second{plural_s} left" : "{seconds} seconde{plural_s} restante{plural_s}", "{seconds}s" : "{seconds}s", - "Any moment now..." : "D'un instant à l'autre...", + "Any moment now..." : "Dans quelques instants...", "Soon..." : "Bientôt...", "{loadedSize} of {totalSize} ({bitrate})" : "{loadedSize} sur {totalSize} ({bitrate})", "File upload is in progress. Leaving the page now will cancel the upload." : "L'envoi du fichier est en cours. Quitter cette page maintenant annulera l'envoi du fichier.", diff --git a/apps/files/l10n/fr.json b/apps/files/l10n/fr.json index 882c40094df..8090edb3d21 100644 --- a/apps/files/l10n/fr.json +++ b/apps/files/l10n/fr.json @@ -37,7 +37,7 @@ "{minutes}:{seconds}m" : "{minutes}:{seconds}m", "{seconds} second{plural_s} left" : "{seconds} seconde{plural_s} restante{plural_s}", "{seconds}s" : "{seconds}s", - "Any moment now..." : "D'un instant à l'autre...", + "Any moment now..." : "Dans quelques instants...", "Soon..." : "Bientôt...", "{loadedSize} of {totalSize} ({bitrate})" : "{loadedSize} sur {totalSize} ({bitrate})", "File upload is in progress. Leaving the page now will cancel the upload." : "L'envoi du fichier est en cours. Quitter cette page maintenant annulera l'envoi du fichier.", diff --git a/apps/files/l10n/ja.js b/apps/files/l10n/ja.js index 78ae332c49e..70ccebb7883 100644 --- a/apps/files/l10n/ja.js +++ b/apps/files/l10n/ja.js @@ -21,6 +21,7 @@ OC.L10N.register( "Invalid directory." : "無効なディレクトリです。", "Files" : "ファイル", "All files" : "すべてのファイル", + "File could not be found" : "ファイルを見つけられませんでした", "Home" : "ホーム", "Close" : "閉じる", "Favorites" : "お気に入り", diff --git a/apps/files/l10n/ja.json b/apps/files/l10n/ja.json index fb2e0889d41..7be54e85840 100644 --- a/apps/files/l10n/ja.json +++ b/apps/files/l10n/ja.json @@ -19,6 +19,7 @@ "Invalid directory." : "無効なディレクトリです。", "Files" : "ファイル", "All files" : "すべてのファイル", + "File could not be found" : "ファイルを見つけられませんでした", "Home" : "ホーム", "Close" : "閉じる", "Favorites" : "お気に入り", diff --git a/apps/files/l10n/nl.js b/apps/files/l10n/nl.js index 974349d6333..898a34946ab 100644 --- a/apps/files/l10n/nl.js +++ b/apps/files/l10n/nl.js @@ -28,7 +28,7 @@ OC.L10N.register( "Upload cancelled." : "Uploaden geannuleerd.", "Unable to upload {filename} as it is a directory or has 0 bytes" : "Kan {filename} niet uploaden omdat het een map is of 0 bytes groot is", "Total file size {size1} exceeds upload limit {size2}" : "Totale bestandsgrootte {size1} groter dan uploadlimiet {size2}", - "Not enough free space, you are uploading {size1} but only {size2} is left" : "Niet genoeg vrije ruimte. U upload {size1}, maar is is slechts {size2} beschikbaar", + "Not enough free space, you are uploading {size1} but only {size2} is left" : "Niet genoeg vrije ruimte. Je uploadt {size1}, maar er is slechts {size2} beschikbaar", "Error uploading file \"{fileName}\": {message}" : "Fout tijdens het uploaden van bestand \"{fileName}\": {message}", "Could not get result from server." : "Kon het resultaat van de server niet terugkrijgen.", "Uploading..." : "Uploading...", @@ -70,6 +70,7 @@ OC.L10N.register( "Name" : "Naam", "Size" : "Grootte", "Modified" : "Aangepast", + "_%n folder_::_%n folders_" : ["%n map","%n mappen"], "_%n file_::_%n files_" : ["%n bestand","%n bestanden"], "{dirs} and {files}" : "{dirs} en {files}", "You don’t have permission to upload or create files here" : "U hebt geen toestemming om hier te uploaden of bestanden te maken", @@ -78,9 +79,9 @@ OC.L10N.register( "\"{name}\" is an invalid file name." : "\"{name}\" is een ongeldige bestandsnaam.", "File name cannot be empty." : "Bestandsnaam kan niet leeg zijn.", "Storage of {owner} is full, files can not be updated or synced anymore!" : "Opslagruimte van {owner} zit vol, bestanden kunnen niet meer worden ge-upload of gesynchroniseerd!", - "Your storage is full, files can not be updated or synced anymore!" : "Uw opslagruimte zit vol. Bestanden kunnen niet meer worden gewijzigd of gesynchroniseerd!", + "Your storage is full, files can not be updated or synced anymore!" : "Je opslagruimte zit vol. Bestanden kunnen niet meer worden gewijzigd of gesynchroniseerd!", "Storage of {owner} is almost full ({usedSpacePercent}%)" : "Opslagruimte van {owner} zit bijna vol ({usedSpacePercent}%)", - "Your storage is almost full ({usedSpacePercent}%)" : "Uw opslagruimte zit bijna vol ({usedSpacePercent}%)", + "Your storage is almost full ({usedSpacePercent}%)" : "Je opslagruimte zit bijna vol ({usedSpacePercent}%)", "_matches '{filter}'_::_match '{filter}'_" : ["komt overeen met '{filter}'","komen overeen met '{filter}'"], "Path" : "Pad", "_%n byte_::_%n bytes_" : ["%n byte","%n bytes"], @@ -102,7 +103,7 @@ OC.L10N.register( "%1$s was created in a public folder" : "%1$s werd gecreëerd in een openbare map", "You changed %1$s" : "Gewijzigd: %1$s", "%2$s changed %1$s" : "%2$s wijzigde %1$s", - "You deleted %1$s" : "Verwijderd: %1$s", + "You deleted %1$s" : "Je verwijderde: %1$s", "%2$s deleted %1$s" : "%2$s verwijderde %1$s", "You restored %1$s" : "Hersteld: %1$s", "%2$s restored %1$s" : "%2$s herstelde %1$s", @@ -119,15 +120,15 @@ OC.L10N.register( "Settings" : "Instellingen", "Show hidden files" : "Tonen verborgen bestanden", "WebDAV" : "WebDAV", - "Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">access your Files via WebDAV</a>" : "Gebruik deze link <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">om uw bestanden via WebDAV te benaderen</a>", + "Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">access your Files via WebDAV</a>" : "Gebruik deze link <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">om je bestanden via WebDAV te benaderen</a>", "No files in here" : "Hier geen bestanden", - "Upload some content or sync with your devices!" : "Upload bestanden of synchroniseer met uw apparaten!", + "Upload some content or sync with your devices!" : "Upload bestanden of synchroniseer met je apparaten!", "No entries found in this folder" : "Niets", "Select all" : "Alles selecteren", "Upload too large" : "Upload is te groot", - "The files you are trying to upload exceed the maximum size for file uploads on this server." : "De bestanden die u probeert te uploaden zijn groter dan de maximaal toegestane bestandsgrootte voor deze server.", + "The files you are trying to upload exceed the maximum size for file uploads on this server." : "De bestanden die je probeert te uploaden zijn groter dan de maximaal toegestane bestandsgrootte voor deze server.", "No favorites" : "Geen favorieten", - "Files and folders you mark as favorite will show up here" : "Bestanden en mappen die u favoriet vindt, worden hier getoond", + "Files and folders you mark as favorite will show up here" : "Bestanden en mappen die je als favoriet aanmerkt, worden hier getoond", "Text file" : "Tekstbestand", "New text file.txt" : "Nieuw tekstbestand.txt" }, diff --git a/apps/files/l10n/nl.json b/apps/files/l10n/nl.json index 6caa76f49c1..c9ab8330281 100644 --- a/apps/files/l10n/nl.json +++ b/apps/files/l10n/nl.json @@ -26,7 +26,7 @@ "Upload cancelled." : "Uploaden geannuleerd.", "Unable to upload {filename} as it is a directory or has 0 bytes" : "Kan {filename} niet uploaden omdat het een map is of 0 bytes groot is", "Total file size {size1} exceeds upload limit {size2}" : "Totale bestandsgrootte {size1} groter dan uploadlimiet {size2}", - "Not enough free space, you are uploading {size1} but only {size2} is left" : "Niet genoeg vrije ruimte. U upload {size1}, maar is is slechts {size2} beschikbaar", + "Not enough free space, you are uploading {size1} but only {size2} is left" : "Niet genoeg vrije ruimte. Je uploadt {size1}, maar er is slechts {size2} beschikbaar", "Error uploading file \"{fileName}\": {message}" : "Fout tijdens het uploaden van bestand \"{fileName}\": {message}", "Could not get result from server." : "Kon het resultaat van de server niet terugkrijgen.", "Uploading..." : "Uploading...", @@ -68,6 +68,7 @@ "Name" : "Naam", "Size" : "Grootte", "Modified" : "Aangepast", + "_%n folder_::_%n folders_" : ["%n map","%n mappen"], "_%n file_::_%n files_" : ["%n bestand","%n bestanden"], "{dirs} and {files}" : "{dirs} en {files}", "You don’t have permission to upload or create files here" : "U hebt geen toestemming om hier te uploaden of bestanden te maken", @@ -76,9 +77,9 @@ "\"{name}\" is an invalid file name." : "\"{name}\" is een ongeldige bestandsnaam.", "File name cannot be empty." : "Bestandsnaam kan niet leeg zijn.", "Storage of {owner} is full, files can not be updated or synced anymore!" : "Opslagruimte van {owner} zit vol, bestanden kunnen niet meer worden ge-upload of gesynchroniseerd!", - "Your storage is full, files can not be updated or synced anymore!" : "Uw opslagruimte zit vol. Bestanden kunnen niet meer worden gewijzigd of gesynchroniseerd!", + "Your storage is full, files can not be updated or synced anymore!" : "Je opslagruimte zit vol. Bestanden kunnen niet meer worden gewijzigd of gesynchroniseerd!", "Storage of {owner} is almost full ({usedSpacePercent}%)" : "Opslagruimte van {owner} zit bijna vol ({usedSpacePercent}%)", - "Your storage is almost full ({usedSpacePercent}%)" : "Uw opslagruimte zit bijna vol ({usedSpacePercent}%)", + "Your storage is almost full ({usedSpacePercent}%)" : "Je opslagruimte zit bijna vol ({usedSpacePercent}%)", "_matches '{filter}'_::_match '{filter}'_" : ["komt overeen met '{filter}'","komen overeen met '{filter}'"], "Path" : "Pad", "_%n byte_::_%n bytes_" : ["%n byte","%n bytes"], @@ -100,7 +101,7 @@ "%1$s was created in a public folder" : "%1$s werd gecreëerd in een openbare map", "You changed %1$s" : "Gewijzigd: %1$s", "%2$s changed %1$s" : "%2$s wijzigde %1$s", - "You deleted %1$s" : "Verwijderd: %1$s", + "You deleted %1$s" : "Je verwijderde: %1$s", "%2$s deleted %1$s" : "%2$s verwijderde %1$s", "You restored %1$s" : "Hersteld: %1$s", "%2$s restored %1$s" : "%2$s herstelde %1$s", @@ -117,15 +118,15 @@ "Settings" : "Instellingen", "Show hidden files" : "Tonen verborgen bestanden", "WebDAV" : "WebDAV", - "Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">access your Files via WebDAV</a>" : "Gebruik deze link <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">om uw bestanden via WebDAV te benaderen</a>", + "Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">access your Files via WebDAV</a>" : "Gebruik deze link <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">om je bestanden via WebDAV te benaderen</a>", "No files in here" : "Hier geen bestanden", - "Upload some content or sync with your devices!" : "Upload bestanden of synchroniseer met uw apparaten!", + "Upload some content or sync with your devices!" : "Upload bestanden of synchroniseer met je apparaten!", "No entries found in this folder" : "Niets", "Select all" : "Alles selecteren", "Upload too large" : "Upload is te groot", - "The files you are trying to upload exceed the maximum size for file uploads on this server." : "De bestanden die u probeert te uploaden zijn groter dan de maximaal toegestane bestandsgrootte voor deze server.", + "The files you are trying to upload exceed the maximum size for file uploads on this server." : "De bestanden die je probeert te uploaden zijn groter dan de maximaal toegestane bestandsgrootte voor deze server.", "No favorites" : "Geen favorieten", - "Files and folders you mark as favorite will show up here" : "Bestanden en mappen die u favoriet vindt, worden hier getoond", + "Files and folders you mark as favorite will show up here" : "Bestanden en mappen die je als favoriet aanmerkt, worden hier getoond", "Text file" : "Tekstbestand", "New text file.txt" : "Nieuw tekstbestand.txt" },"pluralForm" :"nplurals=2; plural=(n != 1);" diff --git a/apps/files/l10n/sl.js b/apps/files/l10n/sl.js index e9f2247d098..6cd50d3f2ab 100644 --- a/apps/files/l10n/sl.js +++ b/apps/files/l10n/sl.js @@ -21,6 +21,7 @@ OC.L10N.register( "Invalid directory." : "Neveljavna mapa.", "Files" : "Datoteke", "All files" : "Vse datoteke", + "File could not be found" : "Datoteke ne najdem", "Home" : "Domači naslov", "Close" : "Zapri", "Favorites" : "Priljubljene", @@ -32,8 +33,11 @@ OC.L10N.register( "Could not get result from server." : "Ni mogoče pridobiti podatkov s strežnika.", "Uploading..." : "Poteka pošiljanje ...", "..." : "...", + "{hours}:{minutes}:{seconds} hour{plural_s} left" : "še {hours}:{minutes}:{seconds} ur{plural_s}", "{hours}:{minutes}h" : "{hours}:{minutes}h", + "{minutes}:{seconds} minute{plural_s} left" : "še {minutes}:{seconds} minut{plural_s}", "{minutes}:{seconds}m" : "{minutes}:{seconds}min", + "{seconds} second{plural_s} left" : "še {seconds} sekund{plural_s}", "{seconds}s" : "{seconds}s", "Any moment now..." : "Vsak trenutek ...", "Soon..." : "Kmalu", diff --git a/apps/files/l10n/sl.json b/apps/files/l10n/sl.json index 74293263043..21a93041b18 100644 --- a/apps/files/l10n/sl.json +++ b/apps/files/l10n/sl.json @@ -19,6 +19,7 @@ "Invalid directory." : "Neveljavna mapa.", "Files" : "Datoteke", "All files" : "Vse datoteke", + "File could not be found" : "Datoteke ne najdem", "Home" : "Domači naslov", "Close" : "Zapri", "Favorites" : "Priljubljene", @@ -30,8 +31,11 @@ "Could not get result from server." : "Ni mogoče pridobiti podatkov s strežnika.", "Uploading..." : "Poteka pošiljanje ...", "..." : "...", + "{hours}:{minutes}:{seconds} hour{plural_s} left" : "še {hours}:{minutes}:{seconds} ur{plural_s}", "{hours}:{minutes}h" : "{hours}:{minutes}h", + "{minutes}:{seconds} minute{plural_s} left" : "še {minutes}:{seconds} minut{plural_s}", "{minutes}:{seconds}m" : "{minutes}:{seconds}min", + "{seconds} second{plural_s} left" : "še {seconds} sekund{plural_s}", "{seconds}s" : "{seconds}s", "Any moment now..." : "Vsak trenutek ...", "Soon..." : "Kmalu", diff --git a/apps/files/l10n/tr.js b/apps/files/l10n/tr.js index e878fdda386..3ce89c9b5a6 100644 --- a/apps/files/l10n/tr.js +++ b/apps/files/l10n/tr.js @@ -1,7 +1,7 @@ OC.L10N.register( "files", { - "Storage not available" : "Depolama mevcut değil", + "Storage not available" : "Depolama alanı mevcut değil", "Storage invalid" : "Depolama geçersiz", "Unknown error" : "Bilinmeyen hata", "Unable to set upload directory." : "Yükleme dizini ayarlanamadı.", @@ -21,6 +21,7 @@ OC.L10N.register( "Invalid directory." : "Geçersiz dizin.", "Files" : "Dosyalar", "All files" : "Tüm dosyalar", + "File could not be found" : "Dosya bulunamadı", "Home" : "Ev", "Close" : "Kapat", "Favorites" : "Sık kullanılanlar", @@ -32,6 +33,13 @@ OC.L10N.register( "Could not get result from server." : "Sunucudan sonuç alınamadı.", "Uploading..." : "Yükleniyor...", "..." : "...", + "{hours}:{minutes}:{seconds} hour{plural_s} left" : "{hours}:{minutes}:{seconds} saat kaldı", + "{hours}:{minutes}h" : "{hours}:{minutes} saat", + "{minutes}:{seconds} minute{plural_s} left" : "{minutes}:{seconds} dakika kaldı", + "{minutes}:{seconds}m" : "{minutes}:{seconds} dk", + "{seconds} second{plural_s} left" : "{seconds} saniye kaldı", + "{seconds}s" : "{seconds} saniye", + "Soon..." : "Yakında...", "File upload is in progress. Leaving the page now will cancel the upload." : "Dosya yükleme işlemi sürüyor. Şu anda sayfadan ayrılmak yükleme işlemini iptal edecek.", "Actions" : "Eylemler", "Download" : "İndir", @@ -77,6 +85,7 @@ OC.L10N.register( "_%n byte_::_%n bytes_" : ["%n bayt","%n bayt"], "Favorited" : "Sık kullanılanlara eklendi", "Favorite" : "Sık kullanılan", + "Local link" : "Yerel bağlantı", "Folder" : "Klasör", "New folder" : "Yeni klasör", "{newname} already exists" : "{newname} zaten mevcut", @@ -107,6 +116,7 @@ OC.L10N.register( "With PHP-FPM it might take 5 minutes for changes to be applied." : "PHP-FPM ile değişikliklerin uygulanması 5 dakika sürebilir.", "Missing permissions to edit from here." : "Buradan düzenleme için eksik yetki.", "Settings" : "Ayarlar", + "Show hidden files" : "Gizli dosyaları göster", "WebDAV" : "WebDAV", "Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">access your Files via WebDAV</a>" : "Dosyalarınıza WebDAV ile erişmek için <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">bu adresi kullanın</a>", "No files in here" : "Burada hiç dosya yok", diff --git a/apps/files/l10n/tr.json b/apps/files/l10n/tr.json index 38e78fc6e6f..4a005cfa525 100644 --- a/apps/files/l10n/tr.json +++ b/apps/files/l10n/tr.json @@ -1,5 +1,5 @@ { "translations": { - "Storage not available" : "Depolama mevcut değil", + "Storage not available" : "Depolama alanı mevcut değil", "Storage invalid" : "Depolama geçersiz", "Unknown error" : "Bilinmeyen hata", "Unable to set upload directory." : "Yükleme dizini ayarlanamadı.", @@ -19,6 +19,7 @@ "Invalid directory." : "Geçersiz dizin.", "Files" : "Dosyalar", "All files" : "Tüm dosyalar", + "File could not be found" : "Dosya bulunamadı", "Home" : "Ev", "Close" : "Kapat", "Favorites" : "Sık kullanılanlar", @@ -30,6 +31,13 @@ "Could not get result from server." : "Sunucudan sonuç alınamadı.", "Uploading..." : "Yükleniyor...", "..." : "...", + "{hours}:{minutes}:{seconds} hour{plural_s} left" : "{hours}:{minutes}:{seconds} saat kaldı", + "{hours}:{minutes}h" : "{hours}:{minutes} saat", + "{minutes}:{seconds} minute{plural_s} left" : "{minutes}:{seconds} dakika kaldı", + "{minutes}:{seconds}m" : "{minutes}:{seconds} dk", + "{seconds} second{plural_s} left" : "{seconds} saniye kaldı", + "{seconds}s" : "{seconds} saniye", + "Soon..." : "Yakında...", "File upload is in progress. Leaving the page now will cancel the upload." : "Dosya yükleme işlemi sürüyor. Şu anda sayfadan ayrılmak yükleme işlemini iptal edecek.", "Actions" : "Eylemler", "Download" : "İndir", @@ -75,6 +83,7 @@ "_%n byte_::_%n bytes_" : ["%n bayt","%n bayt"], "Favorited" : "Sık kullanılanlara eklendi", "Favorite" : "Sık kullanılan", + "Local link" : "Yerel bağlantı", "Folder" : "Klasör", "New folder" : "Yeni klasör", "{newname} already exists" : "{newname} zaten mevcut", @@ -105,6 +114,7 @@ "With PHP-FPM it might take 5 minutes for changes to be applied." : "PHP-FPM ile değişikliklerin uygulanması 5 dakika sürebilir.", "Missing permissions to edit from here." : "Buradan düzenleme için eksik yetki.", "Settings" : "Ayarlar", + "Show hidden files" : "Gizli dosyaları göster", "WebDAV" : "WebDAV", "Use this address to <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">access your Files via WebDAV</a>" : "Dosyalarınıza WebDAV ile erişmek için <a href=\"%s\" target=\"_blank\" rel=\"noreferrer\">bu adresi kullanın</a>", "No files in here" : "Burada hiç dosya yok", diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index 18b6cf719c5..30d5bb87f13 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -174,6 +174,8 @@ class ViewController extends Controller { \OCP\Util::addScript('files', 'favoritesplugin'); \OCP\Util::addScript('files', 'detailfileinfoview'); + \OCP\Util::addScript('files', 'sidebarpreviewmanager'); + \OCP\Util::addScript('files', 'sidebarpreviewtext'); \OCP\Util::addScript('files', 'detailtabview'); \OCP\Util::addScript('files', 'mainfileinfodetailview'); \OCP\Util::addScript('files', 'detailsview'); diff --git a/apps/files/list.php b/apps/files/list.php index 6d2c463a2d9..2d7a304df24 100644 --- a/apps/files/list.php +++ b/apps/files/list.php @@ -20,9 +20,6 @@ * */ -// Check if we are a user -OCP\User::checkLoggedIn(); - $config = \OC::$server->getConfig(); // TODO: move this to the generated config.js $publicUploadEnabled = $config->getAppValue('core', 'shareapi_allow_public_upload', 'yes'); diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index fdf5006857e..98511fd3d64 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -1343,7 +1343,8 @@ describe('OCA.Files.FileList tests', function() { '/../abc', '/abc/..', '/abc/../', - '/../abc/' + '/../abc/', + '/another\\subdir/../foo\\../bar\\..\\file/..\\folder/../' ], function(path) { fileList.changeDirectory(path); expect(fileList.getCurrentDirectory()).toEqual('/'); @@ -1351,9 +1352,10 @@ describe('OCA.Files.FileList tests', function() { }); it('allows paths with dotdot at the beginning or end', function() { _.each([ - '..abc', - 'def..', - '...' + '/..abc', + '/def..', + '/...', + '/abc../def' ], function(path) { fileList.changeDirectory(path); expect(fileList.getCurrentDirectory()).toEqual(path); @@ -1364,6 +1366,11 @@ describe('OCA.Files.FileList tests', function() { deferredList.reject(404); expect(fileList.getCurrentDirectory()).toEqual('/'); }); + it('switches to root dir when current directory returns 405', function() { + fileList.changeDirectory('/unexist'); + deferredList.reject(405); + expect(fileList.getCurrentDirectory()).toEqual('/'); + }); it('switches to root dir when current directory is forbidden', function() { fileList.changeDirectory('/unexist'); deferredList.reject(403); @@ -2406,14 +2413,12 @@ describe('OCA.Files.FileList tests', function() { */ function dropOn($target, data) { var eventData = { - originalEvent: { + delegatedEvent: { target: $target } }; var ev = new $.Event('fileuploaddrop', eventData); - // using triggerHandler instead of trigger so we can pass - // extra data - $uploader.triggerHandler(ev, data || {}); + $uploader.trigger(ev, data || {}); return ev; } |