diff options
author | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2013-01-18 19:58:50 +0700 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2013-01-18 19:58:50 +0700 |
commit | b81a7aa078deea7d68c43f98b955158b2eceab99 (patch) | |
tree | b803e38f1e858155065b06dd9a730ac99d4ea5ba /apps/files | |
parent | 09d3db5eb7395a21009d840b9edb30bcce44187b (diff) | |
parent | d85e440aa174c06f805b2e25a80609d82399e147 (diff) | |
download | nextcloud-server-b81a7aa078deea7d68c43f98b955158b2eceab99.tar.gz nextcloud-server-b81a7aa078deea7d68c43f98b955158b2eceab99.zip |
fix up content and content-wrapper merge ...
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/ajax/scan.php | 3 | ||||
-rw-r--r-- | apps/files/css/files.css | 4 | ||||
-rw-r--r-- | apps/files/index.php | 46 | ||||
-rw-r--r-- | apps/files/js/fileactions.js | 14 | ||||
-rw-r--r-- | apps/files/js/files.js | 2 | ||||
-rw-r--r-- | apps/files/l10n/nl.php | 4 | ||||
-rw-r--r-- | apps/files/l10n/pl.php | 3 | ||||
-rw-r--r-- | apps/files/l10n/ro.php | 1 |
8 files changed, 43 insertions, 34 deletions
diff --git a/apps/files/ajax/scan.php b/apps/files/ajax/scan.php index 5cd9572d7f9..a819578e309 100644 --- a/apps/files/ajax/scan.php +++ b/apps/files/ajax/scan.php @@ -6,13 +6,14 @@ $force=isset($_GET['force']) and $_GET['force']=='true'; $dir=isset($_GET['dir'])?$_GET['dir']:''; $checkOnly=isset($_GET['checkonly']) and $_GET['checkonly']=='true'; +$eventSource=false; if(!$checkOnly) { $eventSource=new OC_EventSource(); } session_write_close(); -//create the file cache if necesary +//create the file cache if necessary if($force or !OC_FileCache::inCache('')) { if(!$checkOnly) { OCP\DB::beginTransaction(); diff --git a/apps/files/css/files.css b/apps/files/css/files.css index 0451f0bcec3..7cd56b67bf4 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -23,7 +23,7 @@ #new>ul>li>p { cursor:pointer; } #new>ul>li>form>input { padding:0.3em; margin:-0.3em; } -#upload { +#upload { height:27px; padding:0; margin-left:0.2em; overflow:hidden; } #upload a { @@ -35,7 +35,7 @@ } .file_upload_target { display:none; } .file_upload_form { display:inline; float:left; margin:0; padding:0; cursor:pointer; overflow:visible; } -#file_upload_start { +#file_upload_start { left:0; top:0; width:28px; height:27px; padding:0; font-size:1em; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; diff --git a/apps/files/index.php b/apps/files/index.php index b64bde44cc0..08193eaee7b 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -38,36 +38,36 @@ OCP\App::setActiveNavigationEntry('files_index'); $dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : ''; // Redirect if directory does not exist if (!OC_Filesystem::is_dir($dir . '/')) { - header('Location: ' . $_SERVER['SCRIPT_NAME'] . ''); - exit(); + header('Location: ' . $_SERVER['SCRIPT_NAME'] . ''); + exit(); } $files = array(); foreach (OC_Files::getdirectorycontent($dir) as $i) { - $i['date'] = OCP\Util::formatDate($i['mtime']); - if ($i['type'] == 'file') { - $fileinfo = pathinfo($i['name']); - $i['basename'] = $fileinfo['filename']; - if (!empty($fileinfo['extension'])) { - $i['extension'] = '.' . $fileinfo['extension']; - } else { - $i['extension'] = ''; - } - } - if ($i['directory'] == '/') { - $i['directory'] = ''; - } - $files[] = $i; + $i['date'] = OCP\Util::formatDate($i['mtime']); + if ($i['type'] == 'file') { + $fileinfo = pathinfo($i['name']); + $i['basename'] = $fileinfo['filename']; + if (!empty($fileinfo['extension'])) { + $i['extension'] = '.' . $fileinfo['extension']; + } else { + $i['extension'] = ''; + } + } + if ($i['directory'] == '/') { + $i['directory'] = ''; + } + $files[] = $i; } // Make breadcrumb $breadcrumb = array(); $pathtohere = ''; foreach (explode('/', $dir) as $i) { - if ($i != '') { - $pathtohere .= '/' . $i; - $breadcrumb[] = array('dir' => $pathtohere, 'name' => $i); - } + if ($i != '') { + $pathtohere .= '/' . $i; + $breadcrumb[] = array('dir' => $pathtohere, 'name' => $i); + } } // make breadcrumb und filelist markup @@ -89,13 +89,13 @@ $maxUploadFilesize = min($maxUploadFilesize, $freeSpace); $permissions = OCP\PERMISSION_READ; if (OC_Filesystem::isUpdatable($dir . '/')) { - $permissions |= OCP\PERMISSION_UPDATE; + $permissions |= OCP\PERMISSION_UPDATE; } if (OC_Filesystem::isDeletable($dir . '/')) { - $permissions |= OCP\PERMISSION_DELETE; + $permissions |= OCP\PERMISSION_DELETE; } if (OC_Filesystem::isSharable($dir . '/')) { - $permissions |= OCP\PERMISSION_SHARE; + $permissions |= OCP\PERMISSION_SHARE; } $tmpl = new OCP\Template('files', 'index', 'user'); diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 80b9c01f838..f5ee363a4c8 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -70,23 +70,23 @@ var FileActions = { } parent.children('a.name').append('<span class="fileactions" />'); var defaultAction = FileActions.getDefault(FileActions.getCurrentMimeType(), FileActions.getCurrentType(), FileActions.getCurrentPermissions()); - + var actionHandler = function (event) { event.stopPropagation(); event.preventDefault(); FileActions.currentFile = event.data.elem; var file = FileActions.getCurrentFile(); - + event.data.actionFunc(file); }; - + $.each(actions, function (name, action) { // NOTE: Temporary fix to prevent rename action in root of Shared directory if (name === 'Rename' && $('#dir').val() === '/Shared') { return true; } - + if ((name === 'Download' || action !== defaultAction) && name !== 'Delete') { var img = FileActions.icons[name]; if (img.call) { @@ -97,16 +97,16 @@ var FileActions = { html += '<img class ="svg" src="' + img + '" /> '; } html += t('files', name) + '</a>'; - + var element = $(html); element.data('action', name); //alert(element); element.on('click',{a:null, elem:parent, actionFunc:actions[name]},actionHandler); parent.find('a.name>span.fileactions').append(element); } - + }); - + if (actions['Delete']) { var img = FileActions.icons['Delete']; if (img.call) { diff --git a/apps/files/js/files.js b/apps/files/js/files.js index a4260c43285..3a4af6416e9 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -52,7 +52,7 @@ Files={ } }; $(document).ready(function() { - Files.bindKeyboardShortcuts(document, jQuery); + Files.bindKeyboardShortcuts(document, jQuery); $('#fileList tr').each(function(){ //little hack to set unescape filenames in attribute $(this).attr('data-file',decodeURIComponent($(this).attr('data-file'))); diff --git a/apps/files/l10n/nl.php b/apps/files/l10n/nl.php index 77219abcf20..48c4ac74c2b 100644 --- a/apps/files/l10n/nl.php +++ b/apps/files/l10n/nl.php @@ -1,4 +1,7 @@ <?php $TRANSLATIONS = array( +"Could not move %s - File with this name already exists" => "Kon %s niet verplaatsen - Er bestaat al een bestand met deze naam", +"Could not move %s" => "Kon %s niet verplaatsen", +"Unable to rename file" => "Kan bestand niet hernoemen", "No file was uploaded. Unknown error" => "Er was geen bestand geladen. Onbekende fout", "There is no error, the file uploaded with success" => "Geen fout opgetreden, bestand successvol geupload.", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Het geüploade bestand overscheidt de upload_max_filesize optie in php.ini:", @@ -35,6 +38,7 @@ "Upload cancelled." => "Uploaden geannuleerd.", "File upload is in progress. Leaving the page now will cancel the upload." => "Bestandsupload is bezig. Wanneer de pagina nu verlaten wordt, stopt de upload.", "URL cannot be empty." => "URL kan niet leeg zijn.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Ongeldige mapnaam. Gebruik van'Gedeeld' is voorbehouden aan Owncloud", "{count} files scanned" => "{count} bestanden gescanned", "error while scanning" => "Fout tijdens het scannen", "Name" => "Naam", diff --git a/apps/files/l10n/pl.php b/apps/files/l10n/pl.php index b96048cf002..226dae896c2 100644 --- a/apps/files/l10n/pl.php +++ b/apps/files/l10n/pl.php @@ -1,4 +1,7 @@ <?php $TRANSLATIONS = array( +"Could not move %s - File with this name already exists" => "Nie można było przenieść %s - Plik o takiej nazwie już istnieje", +"Could not move %s" => "Nie można było przenieść %s", +"Unable to rename file" => "Nie można zmienić nazwy pliku", "No file was uploaded. Unknown error" => "Plik nie został załadowany. Nieznany błąd", "There is no error, the file uploaded with success" => "Przesłano plik", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Wgrany plik przekracza wartość upload_max_filesize zdefiniowaną w php.ini: ", diff --git a/apps/files/l10n/ro.php b/apps/files/l10n/ro.php index c34a341e53f..afa41da5212 100644 --- a/apps/files/l10n/ro.php +++ b/apps/files/l10n/ro.php @@ -37,6 +37,7 @@ "Upload cancelled." => "Încărcare anulată.", "File upload is in progress. Leaving the page now will cancel the upload." => "Fișierul este în curs de încărcare. Părăsirea paginii va întrerupe încărcarea.", "URL cannot be empty." => "Adresa URL nu poate fi goală.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Invalid folder name. Usage of 'Shared' is reserved by Ownclou", "{count} files scanned" => "{count} fisiere scanate", "error while scanning" => "eroare la scanarea", "Name" => "Nume", |