diff options
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/css/files.css | 2 | ||||
-rw-r--r-- | apps/files/index.php | 9 | ||||
-rw-r--r-- | apps/files/js/filelist.js | 1 | ||||
-rw-r--r-- | apps/files/js/files.js | 10 | ||||
-rw-r--r-- | apps/files/l10n/cs_CZ.php | 3 | ||||
-rw-r--r-- | apps/files/l10n/da.php | 3 | ||||
-rw-r--r-- | apps/files/templates/index.php | 4 |
7 files changed, 26 insertions, 6 deletions
diff --git a/apps/files/css/files.css b/apps/files/css/files.css index f2ca1065eca..117aac4c93e 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -24,7 +24,7 @@ #new>ul>li>p { cursor:pointer; } #new>ul>li>form>input { padding:0.3em; margin:-0.3em; } -#trash { height:17px; margin: 0 1em; z-index:1010; float: right; } +#trash { margin: 0 1em; z-index:1010; float: right; } #upload { height:27px; padding:0; margin-left:0.2em; overflow:hidden; diff --git a/apps/files/index.php b/apps/files/index.php index 2f005391509..4f9e881eb2d 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -126,6 +126,12 @@ if ($needUpgrade) { $publicUploadEnabled = 'no'; } + $trashEnabled = \OCP\App::isEnabled('files_trashbin'); + $trashEmpty = true; + if ($trashEnabled) { + $trashEmpty = \OCA\Files_Trashbin\Trashbin::isEmpty($user); + } + OCP\Util::addscript('files', 'fileactions'); OCP\Util::addscript('files', 'files'); OCP\Util::addscript('files', 'keyboardshortcuts'); @@ -136,7 +142,8 @@ if ($needUpgrade) { $tmpl->assign('isCreatable', \OC\Files\Filesystem::isCreatable($dir . '/')); $tmpl->assign('permissions', $permissions); $tmpl->assign('files', $files); - $tmpl->assign('trash', \OCP\App::isEnabled('files_trashbin')); + $tmpl->assign('trash', $trashEnabled); + $tmpl->assign('trashEmpty', $trashEmpty); $tmpl->assign('uploadMaxFilesize', $maxUploadFilesize); $tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); $tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true))); diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 04a9fb91649..b858e2580ee 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -392,6 +392,7 @@ var FileList={ files.removeClass('selected'); }); procesSelection(); + checkTrashStatus(); } else { $.each(files,function(index,file) { var deleteAction = $('tr').filterAttr('data-file',file).children("td.date").children(".move2trash"); diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 98fc53b71a9..3fad3fae7d3 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -121,7 +121,7 @@ $(document).ready(function() { }); // Show trash bin - $('#trash a').live('click', function() { + $('#trash').on('click', function() { window.location=OC.filePath('files_trashbin', '', 'index.php'); }); @@ -845,3 +845,11 @@ function getUniqueName(name){ } return name; } + +function checkTrashStatus() { + $.post(OC.filePath('files_trashbin', 'ajax', 'isEmpty.php'), function(result){ + if (result.data.isEmpty === false) { + $("input[type=button][id=trash]").removeAttr("disabled"); + } + }); +}
\ No newline at end of file diff --git a/apps/files/l10n/cs_CZ.php b/apps/files/l10n/cs_CZ.php index c16d32e9c28..3f626d95647 100644 --- a/apps/files/l10n/cs_CZ.php +++ b/apps/files/l10n/cs_CZ.php @@ -49,6 +49,7 @@ "{count} folders" => "{count} složky", "1 file" => "1 soubor", "{count} files" => "{count} soubory", +"%s could not be renamed" => "%s nemůže být přejmenován", "Upload" => "Odeslat", "File handling" => "Zacházení se soubory", "Maximum upload size" => "Maximální velikost pro odesílání", @@ -72,6 +73,8 @@ "The files you are trying to upload exceed the maximum size for file uploads on this server." => "Soubory, které se snažíte odeslat, překračují limit velikosti odesílání na tomto serveru.", "Files are being scanned, please wait." => "Soubory se prohledávají, prosím čekejte.", "Current scanning" => "Aktuální prohledávání", +"directory" => "adresář", +"directories" => "adresáře", "file" => "soubor", "files" => "soubory", "Upgrading filesystem cache..." => "Aktualizuji mezipaměť souborového systému..." diff --git a/apps/files/l10n/da.php b/apps/files/l10n/da.php index 7afc60547f2..3dd82fadba5 100644 --- a/apps/files/l10n/da.php +++ b/apps/files/l10n/da.php @@ -1,6 +1,8 @@ <?php $TRANSLATIONS = array( "Could not move %s - File with this name already exists" => "Kunne ikke flytte %s - der findes allerede en fil med dette navn", "Could not move %s" => "Kunne ikke flytte %s", +"Unable to set upload directory." => "Ude af stand til at vælge upload mappe.", +"Invalid Token" => "Ugyldig Token ", "No file was uploaded. Unknown error" => "Ingen fil blev uploadet. Ukendt fejl.", "There is no error, the file uploaded with success" => "Der skete ingen fejl, filen blev succesfuldt uploadet", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Den uploadede fil overstiger upload_max_filesize direktivet i php.ini", @@ -47,6 +49,7 @@ "{count} folders" => "{count} mapper", "1 file" => "1 fil", "{count} files" => "{count} filer", +"%s could not be renamed" => "%s kunne ikke omdøbes", "Upload" => "Upload", "File handling" => "Filhåndtering", "Maximum upload size" => "Maksimal upload-størrelse", diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index e0731609368..79c283dc336 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -38,9 +38,7 @@ </form> </div> <?php if ($_['trash'] ): ?> - <div id="trash" class="button"> - <a><?php p($l->t('Deleted files'));?></a> - </div> + <input id="trash" type="button" value="<?php p($l->t('Deleted files'));?>" class="button" <?php $_['trashEmpty'] ? p('disabled') : '' ?>></input> <?php endif; ?> <div id="uploadprogresswrapper"> <div id="uploadprogressbar"></div> |