aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/index.php2
-rw-r--r--apps/files/js/file-upload.js7
-rw-r--r--apps/files/js/files.js198
-rw-r--r--apps/files/l10n/da.php2
-rw-r--r--apps/files/l10n/eu.php7
-rw-r--r--apps/files/l10n/it.php7
-rw-r--r--apps/files/l10n/lv.php1
-rw-r--r--apps/files/l10n/tr.php1
-rw-r--r--apps/files/l10n/zh_CN.GB2312.php80
-rw-r--r--apps/files/lib/helper.php2
10 files changed, 20 insertions, 287 deletions
diff --git a/apps/files/index.php b/apps/files/index.php
index 94c792303da..e4d8e353858 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -119,7 +119,7 @@ if ($needUpgrade) {
$tmpl->printPage();
} else {
// information about storage capacities
- $storageInfo=OC_Helper::getStorageInfo();
+ $storageInfo=OC_Helper::getStorageInfo($dir);
$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir);
$publicUploadEnabled = \OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes');
if (OC_App::isEnabled('files_encryption')) {
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 49e464b810a..f262f11f065 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -205,6 +205,13 @@ $(document).ready(function() {
}
});
});
+ $('#new').click(function(event){
+ event.stopPropagation();
+ });
+ $('#new>a').click(function(){
+ $('#new>ul').toggle();
+ $('#new').toggleClass('active');
+ });
$('#new li').click(function(){
if($(this).children('p').length==0){
return;
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index 4eb949c2eef..87311237e36 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -265,204 +265,6 @@ $(document).ready(function() {
e.preventDefault(); // prevent browser from doing anything, if file isn't dropped in dropZone
});
- $.assocArraySize = function(obj) {
- // http://stackoverflow.com/a/6700/11236
- var size = 0, key;
- for (key in obj) {
- if (obj.hasOwnProperty(key)) size++;
- }
- return size;
- };
-
- // warn user not to leave the page while upload is in progress
- $(window).bind('beforeunload', function(e) {
- if ($.assocArraySize(uploadingFiles) > 0)
- return t('files','File upload is in progress. Leaving the page now will cancel the upload.');
- });
-
- //add multiply file upload attribute to all browsers except konqueror (which crashes when it's used)
- if(navigator.userAgent.search(/konqueror/i)==-1){
- $('#file_upload_start').attr('multiple','multiple')
- }
-
- //if the breadcrumb is to long, start by replacing foldernames with '...' except for the current folder
- var crumb=$('div.crumb').first();
- while($('div.controls').height()>40 && crumb.next('div.crumb').length>0){
- crumb.children('a').text('...');
- crumb=crumb.next('div.crumb');
- }
- //if that isn't enough, start removing items from the breacrumb except for the current folder and it's parent
- var crumb=$('div.crumb').first();
- var next=crumb.next('div.crumb');
- while($('div.controls').height()>40 && next.next('div.crumb').length>0){
- crumb.remove();
- crumb=next;
- next=crumb.next('div.crumb');
- }
- //still not enough, start shorting down the current folder name
- var crumb=$('div.crumb>a').last();
- while($('div.controls').height()>40 && crumb.text().length>6){
- var text=crumb.text()
- text=text.substr(0,text.length-6)+'...';
- crumb.text(text);
- }
-
- $(document).click(function(){
- $('#new>ul').hide();
- $('#new').removeClass('active');
- $('#new li').each(function(i,element){
- if($(element).children('p').length==0){
- $(element).children('form').remove();
- $(element).append('<p>'+$(element).data('text')+'</p>');
- }
- });
- });
- $('#new').click(function(event){
- event.stopPropagation();
- });
- $('#new>a').click(function(){
- $('#new>ul').toggle();
- $('#new').toggleClass('active');
- });
- $('#new li').click(function(){
- if($(this).children('p').length==0){
- return;
- }
-
- $('#new li').each(function(i,element){
- if($(element).children('p').length==0){
- $(element).children('form').remove();
- $(element).append('<p>'+$(element).data('text')+'</p>');
- }
- });
-
- var type=$(this).data('type');
- var text=$(this).children('p').text();
- $(this).data('text',text);
- $(this).children('p').remove();
- var form=$('<form></form>');
- var input=$('<input>');
- form.append(input);
- $(this).append(form);
- input.focus();
- form.submit(function(event){
- event.stopPropagation();
- event.preventDefault();
- var newname=input.val();
- if(type == 'web' && newname.length == 0) {
- OC.Notification.show(t('files', 'URL cannot be empty.'));
- return false;
- } else if (type != 'web' && !Files.isFileNameValid(newname)) {
- return false;
- } else if( type == 'folder' && $('#dir').val() == '/' && newname == 'Shared') {
- OC.Notification.show(t('files','Invalid folder name. Usage of \'Shared\' is reserved by Owncloud'));
- return false;
- }
- if (FileList.lastAction) {
- FileList.lastAction();
- }
- var name = getUniqueName(newname);
- if (newname != name) {
- FileList.checkName(name, newname, true);
- var hidden = true;
- } else {
- var hidden = false;
- }
- switch(type){
- case 'file':
- $.post(
- OC.filePath('files','ajax','newfile.php'),
- {dir:$('#dir').val(),filename:name},
- function(result){
- if (result.status == 'success') {
- var date=new Date();
- FileList.addFile(name,0,date,false,hidden);
- var tr=$('tr').filterAttr('data-file',name);
- tr.attr('data-mime',result.data.mime);
- tr.attr('data-size',result.data.size);
- tr.attr('data-id', result.data.id);
- tr.find('.filesize').text(humanFileSize(result.data.size));
- getMimeIcon(result.data.mime,function(path){
- tr.find('td.filename').attr('style','background-image:url('+path+')');
- });
- } else {
- OC.dialogs.alert(result.data.message, t('core', 'Error'));
- }
- }
- );
- break;
- case 'folder':
- $.post(
- OC.filePath('files','ajax','newfolder.php'),
- {dir:$('#dir').val(),foldername:name},
- function(result){
- if (result.status == 'success') {
- var date=new Date();
- FileList.addDir(name,0,date,hidden);
- var tr=$('tr').filterAttr('data-file',name);
- tr.attr('data-id', result.data.id);
- } else {
- OC.dialogs.alert(result.data.message, t('core', 'Error'));
- }
- }
- );
- break;
- case 'web':
- if(name.substr(0,8)!='https://' && name.substr(0,7)!='http://'){
- name='http://'+name;
- }
- var localName=name;
- if(localName.substr(localName.length-1,1)=='/'){//strip /
- localName=localName.substr(0,localName.length-1)
- }
- if(localName.indexOf('/')){//use last part of url
- localName=localName.split('/').pop();
- }else{//or the domain
- localName=(localName.match(/:\/\/(.[^/]+)/)[1]).replace('www.','');
- }
- localName = getUniqueName(localName);
- //IE < 10 does not fire the necessary events for the progress bar.
- if($('html.lte9').length > 0) {
- } else {
- $('#uploadprogressbar').progressbar({value:0});
- $('#uploadprogressbar').fadeIn();
- }
-
- var eventSource=new OC.EventSource(OC.filePath('files','ajax','newfile.php'),{dir:$('#dir').val(),source:name,filename:localName});
- eventSource.listen('progress',function(progress){
- //IE < 10 does not fire the necessary events for the progress bar.
- if($('html.lte9').length > 0) {
- } else {
- $('#uploadprogressbar').progressbar('value',progress);
- }
- });
- eventSource.listen('success',function(data){
- var mime=data.mime;
- var size=data.size;
- var id=data.id;
- $('#uploadprogressbar').fadeOut();
- var date=new Date();
- FileList.addFile(localName,size,date,false,hidden);
- var tr=$('tr').filterAttr('data-file',localName);
- tr.data('mime',mime).data('id',id);
- tr.attr('data-id', id);
- getMimeIcon(mime,function(path){
- tr.find('td.filename').attr('style','background-image:url('+path+')');
- });
- });
- eventSource.listen('error',function(error){
- $('#uploadprogressbar').fadeOut();
- alert(error);
- });
- break;
- }
- var li=form.parent();
- form.remove();
- li.append('<p>'+li.data('text')+'</p>');
- $('#new>a').click();
- });
- });
-
//do a background scan if needed
scanFiles();
diff --git a/apps/files/l10n/da.php b/apps/files/l10n/da.php
index 22ca4b0d7b4..e10b16be50e 100644
--- a/apps/files/l10n/da.php
+++ b/apps/files/l10n/da.php
@@ -53,7 +53,7 @@ $TRANSLATIONS = array(
"Maximum upload size" => "Maksimal upload-størrelse",
"max. possible: " => "max. mulige: ",
"Needed for multi-file and folder downloads." => "Nødvendigt for at kunne downloade mapper og flere filer ad gangen.",
-"Enable ZIP-download" => "Muliggør ZIP-download",
+"Enable ZIP-download" => "Tillad ZIP-download",
"0 is unlimited" => "0 er ubegrænset",
"Maximum input size for ZIP files" => "Maksimal størrelse på ZIP filer",
"Save" => "Gem",
diff --git a/apps/files/l10n/eu.php b/apps/files/l10n/eu.php
index fe6e117a93b..140261b6c15 100644
--- a/apps/files/l10n/eu.php
+++ b/apps/files/l10n/eu.php
@@ -32,20 +32,21 @@ $TRANSLATIONS = array(
"cancel" => "ezeztatu",
"replaced {new_name} with {old_name}" => " {new_name}-k {old_name} ordezkatu du",
"undo" => "desegin",
-"_Uploading %n file_::_Uploading %n files_" => array("",""),
+"_Uploading %n file_::_Uploading %n files_" => array("Fitxategi %n igotzen","%n fitxategi igotzen"),
"files uploading" => "fitxategiak igotzen",
"'.' is an invalid file name." => "'.' ez da fitxategi izen baliogarria.",
"File name cannot be empty." => "Fitxategi izena ezin da hutsa izan.",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "IZen aliogabea, '\\', '/', '<', '>', ':', '\"', '|', '?' eta '*' ez daude baimenduta.",
"Your storage is full, files can not be updated or synced anymore!" => "Zure biltegiratzea beterik dago, ezingo duzu aurrerantzean fitxategirik igo edo sinkronizatu!",
"Your storage is almost full ({usedSpacePercent}%)" => "Zure biltegiratzea nahiko beterik dago (%{usedSpacePercent})",
+"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Enkriptazioa desgaitua izan da baina zure fitxategiak oraindik enkriptatuta daude. Mesedez jo zure ezarpen pertsonaletara zure fitxategiak dekodifikatzeko.",
"Your download is being prepared. This might take some time if the files are big." => "Zure deskarga prestatu egin behar da. Denbora bat har lezake fitxategiak handiak badira. ",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Baliogabeako karpeta izena. 'Shared' izena Owncloudek erreserbatzen du",
"Name" => "Izena",
"Size" => "Tamaina",
"Modified" => "Aldatuta",
-"_%n folder_::_%n folders_" => array("",""),
-"_%n file_::_%n files_" => array("",""),
+"_%n folder_::_%n folders_" => array("karpeta %n","%n karpeta"),
+"_%n file_::_%n files_" => array("fitxategi %n","%n fitxategi"),
"%s could not be renamed" => "%s ezin da berrizendatu",
"Upload" => "Igo",
"File handling" => "Fitxategien kudeaketa",
diff --git a/apps/files/l10n/it.php b/apps/files/l10n/it.php
index 3220a3efb6f..43323465163 100644
--- a/apps/files/l10n/it.php
+++ b/apps/files/l10n/it.php
@@ -32,20 +32,21 @@ $TRANSLATIONS = array(
"cancel" => "annulla",
"replaced {new_name} with {old_name}" => "sostituito {new_name} con {old_name}",
"undo" => "annulla",
-"_Uploading %n file_::_Uploading %n files_" => array("",""),
+"_Uploading %n file_::_Uploading %n files_" => array("Caricamento di %n file in corso","Caricamento di %n file in corso"),
"files uploading" => "caricamento file",
"'.' is an invalid file name." => "'.' non è un nome file valido.",
"File name cannot be empty." => "Il nome del file non può essere vuoto.",
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nome non valido, '\\', '/', '<', '>', ':', '\"', '|', '?' e '*' non sono consentiti.",
"Your storage is full, files can not be updated or synced anymore!" => "Lo spazio di archiviazione è pieno, i file non possono essere più aggiornati o sincronizzati!",
"Your storage is almost full ({usedSpacePercent}%)" => "Lo spazio di archiviazione è quasi pieno ({usedSpacePercent}%)",
+"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "La cifratura è stata disabilitata ma i tuoi file sono ancora cifrati. Vai nelle impostazioni personali per decifrare i file.",
"Your download is being prepared. This might take some time if the files are big." => "Il tuo scaricamento è in fase di preparazione. Ciò potrebbe richiedere del tempo se i file sono grandi.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nome della cartella non valido. L'uso di 'Shared' è riservato da ownCloud",
"Name" => "Nome",
"Size" => "Dimensione",
"Modified" => "Modificato",
-"_%n folder_::_%n folders_" => array("",""),
-"_%n file_::_%n files_" => array("",""),
+"_%n folder_::_%n folders_" => array("%n cartella","%n cartelle"),
+"_%n file_::_%n files_" => array("%n file","%n file"),
"%s could not be renamed" => "%s non può essere rinominato",
"Upload" => "Carica",
"File handling" => "Gestione file",
diff --git a/apps/files/l10n/lv.php b/apps/files/l10n/lv.php
index f6ded76e109..9367b0f5a64 100644
--- a/apps/files/l10n/lv.php
+++ b/apps/files/l10n/lv.php
@@ -39,6 +39,7 @@ $TRANSLATIONS = array(
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nederīgs nosaukums, nav atļauti '\\', '/', '<', '>', ':', '\"', '|', '?' un '*'.",
"Your storage is full, files can not be updated or synced anymore!" => "Jūsu krātuve ir pilna, datnes vairs nevar augšupielādēt vai sinhronizēt!",
"Your storage is almost full ({usedSpacePercent}%)" => "Jūsu krātuve ir gandrīz pilna ({usedSpacePercent}%)",
+"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Šifrēšana tika atslēgta, tomēr jūsu faili joprojām ir šifrēti. Atšifrēt failus var Personiskajos uzstādījumos.",
"Your download is being prepared. This might take some time if the files are big." => "Tiek sagatavota lejupielāde. Tas var aizņemt kādu laiciņu, ja datnes ir lielas.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nederīgs mapes nosaukums. “Koplietots” izmantojums ir rezervēts ownCloud servisam.",
"Name" => "Nosaukums",
diff --git a/apps/files/l10n/tr.php b/apps/files/l10n/tr.php
index 725bebfa7db..661e8572e8f 100644
--- a/apps/files/l10n/tr.php
+++ b/apps/files/l10n/tr.php
@@ -39,6 +39,7 @@ $TRANSLATIONS = array(
"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Geçersiz isim, '\\', '/', '<', '>', ':', '\"', '|', '?' ve '*' karakterlerine izin verilmemektedir.",
"Your storage is full, files can not be updated or synced anymore!" => "Depolama alanınız dolu, artık dosyalar güncellenmeyecek yada senkronizasyon edilmeyecek.",
"Your storage is almost full ({usedSpacePercent}%)" => "Depolama alanınız neredeyse dolu ({usedSpacePercent}%)",
+"Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files." => "Şifreleme işlemi durduruldu ancak dosyalarınız şifreli. Dosyalarınızın şifresini kaldırmak için lütfen kişisel ayarlar kısmına geçiniz.",
"Your download is being prepared. This might take some time if the files are big." => "İndirmeniz hazırlanıyor. Dosya büyük ise biraz zaman alabilir.",
"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Geçersiz dizin adı. Shared isminin kullanımı Owncloud tarafından rezerver edilmiştir.",
"Name" => "İsim",
diff --git a/apps/files/l10n/zh_CN.GB2312.php b/apps/files/l10n/zh_CN.GB2312.php
deleted file mode 100644
index d031a1e5a55..00000000000
--- a/apps/files/l10n/zh_CN.GB2312.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-$TRANSLATIONS = array(
-"Could not move %s - File with this name already exists" => "无法移动 %s - 存在同名文件",
-"Could not move %s" => "无法移动 %s",
-"Unable to set upload directory." => "无法设置上传文件夹",
-"Invalid Token" => "非法Token",
-"No file was uploaded. Unknown error" => "没有上传文件。未知错误",
-"There is no error, the file uploaded with success" => "文件上传成功",
-"The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "上传的文件超过了php.ini指定的upload_max_filesize",
-"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" => "上传的文件超过了 HTML 表格中指定的 MAX_FILE_SIZE 选项",
-"The uploaded file was only partially uploaded" => "文件部分上传",
-"No file was uploaded" => "没有上传文件",
-"Missing a temporary folder" => "缺失临时文件夹",
-"Failed to write to disk" => "写磁盘失败",
-"Not enough storage available" => "容量不足",
-"Invalid directory." => "无效文件夹",
-"Files" => "文件",
-"Unable to upload your file as it is a directory or has 0 bytes" => "不能上传您的文件,由于它是文件夹或者为空文件",
-"Not enough space available" => "容量不足",
-"Upload cancelled." => "上传取消了",
-"File upload is in progress. Leaving the page now will cancel the upload." => "文件正在上传。关闭页面会取消上传。",
-"URL cannot be empty." => "网址不能为空。",
-"Invalid folder name. Usage of 'Shared' is reserved by ownCloud" => "无效文件夹名。“Shared”已经被系统保留。",
-"Error" => "出错",
-"Share" => "分享",
-"Delete permanently" => "永久删除",
-"Rename" => "重命名",
-"Pending" => "等待中",
-"{new_name} already exists" => "{new_name} 已存在",
-"replace" => "替换",
-"suggest name" => "推荐名称",
-"cancel" => "取消",
-"replaced {new_name} with {old_name}" => "已用 {old_name} 替换 {new_name}",
-"undo" => "撤销",
-"_Uploading %n file_::_Uploading %n files_" => array("正在上传 %n 个文件"),
-"files uploading" => "个文件正在上传",
-"'.' is an invalid file name." => "'.' 文件名不正确",
-"File name cannot be empty." => "文件名不能为空",
-"Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "文件名内不能包含以下符号:\\ / < > : \" | ?和 *",
-"Your storage is full, files can not be updated or synced anymore!" => "容量已满,不能再同步/上传文件了!",
-"Your storage is almost full ({usedSpacePercent}%)" => "你的空间快用满了 ({usedSpacePercent}%)",
-"Your download is being prepared. This might take some time if the files are big." => "正在下载,可能会花点时间,跟文件大小有关",
-"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "不正确文件夹名。Shared是保留名,不能使用。",
-"Name" => "名称",
-"Size" => "大小",
-"Modified" => "修改日期",
-"_%n folder_::_%n folders_" => array("%n 个文件夹"),
-"_%n file_::_%n files_" => array("%n 个文件"),
-"%s could not be renamed" => "不能重命名 %s",
-"Upload" => "上传",
-"File handling" => "文件处理中",
-"Maximum upload size" => "最大上传大小",
-"max. possible: " => "最大可能",
-"Needed for multi-file and folder downloads." => "需要多文件和文件夹下载.",
-"Enable ZIP-download" => "支持ZIP下载",
-"0 is unlimited" => "0是无限的",
-"Maximum input size for ZIP files" => "最大的ZIP文件输入大小",
-"Save" => "保存",
-"New" => "新建",
-"Text file" => "文本文档",
-"Folder" => "文件夹",
-"From link" => "来自链接",
-"Deleted files" => "已删除的文件",
-"Cancel upload" => "取消上传",
-"You don’t have write permissions here." => "您没有写入权限。",
-"Nothing in here. Upload something!" => "这里没有东西.上传点什么!",
-"Download" => "下载",
-"Unshare" => "取消分享",
-"Delete" => "删除",
-"Upload too large" => "上传过大",
-"The files you are trying to upload exceed the maximum size for file uploads on this server." => "你正在试图上传的文件超过了此服务器支持的最大的文件大小.",
-"Files are being scanned, please wait." => "正在扫描文件,请稍候.",
-"Current scanning" => "正在扫描",
-"directory" => "文件夹",
-"directories" => "文件夹",
-"file" => "文件",
-"files" => "文件",
-"Upgrading filesystem cache..." => "升级系统缓存..."
-);
-$PLURAL_FORMS = "nplurals=1; plural=0;";
diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php
index f2b1f142e9b..7135ef9f656 100644
--- a/apps/files/lib/helper.php
+++ b/apps/files/lib/helper.php
@@ -11,7 +11,7 @@ class Helper
$maxHumanFilesize = $l->t('Upload') . ' max. ' . $maxHumanFilesize;
// information about storage capacities
- $storageInfo = \OC_Helper::getStorageInfo();
+ $storageInfo = \OC_Helper::getStorageInfo($dir);
return array('uploadMaxFilesize' => $maxUploadFilesize,
'maxHumanFilesize' => $maxHumanFilesize,