diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-02-28 10:39:23 -0500 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2013-02-28 10:39:23 -0500 |
commit | b5989c933f3c51887724d89e989a3e2af4207d6e (patch) | |
tree | 40677bfa8daa1357b1ca3a561b551a142cbe6c82 /apps/files | |
parent | ea83acedebbcf70b19643efe82b72fb139cf8ad2 (diff) | |
parent | 93e713d3781c5d5fc6d0dbb6c6a0a8f9c2e15b97 (diff) | |
download | nextcloud-server-b5989c933f3c51887724d89e989a3e2af4207d6e.tar.gz nextcloud-server-b5989c933f3c51887724d89e989a3e2af4207d6e.zip |
Merge branch 'master' into shared-folder-etags
Conflicts:
apps/files_sharing/lib/sharedstorage.php
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/ajax/upload.php | 3 | ||||
-rw-r--r-- | apps/files/appinfo/info.xml | 2 | ||||
-rw-r--r-- | apps/files/css/files.css | 12 | ||||
-rw-r--r-- | apps/files/js/filelist.js | 20 | ||||
-rw-r--r-- | apps/files/js/files.js | 35 | ||||
-rw-r--r-- | apps/files/l10n/de_DE.php | 4 | ||||
-rw-r--r-- | apps/files/l10n/el.php | 2 | ||||
-rw-r--r-- | apps/files/l10n/es.php | 1 | ||||
-rw-r--r-- | apps/files/l10n/he.php | 1 | ||||
-rw-r--r-- | apps/files/l10n/hy.php | 6 | ||||
-rw-r--r-- | apps/files/l10n/id.php | 4 | ||||
-rw-r--r-- | apps/files/l10n/ka.php | 4 | ||||
-rw-r--r-- | apps/files/l10n/my_MM.php | 4 | ||||
-rw-r--r-- | apps/files/l10n/pl.php | 8 | ||||
-rw-r--r-- | apps/files/l10n/pt_BR.php | 1 | ||||
-rw-r--r-- | apps/files/l10n/sv.php | 1 | ||||
-rw-r--r-- | apps/files/templates/part.list.php | 4 |
17 files changed, 78 insertions, 34 deletions
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index 9031c729eff..5b697777e47 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -26,8 +26,7 @@ foreach ($_FILES['files']['error'] as $error) { UPLOAD_ERR_OK => $l->t('There is no error, the file uploaded with success'), UPLOAD_ERR_INI_SIZE => $l->t('The uploaded file exceeds the upload_max_filesize directive in php.ini: ') . ini_get('upload_max_filesize'), - UPLOAD_ERR_FORM_SIZE => $l->t('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified' - . ' in the HTML form'), + UPLOAD_ERR_FORM_SIZE => $l->t('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form'), UPLOAD_ERR_PARTIAL => $l->t('The uploaded file was only partially uploaded'), UPLOAD_ERR_NO_FILE => $l->t('No file was uploaded'), UPLOAD_ERR_NO_TMP_DIR => $l->t('Missing a temporary folder'), diff --git a/apps/files/appinfo/info.xml b/apps/files/appinfo/info.xml index 7c82c839dab..34800378537 100644 --- a/apps/files/appinfo/info.xml +++ b/apps/files/appinfo/info.xml @@ -5,7 +5,7 @@ <description>File Management</description> <licence>AGPL</licence> <author>Robin Appelman</author> - <require>4.91</require> + <require>4.93</require> <shipped>true</shipped> <standalone/> <default_enable/> diff --git a/apps/files/css/files.css b/apps/files/css/files.css index dfc2e4c0e2f..cd339ad26a5 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -123,6 +123,18 @@ a.action>img { max-height:16px; max-width:16px; vertical-align:text-bottom; } .selectedActions a { display:inline; margin:-.5em 0; padding:.5em !important; } .selectedActions a img { position:relative; top:.3em; } +#fileList a.action { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; + filter: alpha(opacity=0); +} +#fileList tr:hover a.action { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=.5)"; + filter: alpha(opacity=.5); +} +#fileList tr:hover a.action:hover { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=1)"; + filter: alpha(opacity=1); +} #scanning-message{ top:40%; left:40%; position:absolute; display:none; } diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index cc107656da8..f5f3f3ba0c6 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -35,7 +35,7 @@ var FileList={ if(extension){ name_span.append($('<span></span>').addClass('extension').text(extension)); } - //dirs can show the number of uploaded files + //dirs can show the number of uploaded files if (type == 'dir') { link_elem.append($('<span></span>').attr({ 'class': 'uploadtext', @@ -44,7 +44,7 @@ var FileList={ } td.append(link_elem); tr.append(td); - + //size column if(size!=t('files', 'Pending')){ simpleSize=simpleFileSize(size); @@ -59,7 +59,7 @@ var FileList={ "style": 'color:rgb('+sizeColor+','+sizeColor+','+sizeColor+')' }).text(simpleSize); tr.append(td); - + // date column var modifiedColor = Math.round((Math.round((new Date()).getTime() / 1000)-lastModifiedTime)/60/60/24*5); td = $('<td></td>').attr({ "class": "date" }); @@ -87,7 +87,7 @@ var FileList={ lastModified, $('#permissions').val() ); - + FileList.insertElement(name, 'file', tr.attr('data-file',name)); var row = $('tr').filterAttr('data-file',name); if(loading){ @@ -101,7 +101,7 @@ var FileList={ FileActions.display(row.find('td.filename')); }, addDir:function(name,size,lastModified,hidden){ - + var tr = this.createRow( 'dir', name, @@ -111,7 +111,7 @@ var FileList={ lastModified, $('#permissions').val() ); - + FileList.insertElement(name,'dir',tr); var row = $('tr').filterAttr('data-file',name); row.find('td.filename').draggable(dragOptions); @@ -315,8 +315,8 @@ var FileList={ do_delete:function(files){ if(files.substr){ files=[files]; - } - for (var i in files) { + } + for (var i=0; i<files.length; i++) { var deleteAction = $('tr').filterAttr('data-file',files[i]).children("td.date").children(".action.delete"); var oldHTML = deleteAction[0].outerHTML; var newHTML = '<img class="move2trash" data-action="Delete" title="'+t('files', 'perform delete operation')+'" src="'+ OC.imagePath('core', 'loading.gif') +'"></a>'; @@ -334,7 +334,7 @@ var FileList={ if (result.status == 'success') { $.each(files,function(index,file){ var files = $('tr').filterAttr('data-file',file); - files.hide(); + files.remove(); files.find('input[type="checkbox"]').removeAttr('checked'); files.removeClass('selected'); }); @@ -344,7 +344,7 @@ var FileList={ var deleteAction = $('tr').filterAttr('data-file',file).children("td.date").children(".move2trash"); deleteAction[0].outerHTML = oldHTML; }); - } + } }); } }; diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 918182162d4..464f7703685 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -114,7 +114,7 @@ $(document).ready(function() { $(this).parent().children('#file_upload_start').trigger('click'); return false; }); - + // Show trash bin $('#trash a').live('click', function() { window.location=OC.filePath('files_trashbin', '', 'index.php'); @@ -162,9 +162,10 @@ $(document).ready(function() { var tr=$('tr').filterAttr('data-file',filename); var renaming=tr.data('renaming'); if(!renaming && !FileList.isLoading(filename)){ - var mime=$(this).parent().parent().data('mime'); - var type=$(this).parent().parent().data('type'); - var permissions = $(this).parent().parent().data('permissions'); + FileActions.currentFile = $(this).parent(); + var mime=FileActions.getCurrentMimeType(); + var type=FileActions.getCurrentType(); + var permissions = FileActions.getCurrentPermissions(); var action=FileActions.getDefault(mime,type, permissions); if(action){ event.preventDefault(); @@ -523,7 +524,7 @@ $(document).ready(function() { crumb.text(text); } - $(window).click(function(){ + $(document).click(function(){ $('#new>ul').hide(); $('#new').removeClass('active'); $('#new li').each(function(i,element){ @@ -594,7 +595,7 @@ $(document).ready(function() { var date=new Date(); FileList.addFile(name,0,date,false,hidden); var tr=$('tr').filterAttr('data-file',name); - tr.data('mime','text/plain').data('id',result.data.id); + tr.attr('data-mime','text/plain'); tr.attr('data-id', result.data.id); getMimeIcon('text/plain',function(path){ tr.find('td.filename').attr('style','background-image:url('+path+')'); @@ -816,26 +817,26 @@ var createDragShadow = function(event){ //select dragged file $(event.target).parents('tr').find('td input:first').prop('checked',true); } - + var selectedFiles = getSelectedFiles(); - + if (!isDragSelected && selectedFiles.length == 1) { //revert the selection $(event.target).parents('tr').find('td input:first').prop('checked',false); } - + //also update class when we dragged more than one file if (selectedFiles.length > 1) { $(event.target).parents('tr').addClass('selected'); } - + // build dragshadow var dragshadow = $('<table class="dragshadow"></table>'); var tbody = $('<tbody></tbody>'); dragshadow.append(tbody); - + var dir=$('#dir').val(); - + $(selectedFiles).each(function(i,elem){ var newtr = $('<tr data-dir="'+dir+'" data-filename="'+elem.name+'">' +'<td class="filename">'+elem.name+'</td><td class="size">'+humanFileSize(elem.size)+'</td>' @@ -849,7 +850,7 @@ var createDragShadow = function(event){ }); } }); - + return dragshadow; } @@ -862,6 +863,10 @@ var dragOptions={ $('#fileList tr td.filename').addClass('ui-draggable'); } } +// sane browsers support using the distance option +if ( ! $.browser.msie) { + dragOptions['distance'] = 20; +} var folderDropOptions={ drop: function( event, ui ) { @@ -869,9 +874,9 @@ var folderDropOptions={ if ($(event.target).parents('tr').find('td input:first').prop('checked') === true) { return false; } - + var target=$.trim($(this).find('.nametext').text()); - + var files = ui.helper.find('tr'); $(files).each(function(i,row){ var dir = $(row).data('dir'); diff --git a/apps/files/l10n/de_DE.php b/apps/files/l10n/de_DE.php index 8d119afada4..1462efdd5d6 100644 --- a/apps/files/l10n/de_DE.php +++ b/apps/files/l10n/de_DE.php @@ -24,7 +24,7 @@ "replaced {new_name}" => "{new_name} wurde ersetzt", "undo" => "rückgängig machen", "replaced {new_name} with {old_name}" => "{old_name} wurde ersetzt durch {new_name}", -"perform delete operation" => "Führe das Löschen aus", +"perform delete operation" => "führe das Löschen aus", "'.' is an invalid file name." => "'.' ist kein gültiger Dateiname.", "File name cannot be empty." => "Der Dateiname darf nicht leer sein.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Ungültiger Name, '\\', '/', '<', '>', ':', '\"', '|', '?' und '*' sind nicht zulässig.", @@ -69,5 +69,5 @@ "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.", "Files are being scanned, please wait." => "Dateien werden gescannt, bitte warten.", "Current scanning" => "Scanne", -"Upgrading filesystem cache..." => "Aktualisiere den Dateisystem-Cache" +"Upgrading filesystem cache..." => "Aktualisiere den Dateisystem-Cache..." ); diff --git a/apps/files/l10n/el.php b/apps/files/l10n/el.php index 60456d180d3..541ec5ba8ae 100644 --- a/apps/files/l10n/el.php +++ b/apps/files/l10n/el.php @@ -62,7 +62,7 @@ "From link" => "Από σύνδεσμο", "Deleted files" => "Διαγραμμένα αρχεία", "Cancel upload" => "Ακύρωση αποστολής", -"Nothing in here. Upload something!" => "Δεν υπάρχει τίποτα εδώ. Ανέβασε κάτι!", +"Nothing in here. Upload something!" => "Δεν υπάρχει τίποτα εδώ. Μεταφορτώστε κάτι!", "Download" => "Λήψη", "Unshare" => "Διακοπή κοινής χρήσης", "Upload too large" => "Πολύ μεγάλο αρχείο προς αποστολή", diff --git a/apps/files/l10n/es.php b/apps/files/l10n/es.php index 12262b54818..3c6d25722e7 100644 --- a/apps/files/l10n/es.php +++ b/apps/files/l10n/es.php @@ -60,6 +60,7 @@ "Text file" => "Archivo de texto", "Folder" => "Carpeta", "From link" => "Desde el enlace", +"Deleted files" => "Archivos eliminados", "Cancel upload" => "Cancelar subida", "Nothing in here. Upload something!" => "Aquí no hay nada. ¡Sube algo!", "Download" => "Descargar", diff --git a/apps/files/l10n/he.php b/apps/files/l10n/he.php index 442eafe1c04..ca2cb14027c 100644 --- a/apps/files/l10n/he.php +++ b/apps/files/l10n/he.php @@ -8,6 +8,7 @@ "Missing a temporary folder" => "תיקייה זמנית חסרה", "Failed to write to disk" => "הכתיבה לכונן נכשלה", "Files" => "קבצים", +"Delete permanently" => "מחק לצמיתות", "Delete" => "מחיקה", "Rename" => "שינוי שם", "Pending" => "ממתין", diff --git a/apps/files/l10n/hy.php b/apps/files/l10n/hy.php new file mode 100644 index 00000000000..29c0cd8b8d0 --- /dev/null +++ b/apps/files/l10n/hy.php @@ -0,0 +1,6 @@ +<?php $TRANSLATIONS = array( +"Delete" => "Ջնջել", +"Close" => "Փակել", +"Save" => "Պահպանել", +"Download" => "Բեռնել" +); diff --git a/apps/files/l10n/id.php b/apps/files/l10n/id.php index 4c4e2e0f714..aff1933e569 100644 --- a/apps/files/l10n/id.php +++ b/apps/files/l10n/id.php @@ -19,6 +19,10 @@ "Name" => "Nama", "Size" => "Ukuran", "Modified" => "Dimodifikasi", +"1 folder" => "1 map", +"{count} folders" => "{count} map", +"1 file" => "1 berkas", +"{count} files" => "{count} berkas", "Upload" => "Unggah", "File handling" => "Penanganan berkas", "Maximum upload size" => "Ukuran unggah maksimum", diff --git a/apps/files/l10n/ka.php b/apps/files/l10n/ka.php new file mode 100644 index 00000000000..148e688547a --- /dev/null +++ b/apps/files/l10n/ka.php @@ -0,0 +1,4 @@ +<?php $TRANSLATIONS = array( +"Files" => "ფაილები", +"Download" => "გადმოწერა" +); diff --git a/apps/files/l10n/my_MM.php b/apps/files/l10n/my_MM.php new file mode 100644 index 00000000000..b791a134ccc --- /dev/null +++ b/apps/files/l10n/my_MM.php @@ -0,0 +1,4 @@ +<?php $TRANSLATIONS = array( +"Files" => "ဖိုင်များ", +"Download" => "ဒေါင်းလုတ်" +); diff --git a/apps/files/l10n/pl.php b/apps/files/l10n/pl.php index d68a871a7d7..7570f1cb475 100644 --- a/apps/files/l10n/pl.php +++ b/apps/files/l10n/pl.php @@ -13,6 +13,7 @@ "Not enough storage available" => "Za mało miejsca", "Invalid directory." => "Zła ścieżka.", "Files" => "Pliki", +"Delete permanently" => "Trwale usuń", "Delete" => "Usuwa element", "Rename" => "Zmień nazwę", "Pending" => "Oczekujące", @@ -23,9 +24,13 @@ "replaced {new_name}" => "zastąpiony {new_name}", "undo" => "wróć", "replaced {new_name} with {old_name}" => "zastąpiony {new_name} z {old_name}", +"perform delete operation" => "wykonywanie operacji usuwania", "'.' is an invalid file name." => "'.' jest nieprawidłową nazwą pliku.", "File name cannot be empty." => "Nazwa pliku nie może być pusta.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Niepoprawna nazwa, Znaki '\\', '/', '<', '>', ':', '\"', '|', '?' oraz '*'są niedozwolone.", +"Your storage is full, files can not be updated or synced anymore!" => "Dysk jest pełny, pliki nie mogą być aktualizowane lub zsynchronizowane!", +"Your storage is almost full ({usedSpacePercent}%)" => "Twój dysk jest prawie pełny ({usedSpacePercent}%)", +"Your download is being prepared. This might take some time if the files are big." => "Pobieranie jest przygotowywane. Może to zająć trochę czasu, jeśli pliki są duże.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nie można wczytać pliku jeśli jest katalogiem lub ma 0 bajtów", "Upload Error" => "Błąd wczytywania", "Close" => "Zamknij", @@ -63,5 +68,6 @@ "Upload too large" => "Wysyłany plik ma za duży rozmiar", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Pliki które próbujesz przesłać, przekraczają maksymalną, dopuszczalną wielkość.", "Files are being scanned, please wait." => "Skanowanie plików, proszę czekać.", -"Current scanning" => "Aktualnie skanowane" +"Current scanning" => "Aktualnie skanowane", +"Upgrading filesystem cache..." => "Uaktualnianie plików pamięci podręcznej..." ); diff --git a/apps/files/l10n/pt_BR.php b/apps/files/l10n/pt_BR.php index 3a9dafcabf9..eb66e154725 100644 --- a/apps/files/l10n/pt_BR.php +++ b/apps/files/l10n/pt_BR.php @@ -60,6 +60,7 @@ "Text file" => "Arquivo texto", "Folder" => "Pasta", "From link" => "Do link", +"Deleted files" => "Arquivos apagados", "Cancel upload" => "Cancelar upload", "Nothing in here. Upload something!" => "Nada aqui.Carrege alguma coisa!", "Download" => "Baixar", diff --git a/apps/files/l10n/sv.php b/apps/files/l10n/sv.php index ca4dfcf553b..12fef78dbd0 100644 --- a/apps/files/l10n/sv.php +++ b/apps/files/l10n/sv.php @@ -60,6 +60,7 @@ "Text file" => "Textfil", "Folder" => "Mapp", "From link" => "Från länk", +"Deleted files" => "Raderade filer", "Cancel upload" => "Avbryt uppladdning", "Nothing in here. Upload something!" => "Ingenting här. Ladda upp något!", "Download" => "Ladda ner", diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php index 3c6c5dbd267..eefebd6649b 100644 --- a/apps/files/templates/part.list.php +++ b/apps/files/templates/part.list.php @@ -28,9 +28,9 @@ > <?php if(!isset($_['readonly']) || !$_['readonly']): ?><input type="checkbox" /><?php endif; ?> <?php if($file['type'] == 'dir'): ?> - <a class="name" href="<?php echo $_['baseURL'].$directory.'/'.$name; ?>" title=""> + <a class="name" href="<?php echo rtrim($_['baseURL'],'/').'/'.trim($directory,'/').'/'.$name; ?>" title=""> <?php else: ?> - <a class="name" href="<?php echo $_['downloadURL'].$directory.'/'.$name; ?>" title=""> + <a class="name" href="<?php echo rtrim($_['downloadURL'],'/').'/'.trim($directory,'/').'/'.$name; ?>" title=""> <?php endif; ?> <span class="nametext"> <?php if($file['type'] == 'dir'):?> |