diff options
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/appinfo/filesync.php | 64 | ||||
-rw-r--r-- | apps/files/appinfo/info.xml | 1 | ||||
-rw-r--r-- | apps/files/appinfo/version | 2 | ||||
-rw-r--r-- | apps/files/css/files.css | 3 | ||||
-rw-r--r-- | apps/files/js/files.js | 59 | ||||
-rw-r--r-- | apps/files/l10n/bg_BG.php | 17 | ||||
-rw-r--r-- | apps/files/l10n/ca.php | 2 | ||||
-rw-r--r-- | apps/files/l10n/de.php | 2 | ||||
-rw-r--r-- | apps/files/l10n/el.php | 7 | ||||
-rw-r--r-- | apps/files/l10n/es.php | 2 | ||||
-rw-r--r-- | apps/files/l10n/fi_FI.php | 7 | ||||
-rw-r--r-- | apps/files/l10n/fr.php | 2 | ||||
-rw-r--r-- | apps/files/l10n/it.php | 7 | ||||
-rw-r--r-- | apps/files/l10n/pl.php | 2 | ||||
-rw-r--r-- | apps/files/l10n/ru.php | 3 | ||||
-rw-r--r-- | apps/files/l10n/sl.php | 4 | ||||
-rw-r--r-- | apps/files/l10n/sv.php | 7 | ||||
-rw-r--r-- | apps/files/l10n/tr.php | 3 | ||||
-rw-r--r-- | apps/files/l10n/uk.php | 22 |
19 files changed, 210 insertions, 6 deletions
diff --git a/apps/files/appinfo/filesync.php b/apps/files/appinfo/filesync.php new file mode 100644 index 00000000000..707ee2435c0 --- /dev/null +++ b/apps/files/appinfo/filesync.php @@ -0,0 +1,64 @@ +<?php +/** + * Copyright (c) 2012 Bart Visscher <bartv@thisnet.nl> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +/** + * filesync can be called with a PUT method. + * PUT takes a stream starting with a 2 byte blocksize, + * followed by binary md5 of the blocks. Everything in big-endian. + * The return is a json encoded with: + * - 'transferid' + * - 'needed' chunks + * - 'last' checked chunk + * The URL is made of 3 parts, the service url (remote.php/filesync/), the sync + * type and the path in ownCloud. + * At the moment the only supported sync type is 'oc_chunked'. + * The final URL will look like http://.../remote.php/filesync/oc_chunked/path/to/file + */ + +// only need filesystem apps +$RUNTIME_APPTYPES=array('filesystem','authentication'); +OC_App::loadApps($RUNTIME_APPTYPES); +if(!OC_User::isLoggedIn()){ + if(!isset($_SERVER['PHP_AUTH_USER'])){ + header('WWW-Authenticate: Basic realm="ownCloud Server"'); + header('HTTP/1.0 401 Unauthorized'); + echo 'Valid credentials must be supplied'; + exit(); + } else { + if(!OC_User::login($_SERVER["PHP_AUTH_USER"], $_SERVER["PHP_AUTH_PW"])){ + exit(); + } + } +} + +list($type,$file) = explode('/', substr($path_info,1+strlen($service)+1), 2); + +if ($type != 'oc_chunked') { + OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND); + die; +} + +if (!OC_Filesystem::is_file($file)) { + OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND); + die; +} + +switch($_SERVER['REQUEST_METHOD']) { + case 'PUT': + $input = fopen("php://input", "r"); + $org_file = OC_Filesystem::fopen($file, 'rb'); + $info = array( + 'name' => basename($file), + ); + $sync = new OC_FileChunking($info); + $result = $sync->signature_split($org_file, $input); + echo json_encode($result); + break; + default: + OC_Response::setStatus(OC_Response::STATUS_NOT_FOUND); +} diff --git a/apps/files/appinfo/info.xml b/apps/files/appinfo/info.xml index 105df092ce5..e58f83c5a01 100644 --- a/apps/files/appinfo/info.xml +++ b/apps/files/appinfo/info.xml @@ -15,5 +15,6 @@ <remote> <files>appinfo/remote.php</files> <webdav>appinfo/remote.php</webdav> + <filesync>appinfo/filesync.php</filesync> </remote> </info> diff --git a/apps/files/appinfo/version b/apps/files/appinfo/version index 1b87bcd0b09..e25d8d9f357 100644 --- a/apps/files/appinfo/version +++ b/apps/files/appinfo/version @@ -1 +1 @@ -1.1.4
\ No newline at end of file +1.1.5 diff --git a/apps/files/css/files.css b/apps/files/css/files.css index 317c0b8a1e2..7298a7ef6e6 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -88,5 +88,4 @@ a.action>img { max-height:16px; max-width:16px; vertical-align:text-bottom; } #navigation>ul>li:first-child { background:url('%webroot%/core/img/breadcrumb-start.svg') no-repeat 12.5em 0px; width:12.5em; padding-right:1em; position:fixed; } #navigation>ul>li:first-child+li { padding-top:2.9em; } -#scanning-message{ top:40%; left:40%; position:absolute; display:none; } -#notification span { cursor:pointer; font-weight:bold; margin-left:1em; }
\ No newline at end of file +#scanning-message{ top:40%; left:40%; position:absolute; display:none; }
\ No newline at end of file diff --git a/apps/files/js/files.js b/apps/files/js/files.js index daa250c9bd4..c980ba003d0 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -542,6 +542,65 @@ $(document).ready(function() { scanFiles(); } }, "json"); + + var lastWidth = 0; + var breadcrumbs = []; + var breadcrumbsWidth = $('#navigation').get(0).offsetWidth + $('#controls .actions').get(0).offsetWidth; + var hiddenBreadcrumbs = 0; + + $.each($('.crumb'), function(index, breadcrumb) { + breadcrumbs[index] = breadcrumb; + breadcrumbsWidth += $(breadcrumb).get(0).offsetWidth; + }); + + function resizeBreadcrumbs(firstRun) { + var width = $(this).width(); + if (width != lastWidth) { + if ((width < lastWidth || firstRun) && width < breadcrumbsWidth) { + if (hiddenBreadcrumbs == 0) { + breadcrumbsWidth -= $(breadcrumbs[1]).get(0).offsetWidth; + $(breadcrumbs[1]).find('a').hide(); + $(breadcrumbs[1]).append('<span>...</span>'); + breadcrumbsWidth += $(breadcrumbs[1]).get(0).offsetWidth; + hiddenBreadcrumbs = 2; + } + var i = hiddenBreadcrumbs; + while (width < breadcrumbsWidth && i > 1 && i < breadcrumbs.length - 1) { + breadcrumbsWidth -= $(breadcrumbs[i]).get(0).offsetWidth; + $(breadcrumbs[i]).hide(); + hiddenBreadcrumbs = i; + i++ + } + } else if (width > lastWidth && hiddenBreadcrumbs > 0) { + var i = hiddenBreadcrumbs; + while (width > breadcrumbsWidth && i > 0) { + if (hiddenBreadcrumbs == 1) { + breadcrumbsWidth -= $(breadcrumbs[1]).get(0).offsetWidth; + $(breadcrumbs[1]).find('span').remove(); + $(breadcrumbs[1]).find('a').show(); + breadcrumbsWidth += $(breadcrumbs[1]).get(0).offsetWidth; + } else { + $(breadcrumbs[i]).show(); + breadcrumbsWidth += $(breadcrumbs[i]).get(0).offsetWidth; + if (breadcrumbsWidth > width) { + breadcrumbsWidth -= $(breadcrumbs[i]).get(0).offsetWidth; + $(breadcrumbs[i]).hide(); + break; + } + } + i--; + hiddenBreadcrumbs = i; + } + } + lastWidth = width; + } + } + + $(window).resize(function() { + resizeBreadcrumbs(false); + }); + + resizeBreadcrumbs(true); }); function scanFiles(force,dir){ diff --git a/apps/files/l10n/bg_BG.php b/apps/files/l10n/bg_BG.php index 329f306d9e8..624e08959fe 100644 --- a/apps/files/l10n/bg_BG.php +++ b/apps/files/l10n/bg_BG.php @@ -5,15 +5,30 @@ "The uploaded file was only partially uploaded" => "Файлът е качен частично", "No file was uploaded" => "Фахлът не бе качен", "Missing a temporary folder" => "Липсва временната папка", +"Failed to write to disk" => "Грешка при запис на диска", "Files" => "Файлове", "Delete" => "Изтриване", +"Upload Error" => "Грешка при качване", +"Upload cancelled." => "Качването е отменено.", +"Invalid name, '/' is not allowed." => "Неправилно име – \"/\" не е позволено.", "Size" => "Размер", "Modified" => "Променено", +"folder" => "папка", +"folders" => "папки", +"file" => "файл", "Maximum upload size" => "Макс. размер за качване", +"0 is unlimited" => "0 означава без ограничение", +"New" => "Нов", +"Text file" => "Текстов файл", +"Folder" => "Папка", +"From url" => "От url-адрес", "Upload" => "Качване", +"Cancel upload" => "Отказване на качването", "Nothing in here. Upload something!" => "Няма нищо, качете нещо!", "Name" => "Име", +"Share" => "Споделяне", "Download" => "Изтегляне", "Upload too large" => "Файлът е прекалено голям", -"The files you are trying to upload exceed the maximum size for file uploads on this server." => "Файловете които се опитвате да качите са по-големи от позволеното за сървъра." +"The files you are trying to upload exceed the maximum size for file uploads on this server." => "Файловете които се опитвате да качите са по-големи от позволеното за сървъра.", +"Files are being scanned, please wait." => "Файловете се претърсват, изчакайте." ); diff --git a/apps/files/l10n/ca.php b/apps/files/l10n/ca.php index c23746ac5ac..35be2692696 100644 --- a/apps/files/l10n/ca.php +++ b/apps/files/l10n/ca.php @@ -9,6 +9,8 @@ "Files" => "Fitxers", "Unshare" => "Deixa de compartir", "Delete" => "Suprimeix", +"undo" => "desfés", +"deleted" => "esborrat", "generating ZIP-file, it may take some time." => "s'estan generant fitxers ZIP, pot trigar una estona.", "Unable to upload your file as it is a directory or has 0 bytes" => "No es pot pujar el fitxer perquè és una carpeta o té 0 bytes", "Upload Error" => "Error en la pujada", diff --git a/apps/files/l10n/de.php b/apps/files/l10n/de.php index ea7ffa5ac54..1f4b076ee47 100644 --- a/apps/files/l10n/de.php +++ b/apps/files/l10n/de.php @@ -9,6 +9,8 @@ "Files" => "Dateien", "Unshare" => "Nicht mehr teilen", "Delete" => "Löschen", +"undo" => "rückgängig machen", +"deleted" => "gelöscht", "generating ZIP-file, it may take some time." => "Erstelle ZIP-Datei. Dies kann eine Weile dauern.", "Unable to upload your file as it is a directory or has 0 bytes" => "Datei kann nicht hochgeladen werden da sie ein Verzeichniss ist oder 0 bytes hat.", "Upload Error" => "Fehler beim Hochladen", diff --git a/apps/files/l10n/el.php b/apps/files/l10n/el.php index ce154bacb7f..57ba31e92b0 100644 --- a/apps/files/l10n/el.php +++ b/apps/files/l10n/el.php @@ -9,6 +9,13 @@ "Files" => "Αρχεία", "Unshare" => "Ακύρωση Διαμοιρασμού", "Delete" => "Διαγραφή", +"already exists" => "υπάρχει ήδη", +"replace" => "αντικατέστησε", +"cancel" => "ακύρωση", +"replaced" => "αντικαταστάθηκε", +"with" => "με", +"undo" => "αναίρεση", +"deleted" => "διαγράφηκε", "generating ZIP-file, it may take some time." => "παραγωγή αρχείου ZIP, ίσως διαρκέσει αρκετά.", "Unable to upload your file as it is a directory or has 0 bytes" => "Αδυναμία στην μεταφόρτωση του αρχείου σας αφού είναι φάκελος ή έχει 0 bytes", "Upload Error" => "Σφάλμα Μεταφόρτωσης", diff --git a/apps/files/l10n/es.php b/apps/files/l10n/es.php index e1376aa42b1..6b6414f9252 100644 --- a/apps/files/l10n/es.php +++ b/apps/files/l10n/es.php @@ -9,6 +9,8 @@ "Files" => "Archivos", "Unshare" => "No compartir", "Delete" => "Eliminado", +"undo" => "deshacer", +"deleted" => "borrado", "generating ZIP-file, it may take some time." => "generando un fichero ZIP, puede llevar un tiempo.", "Unable to upload your file as it is a directory or has 0 bytes" => "No ha sido posible subir tu archivo porque es un directorio o tiene 0 bytes", "Upload Error" => "Error al subir el archivo", diff --git a/apps/files/l10n/fi_FI.php b/apps/files/l10n/fi_FI.php index 1b1cfd394cc..9e4be5b38ad 100644 --- a/apps/files/l10n/fi_FI.php +++ b/apps/files/l10n/fi_FI.php @@ -9,6 +9,13 @@ "Files" => "Tiedostot", "Unshare" => "Lopeta jakaminen", "Delete" => "Poista", +"already exists" => "on jo olemassa", +"replace" => "korvaa", +"cancel" => "peru", +"replaced" => "korvattu", +"with" => "käyttäen", +"undo" => "kumoa", +"deleted" => "poistettu", "generating ZIP-file, it may take some time." => "luodaan ZIP-tiedostoa, tämä saattaa kestää hetken.", "Unable to upload your file as it is a directory or has 0 bytes" => "Tiedoston lähetys epäonnistui, koska sen koko on 0 tavua tai kyseessä on kansio", "Upload Error" => "Lähetysvirhe.", diff --git a/apps/files/l10n/fr.php b/apps/files/l10n/fr.php index ca3d03ad6f7..e037c7a2f4b 100644 --- a/apps/files/l10n/fr.php +++ b/apps/files/l10n/fr.php @@ -9,6 +9,8 @@ "Files" => "Fichiers", "Unshare" => "Ne plus partager", "Delete" => "Supprimer", +"undo" => "annuler", +"deleted" => "supprimé", "generating ZIP-file, it may take some time." => "Générer un fichier ZIP, cela peut prendre du temps", "Unable to upload your file as it is a directory or has 0 bytes" => "Impossible de charger vos fichiers car il s'agit d'un dossier ou le fichier fait 0 octet.", "Upload Error" => "Erreur de chargement", diff --git a/apps/files/l10n/it.php b/apps/files/l10n/it.php index 35ee7a5fdd1..8764ff45503 100644 --- a/apps/files/l10n/it.php +++ b/apps/files/l10n/it.php @@ -9,6 +9,13 @@ "Files" => "File", "Unshare" => "Rimuovi condivisione", "Delete" => "Elimina", +"already exists" => "esiste già", +"replace" => "sostituisci", +"cancel" => "annulla", +"replaced" => "sostituito", +"with" => "con", +"undo" => "annulla", +"deleted" => "eliminati", "generating ZIP-file, it may take some time." => "creazione file ZIP, potrebbe richiedere del tempo.", "Unable to upload your file as it is a directory or has 0 bytes" => "Impossibile inviare il file poiché è una cartella o ha dimensione 0 byte", "Upload Error" => "Errore di invio", diff --git a/apps/files/l10n/pl.php b/apps/files/l10n/pl.php index 67a29b46613..811e983bb96 100644 --- a/apps/files/l10n/pl.php +++ b/apps/files/l10n/pl.php @@ -8,6 +8,8 @@ "Failed to write to disk" => "Błąd zapisu na dysk", "Files" => "Pliki", "Delete" => "Usuwa element", +"undo" => "wróć", +"deleted" => "skasuj", "generating ZIP-file, it may take some time." => "Generowanie pliku ZIP, może potrwać pewien czas.", "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", diff --git a/apps/files/l10n/ru.php b/apps/files/l10n/ru.php index 99bb6df8f87..145dc6ce0bf 100644 --- a/apps/files/l10n/ru.php +++ b/apps/files/l10n/ru.php @@ -7,7 +7,10 @@ "Missing a temporary folder" => "Невозможно найти временную папку", "Failed to write to disk" => "Ошибка записи на диск", "Files" => "Файлы", +"Unshare" => "Снять общий доступ", "Delete" => "Удалить", +"undo" => "отмена", +"deleted" => "удален", "generating ZIP-file, it may take some time." => "создание ZIP-файла, это может занять некоторое время.", "Unable to upload your file as it is a directory or has 0 bytes" => "Не удается загрузить файл размером 0 байт в каталог", "Upload Error" => "Ошибка загрузки", diff --git a/apps/files/l10n/sl.php b/apps/files/l10n/sl.php index a4f3b578885..0fd9e9a06c5 100644 --- a/apps/files/l10n/sl.php +++ b/apps/files/l10n/sl.php @@ -9,6 +9,8 @@ "Files" => "Datoteke", "Unshare" => "Vzemi iz souporabe", "Delete" => "Izbriši", +"undo" => "razveljavi", +"deleted" => "izbrisano", "generating ZIP-file, it may take some time." => "Ustvarjam ZIP datoteko. To lahko traja nekaj časa.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nalaganje ni mogoče, saj gre za mapo, ali pa ima datoteka velikost 0 bajtov.", "Upload Error" => "Napaka pri nalaganju", @@ -37,7 +39,7 @@ "Nothing in here. Upload something!" => "Tukaj ni ničesar. Naložite kaj!", "Name" => "Ime", "Share" => "Souporaba", -"Download" => "Prejmi", +"Download" => "Prenesi", "Upload too large" => "Nalaganje ni mogoče, ker je preveliko", "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Datoteke, ki jih želite naložiti, presegajo največjo dovoljeno velikost na tem strežniku.", "Files are being scanned, please wait." => "Preiskujem datoteke, prosimo počakajte.", diff --git a/apps/files/l10n/sv.php b/apps/files/l10n/sv.php index f3d936ff845..24784c29044 100644 --- a/apps/files/l10n/sv.php +++ b/apps/files/l10n/sv.php @@ -9,6 +9,13 @@ "Files" => "Filer", "Unshare" => "Sluta dela", "Delete" => "Ta bort", +"already exists" => "finns redan", +"replace" => "ersätt", +"cancel" => "avbryt", +"replaced" => "ersatt", +"with" => "med", +"undo" => "ångra", +"deleted" => "raderad", "generating ZIP-file, it may take some time." => "Gererar ZIP-fil. Det kan ta lite tid.", "Unable to upload your file as it is a directory or has 0 bytes" => "Kunde inte ladda upp dina filer eftersom det antingen är en mapp eller har 0 bytes.", "Upload Error" => "Uppladdningsfel", diff --git a/apps/files/l10n/tr.php b/apps/files/l10n/tr.php index 0ecbcadb486..faa5cc10b78 100644 --- a/apps/files/l10n/tr.php +++ b/apps/files/l10n/tr.php @@ -7,7 +7,10 @@ "Missing a temporary folder" => "Geçici bir klasör eksik", "Failed to write to disk" => "Diske yazılamadı", "Files" => "Dosyalar", +"Unshare" => "Paylaşılmayan", "Delete" => "Sil", +"undo" => "geri al", +"deleted" => "silindi", "generating ZIP-file, it may take some time." => "ZIP dosyası oluşturuluyor, biraz sürebilir.", "Unable to upload your file as it is a directory or has 0 bytes" => "Dosyanızın boyutu 0 byte olduğundan veya bir dizin olduğundan yüklenemedi", "Upload Error" => "Yükleme hatası", diff --git a/apps/files/l10n/uk.php b/apps/files/l10n/uk.php index 743bc57feeb..0b535bf3845 100644 --- a/apps/files/l10n/uk.php +++ b/apps/files/l10n/uk.php @@ -6,17 +6,37 @@ "No file was uploaded" => "Не відвантажено жодного файлу", "Missing a temporary folder" => "Відсутній тимчасовий каталог", "Files" => "Файли", +"Unshare" => "Заборонити доступ", "Delete" => "Видалити", +"undo" => "відмінити", +"deleted" => "видалені", +"generating ZIP-file, it may take some time." => "Створення ZIP-файлу, це може зайняти певний час.", +"Unable to upload your file as it is a directory or has 0 bytes" => "Неможливо завантажити ваш файл тому, що він тека або файл розміром 0 байт", +"Upload Error" => "Помилка завантаження", +"Pending" => "Очікування", +"Upload cancelled." => "Завантаження перервано.", +"Invalid name, '/' is not allowed." => "Некоректне ім'я, '/' не дозволено.", "Size" => "Розмір", "Modified" => "Змінено", +"folder" => "тека", +"folders" => "теки", +"file" => "файл", +"files" => "файли", "Maximum upload size" => "Максимальний розмір відвантажень", +"max. possible: " => "макс.можливе:", +"0 is unlimited" => "0 є безліміт", "New" => "Створити", "Text file" => "Текстовий файл", "Folder" => "Папка", +"From url" => "З URL", "Upload" => "Відвантажити", +"Cancel upload" => "Перервати завантаження", "Nothing in here. Upload something!" => "Тут нічого немає. Відвантажте що-небудь!", "Name" => "Ім'я", +"Share" => "Поділитися", "Download" => "Завантажити", "Upload too large" => "Файл занадто великий", -"The files you are trying to upload exceed the maximum size for file uploads on this server." => "Файли,що ви намагаєтесь відвантажити перевищують максимальний дозволений розмір файлів на цьому сервері." +"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" => "Поточне сканування" ); |