From 73d45e79a7066b56581072c732f38ca375a4fc29 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Tue, 15 Jan 2013 20:35:15 +0100 Subject: [PATCH] add trash button to web interface --- apps/files/css/files.css | 2 ++ apps/files/index.php | 1 + apps/files/js/files.js | 5 +++++ apps/files/templates/index.php | 6 +++++- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/files/css/files.css b/apps/files/css/files.css index 36a1e5c954b..6355a8cde17 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -23,6 +23,8 @@ #new>ul>li>p { cursor:pointer; } #new>ul>li>form>input { padding:0.3em; margin:-0.3em; } +#trash { height:17px; margin:0 0 0 1em; z-index:1010; position:absolute; right:13.5em; } + #upload { height:27px; padding:0; margin-left:0.2em; overflow:hidden; } diff --git a/apps/files/index.php b/apps/files/index.php index b64bde44cc0..24f58bbd071 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -105,6 +105,7 @@ $tmpl->assign('dir', OC_Filesystem::normalizePath($dir)); $tmpl->assign('isCreatable', OC_Filesystem::isCreatable($dir . '/')); $tmpl->assign('permissions', $permissions); $tmpl->assign('files', $files); +$tmpl->assign('trash', \OCP\App::isEnabled('files_trashbin')); $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/files.js b/apps/files/js/files.js index bb298431e84..c13d7a5961b 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -82,6 +82,11 @@ $(document).ready(function() { $(this).parent().children('#file_upload_start').trigger('click'); return false; }); + + // Show Trash bin + $('#trash a').live('click', function() { + console.log("hello"); + }); var lastChecked; diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index 2e0772443f2..f6b4c29d5a2 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -35,6 +35,11 @@ + +
+ t('Trash');?> +
+
-
-- 2.39.5