From ebcbf85396387729bbef3d2ad3289b45c3ae289d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 4 Feb 2014 16:25:23 +0100 Subject: [PATCH 01/25] reuse file upload as used within files app - remove public upload button --- apps/files/templates/index.php | 4 +++ apps/files_sharing/public.php | 3 +- apps/files_sharing/templates/public.php | 42 +------------------------ 3 files changed, 7 insertions(+), 42 deletions(-) diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index 00ec109621f..673cb8592f8 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -18,6 +18,10 @@ + + + + diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 2407903a928..49d485c86af 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -224,7 +224,8 @@ if (isset($path)) { $folder->assign('fileList', $list->fetchPage()); $folder->assign('breadcrumb', $breadcrumbNav->fetchPage()); $folder->assign('dir', $getPath); - $folder->assign('isCreatable', false); + $folder->assign('isCreatable', $allowPublicUploadEnabled); + $folder->assign('dirToken', $linkItem['token']); $folder->assign('permissions', OCP\PERMISSION_READ); $folder->assign('isPublic',true); $folder->assign('publicUploadEnabled', 'no'); diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index 8b5e0976412..05150a59dd0 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -14,47 +14,7 @@ src="" alt="getName()); ?>" />
- - t('%s shared the folder %s with you', - array($_['displayName'], $_['filename']))) ?> - - t('%s shared the file %s with you', - array($_['displayName'], $_['filename']))) ?> - - - - - - Download" /> - t('Download'))?> - - - - - - - - - - - - = 0):?> - - - - - - -
-
- + t('shared by %s', array($_['displayName']))) ?>
From 8bd3ce2fe25bb01d00ccd14b275a81a52c5c27fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 4 Feb 2014 16:28:51 +0100 Subject: [PATCH 02/25] fixing preview generation --- apps/files/js/files.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 76ac87d38ed..b5633ae01aa 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -720,7 +720,7 @@ Files.lazyLoadPreview = function(path, mime, ready, width, height, etag) { console.warn('Files.lazyLoadPreview(): missing etag argument'); } - if ( $('#public_upload').length ) { + if ( $('#isPublic').length ) { urlSpec.t = $('#dirToken').val(); previewURL = OC.Router.generate('core_ajax_public_preview', urlSpec); } else { From 3ccbc984f4f5cae6e518082d3a5fced44c03fc80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 4 Feb 2014 16:29:53 +0100 Subject: [PATCH 03/25] no new menu on public upload --- apps/files/templates/index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index 673cb8592f8..1230d476095 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -1,6 +1,7 @@
+
t('New'));?>
    @@ -12,6 +13,7 @@ data-type='web'>

    t('From link'));?>

+
= 0):?> From 37d2c0a4befb194c007ed20f3c82f9f298097d4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 4 Feb 2014 16:32:39 +0100 Subject: [PATCH 04/25] remove unused js code and css rules --- apps/files_sharing/css/public.css | 49 ------------------------------- apps/files_sharing/js/public.js | 12 -------- 2 files changed, 61 deletions(-) diff --git a/apps/files_sharing/css/public.css b/apps/files_sharing/css/public.css index b13efd30684..419f420f215 100644 --- a/apps/files_sharing/css/public.css +++ b/apps/files_sharing/css/public.css @@ -19,16 +19,6 @@ body { float: left; } -#public_upload, -#download { - font-weight:700; - margin: 0 0 0 .4em; - padding: 0 5px; - height: 32px; - float: left; - -} - .header-right #details { margin-right: 28px; } @@ -38,17 +28,6 @@ body { height: 32px; } -#public_upload { - margin-left: 0.3em; -} - -#public_upload img, -#download img { - padding-left:.1em; - padding-right:.3em; - vertical-align:text-bottom; -} - #controls { left: 0; } @@ -110,34 +89,6 @@ thead{ margin: 0; } -#file_upload_start { - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - opacity: 0; - z-index: 20; - position: absolute !important; - top: 0; - left: 0; - width: 100% !important; -} - -#publicUploadButtonMock { - position:relative; - display:block; - width:100%; - height:32px; - cursor:pointer; - z-index:10; - background-image:url('%webroot%/core/img/actions/upload.svg'); - background-repeat:no-repeat; - background-position:7px 8px; -} - -#publicUploadButtonMock span { - margin: 0 5px 0 28px; - color: #555; -} - .directLink { margin-bottom: 20px; } diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 4c0b0ad9d48..31572f5ccf5 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -9,8 +9,6 @@ function fileDownloadPath(dir, file) { $(document).ready(function() { - $('#data-upload-form').tipsy({gravity:'ne', fade:true}); - if (typeof FileActions !== 'undefined') { var mimetype = $('#mimetype').val(); // Show file preview if previewer is available, images are already handled by the template @@ -58,16 +56,6 @@ $(document).ready(function() { }; }); - // Add Uploadprogress Wrapper to controls bar - $('#controls').append($('#controls .actions div#uploadprogresswrapper')); - $('#uploadprogresswrapper').addClass('public_actions'); - - // Cancel upload trigger - $('#cancel_upload_button').click(function() { - OC.Upload.cancelUploads(); - procesSelection(); - }); - $('#directLink').focus(); }); From a096f19bb23d676456c91862e3d84f3a8d8d894b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 10:49:57 +0100 Subject: [PATCH 05/25] add download button on single file share page --- apps/files_sharing/templates/public.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index 05150a59dd0..fb45401458f 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -40,13 +40,19 @@ - + +
From 615f0c4a1c8cf5f8129064124f2d306192ed27be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 10:52:25 +0100 Subject: [PATCH 06/25] first mobile style rules, hide extra columns in files view and scroll header --- apps/files_sharing/css/mobile.css | 18 ++++++++++++++++++ apps/files_sharing/public.php | 1 + 2 files changed, 19 insertions(+) create mode 100644 apps/files_sharing/css/mobile.css diff --git a/apps/files_sharing/css/mobile.css b/apps/files_sharing/css/mobile.css new file mode 100644 index 00000000000..e29760b794b --- /dev/null +++ b/apps/files_sharing/css/mobile.css @@ -0,0 +1,18 @@ +@media only screen and (max-width: 600px) { + +/* make header and controls bar scroll up for more view of content on small screens */ +#header, +#controls { + position: absolute; +} + +/* hide size and date columns */ +table th#headerSize, +table td.filesize, +table th#headerDate, +table td.date { + display: none; +} + + +} \ No newline at end of file diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 49d485c86af..620e61c0344 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -136,6 +136,7 @@ if (isset($path)) { } else { OCP\Util::addScript('files', 'file-upload'); OCP\Util::addStyle('files_sharing', 'public'); + OCP\Util::addStyle('files_sharing', 'mobile'); OCP\Util::addScript('files_sharing', 'public'); OCP\Util::addScript('files', 'fileactions'); OCP\Util::addScript('files', 'jquery.iframe-transport'); From 249df3864b7c4a3b675e7c6238846af8126a3354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 10:53:54 +0100 Subject: [PATCH 07/25] remove min-width rule to fix mobile views --- apps/files/css/files.css | 3 --- 1 file changed, 3 deletions(-) diff --git a/apps/files/css/files.css b/apps/files/css/files.css index 2fc86ca537d..74320aba32a 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -65,9 +65,6 @@ top: 44px; width: 100%; } -#filestable, #controls { - min-width: 680px; -} #filestable tbody tr { background-color:#fff; height:2.5em; } #filestable tbody tr:hover, tbody tr:active { background-color: rgb(240,240,240); From 9f9466d00107cfe66fafdc47d3e0c16587817def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 10:57:26 +0100 Subject: [PATCH 08/25] improvements to public files mobile view --- apps/files/css/files.css | 2 +- apps/files_sharing/css/mobile.css | 15 ++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/apps/files/css/files.css b/apps/files/css/files.css index 74320aba32a..4beb01a4e6a 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -234,7 +234,7 @@ table td.filename form { font-size:.85em; margin-left:3em; margin-right:3em; } #fileList tr td.filename a.name label { position: absolute; - width: 100%; + width: 80%; height: 50px; } diff --git a/apps/files_sharing/css/mobile.css b/apps/files_sharing/css/mobile.css index e29760b794b..35b90eba148 100644 --- a/apps/files_sharing/css/mobile.css +++ b/apps/files_sharing/css/mobile.css @@ -1,10 +1,5 @@ @media only screen and (max-width: 600px) { -/* make header and controls bar scroll up for more view of content on small screens */ -#header, -#controls { - position: absolute; -} /* hide size and date columns */ table th#headerSize, @@ -14,5 +9,15 @@ table td.date { display: none; } +/* restrict length of displayed filename to prevent overflow */ +table td.filename .nametext { + max-width: 80% !important; +} +/* and to make room for download button on hover */ +table tr:hover td.filename .nametext, +table tr:focus td.filename .nametext { + max-width: 60% !important; +} + } \ No newline at end of file From fa1288c6b3855a23ee2fbc4615f917868350457b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 10:59:52 +0100 Subject: [PATCH 09/25] tweak color and position of username in public share --- apps/files_sharing/css/public.css | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/apps/files_sharing/css/public.css b/apps/files_sharing/css/public.css index 419f420f215..f4e89b5000a 100644 --- a/apps/files_sharing/css/public.css +++ b/apps/files_sharing/css/public.css @@ -14,20 +14,19 @@ body { padding:7px; } -#details { - color:#fff; - float: left; -} - -.header-right #details { - margin-right: 28px; -} - .header-right { padding: 0; height: 32px; } +#details { + color:#fff; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; + filter: alpha(opacity=50); + opacity: .5; + padding-right: 5px; +} + #controls { left: 0; } From 63b078b5501c764783e268bb7173fb9bcbaf6b36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 11:02:21 +0100 Subject: [PATCH 10/25] fix public share download button width --- apps/files_sharing/css/public.css | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/files_sharing/css/public.css b/apps/files_sharing/css/public.css index f4e89b5000a..f4c0ac0b7cc 100644 --- a/apps/files_sharing/css/public.css +++ b/apps/files_sharing/css/public.css @@ -88,14 +88,21 @@ thead{ margin: 0; } +.directDownload, .directLink { margin-bottom: 20px; } +.directDownload .button img { + vertical-align: text-bottom; +} .directLink label { font-weight: normal; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; + filter: alpha(opacity=50); + opacity: .5; } .directLink input { - margin-left: 10px; + margin-left: 5px; width: 300px; } .public_actions { From 025ab0dabb4cdec86844947d1b058844f834cd00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 11:06:42 +0100 Subject: [PATCH 11/25] on mobile, show single shared image at full width without margin --- apps/files_sharing/css/mobile.css | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/files_sharing/css/mobile.css b/apps/files_sharing/css/mobile.css index 35b90eba148..5928074bab8 100644 --- a/apps/files_sharing/css/mobile.css +++ b/apps/files_sharing/css/mobile.css @@ -19,5 +19,12 @@ table tr:focus td.filename .nametext { max-width: 60% !important; } +/* on mobile, show single shared image at full width without margin */ +#imgframe { + width: 100%; + padding: 0; + margin-bottom: 35px; +} + } \ No newline at end of file From b33cfce2fa7afbb1b3591d708eb23e2d69a51c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 11:08:34 +0100 Subject: [PATCH 12/25] add icons for file list and picture view toggles --- core/img/actions/toggle-filelist.png | Bin 0 -> 195 bytes core/img/actions/toggle-filelist.svg | 11 +++++++++++ core/img/actions/toggle-pictures.png | Bin 0 -> 193 bytes core/img/actions/toggle-pictures.svg | 9 +++++++++ 4 files changed, 20 insertions(+) create mode 100644 core/img/actions/toggle-filelist.png create mode 100644 core/img/actions/toggle-filelist.svg create mode 100644 core/img/actions/toggle-pictures.png create mode 100644 core/img/actions/toggle-pictures.svg diff --git a/core/img/actions/toggle-filelist.png b/core/img/actions/toggle-filelist.png new file mode 100644 index 0000000000000000000000000000000000000000..45d363f1934f7a40e6a43644be8a4bd2b3f73a17 GIT binary patch literal 195 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9%*9TgAsieWw;%dH0CG7CJR*yM z%CCbkqm#z$3ZS55iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$Qb0vK0X`wF z|Ns97G9lnc50fvD#at5P7tC + + + + + + + + + + diff --git a/core/img/actions/toggle-pictures.png b/core/img/actions/toggle-pictures.png new file mode 100644 index 0000000000000000000000000000000000000000..8068d17e30d95532ff0923c9848ebd5cc3c8d8ef GIT binary patch literal 193 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9%*9TgAsieWw;%dH0CG7CJR*yM z%CCbkqm#z$3ZS55iEBhjaDG}zd16s2LwR|*US?i)adKios$PCk`s{Z$QXriHJ|V9E z|NjRvfuJsMWh{_lDhcunW_WOIroID^C*$ej7{U>qoWQ`iQZ>k1VoO-YS_kz5LL3ee avJ79Y2@7g8m;3~(WAJqKb6Mw<&;$VXv^0SL literal 0 HcmV?d00001 diff --git a/core/img/actions/toggle-pictures.svg b/core/img/actions/toggle-pictures.svg new file mode 100644 index 00000000000..5205c0226d1 --- /dev/null +++ b/core/img/actions/toggle-pictures.svg @@ -0,0 +1,9 @@ + + + + + + + + + From 5a5496f4e73071c821cead528acfaeac0f2f6ea8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 11:10:30 +0100 Subject: [PATCH 13/25] restrict zooming on mobile devices for the publicly accessible, optimized pages --- core/templates/layout.base.php | 2 +- core/templates/layout.guest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/templates/layout.base.php b/core/templates/layout.base.php index 8cd237deea1..bae52a73234 100644 --- a/core/templates/layout.base.php +++ b/core/templates/layout.base.php @@ -11,7 +11,7 @@ getTitle()); ?> - + diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php index 47ca5903dab..6a96b17b100 100644 --- a/core/templates/layout.guest.php +++ b/core/templates/layout.guest.php @@ -11,7 +11,7 @@ getTitle()); ?> - + From e3d8758a32e0c3533cdbcb7bf2e40fb8c0fd4906 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 11:12:01 +0100 Subject: [PATCH 14/25] make sure there's enough room for the file actions --- apps/files/css/files.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/files/css/files.css b/apps/files/css/files.css index 4beb01a4e6a..eb009cf0a14 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -65,6 +65,14 @@ top: 44px; width: 100%; } +/* make sure there's enough room for the file actions */ +#body-user #filestable { + min-width: 750px; +} +#body-user #controls { + min-width: 600px; +} + #filestable tbody tr { background-color:#fff; height:2.5em; } #filestable tbody tr:hover, tbody tr:active { background-color: rgb(240,240,240); From d8770d1284cc64a6350d3f69a8c875b1dab14fc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 11:13:31 +0100 Subject: [PATCH 15/25] fix input element closing tag --- apps/files/templates/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index 1230d476095..5188ca56281 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -32,7 +32,7 @@
- > + />
@@ -50,7 +50,7 @@
class="hidden">t('Nothing in here. Upload something!'))?>
- + From a9a92892be7cbb7c0b9f5c9819203e2f6c724ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 11:15:04 +0100 Subject: [PATCH 16/25] remove unused variable --- apps/files_sharing/public.php | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 620e61c0344..23e147eecbe 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -159,7 +159,6 @@ if (isset($path)) { if ($linkItem['item_type'] !== 'folder') { $allowPublicUploadEnabled = false; } - $tmpl->assign('allowPublicUploadEnabled', $allowPublicUploadEnabled); $tmpl->assign('uploadMaxFilesize', $maxUploadFilesize); $tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); From a4895e4df111470a433520afc08a19961c4405e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 11:17:04 +0100 Subject: [PATCH 17/25] focus link text only on click in the input field - closes #6817 --- apps/files_sharing/js/public.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 31572f5ccf5..d95f6348ac0 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -56,6 +56,9 @@ $(document).ready(function() { }; }); - $('#directLink').focus(); + $(document).on('click', '#directLink', function() { + $(this).focus(); + $(this).select(); + }); }); From 37f8607a883ad1bac698da5f2e7ab7c362c2ef48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 11:24:34 +0100 Subject: [PATCH 18/25] remove background and width from multiselect bar, fix Download button not showing on mobile --- apps/files/css/files.css | 2 +- apps/files_sharing/css/public.css | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/files/css/files.css b/apps/files/css/files.css index eb009cf0a14..1de705fc5d5 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -145,7 +145,7 @@ table.multiselect thead th { } table.multiselect #headerName { position: relative; - width: 100%; + width: 9999px; /* when we use 100%, the styling breaks on mobile … table styling */ } table td.selection, table th.selection, table td.fileaction { width:2em; text-align:center; } table td.filename a.name { diff --git a/apps/files_sharing/css/public.css b/apps/files_sharing/css/public.css index f4c0ac0b7cc..0685f6fd957 100644 --- a/apps/files_sharing/css/public.css +++ b/apps/files_sharing/css/public.css @@ -72,9 +72,8 @@ p.info a { max-width:100%; } -thead{ - background-color: white; - padding-left:0 !important; /* fixes multiselect bar offset on shared page */ +thead { + padding-left: 0 !important; /* fixes multiselect bar offset on shared page */ } #data-upload-form { From a3b351738a7ccdd153fa06ba5dc5594e471f9124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 11:27:46 +0100 Subject: [PATCH 19/25] Instead of 'No preview available for ...' we simple display the mime-type icon --- apps/files_sharing/js/public.js | 9 +-------- apps/files_sharing/templates/public.php | 22 +++++++++------------- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index d95f6348ac0..730649c6378 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -15,14 +15,7 @@ $(document).ready(function() { if (mimetype.substr(0, mimetype.indexOf('/')) != 'image' && $('.publicpreview').length === 0) { // Trigger default action if not download TODO var action = FileActions.getDefault(mimetype, 'file', OC.PERMISSION_READ); - if (typeof action === 'undefined') { - $('#noPreview').show(); - if (mimetype != 'httpd/unix-directory') { - // NOTE: Remove when a better file previewer solution exists - $('#content').remove(); - $('table').remove(); - } - } else { + if (typeof action !== 'undefined') { action($('#filename').val()); } } diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index fb45401458f..652cd74eaff 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -16,7 +16,7 @@
t('shared by %s', array($_['displayName']))) ?>
- +
@@ -32,16 +32,10 @@
- +
- -
    -
  • - t('No preview available for').' '.$_['filename']); ?>
    -
  • -
-
-

- getLongFooter()); ?> -

-
+ + +
+

+ getLongFooter()); ?> +

+
From 916122b1664654a5486d300f0a7674d6ac6ce699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 11:29:39 +0100 Subject: [PATCH 20/25] fix multiselect bar being too short on big displays --- apps/files/css/files.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files/css/files.css b/apps/files/css/files.css index 1de705fc5d5..1c48d61c4e8 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -103,7 +103,7 @@ table td { } table th#headerName { position: relative; - width: 100em; /* not really sure why this works better than 100% … table styling */ + width: 9999px; /* not really sure why this works better than 100% … table styling */ padding: 0; } #headerName-container { From 4b1f93b61c084f507035fc89e86c0dca69242bbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 11:30:54 +0100 Subject: [PATCH 21/25] fix horizontal scrollbar appearing when footer is too long, footer wraps now --- apps/files_sharing/css/public.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/files_sharing/css/public.css b/apps/files_sharing/css/public.css index 0685f6fd957..4851f933d25 100644 --- a/apps/files_sharing/css/public.css +++ b/apps/files_sharing/css/public.css @@ -49,9 +49,8 @@ footer { p.info { color: #777; text-align: center; - width: 22em; margin: 0 auto; - padding: 20px; + padding: 20px 0; } p.info a { From 0992a77cfb683fcbe1bbf47ce7f1d7d6db465a8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 11:33:43 +0100 Subject: [PATCH 22/25] permanently show download action on mobile, only icon --- apps/files/js/fileactions.js | 4 ++-- apps/files_sharing/css/mobile.css | 23 +++++++++++++++++------ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 74bb711ef3d..9fea7f5145e 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -103,9 +103,9 @@ var FileActions = { } var html = '
'; if (img) { - html += ' '; + html += ''; } - html += t('files', name) + ''; + html += ' ' + t('files', name) + ''; var element = $(html); element.data('action', name); diff --git a/apps/files_sharing/css/mobile.css b/apps/files_sharing/css/mobile.css index 5928074bab8..8310fb87cb0 100644 --- a/apps/files_sharing/css/mobile.css +++ b/apps/files_sharing/css/mobile.css @@ -11,12 +11,7 @@ table td.date { /* restrict length of displayed filename to prevent overflow */ table td.filename .nametext { - max-width: 80% !important; -} -/* and to make room for download button on hover */ -table tr:hover td.filename .nametext, -table tr:focus td.filename .nametext { - max-width: 60% !important; + max-width: 75% !important; } /* on mobile, show single shared image at full width without margin */ @@ -26,5 +21,21 @@ table tr:focus td.filename .nametext { margin-bottom: 35px; } +/* always show actions on mobile */ +#fileList a.action { + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)" !important; + filter: alpha(opacity=20) !important; + opacity: .2 !important; + display: inline !important; +} +/* some padding for better clickability */ +#fileList a.action img { + padding: 0 6px 0 12px; +} +/* hide text of the actions on mobile */ +#fileList a.action span { + display: none; +} + } \ No newline at end of file From 0f97d9555c4c4fd970179c7c8491445ec0ae3520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 11:37:23 +0100 Subject: [PATCH 23/25] adjust file type icon placement for when no preview can be generated --- apps/files_sharing/css/mobile.css | 6 +++++- apps/files_sharing/css/public.css | 5 +++++ apps/files_sharing/templates/public.php | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/files_sharing/css/mobile.css b/apps/files_sharing/css/mobile.css index 8310fb87cb0..3312983b644 100644 --- a/apps/files_sharing/css/mobile.css +++ b/apps/files_sharing/css/mobile.css @@ -20,6 +20,10 @@ table td.filename .nametext { padding: 0; margin-bottom: 35px; } +/* some margin for the file type icon */ +#imgframe .publicpreview { + margin-top: 32px; +} /* always show actions on mobile */ #fileList a.action { @@ -38,4 +42,4 @@ table td.filename .nametext { } -} \ No newline at end of file +} diff --git a/apps/files_sharing/css/public.css b/apps/files_sharing/css/public.css index 4851f933d25..5f1cc524162 100644 --- a/apps/files_sharing/css/public.css +++ b/apps/files_sharing/css/public.css @@ -71,6 +71,11 @@ p.info a { max-width:100%; } +/* some margin for the file type icon */ +#imgframe .publicpreview { + margin-top: 10%; +} + thead { padding-left: 0 !important; /* fixes multiselect bar offset on shared page */ } diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index 652cd74eaff..1888b76bb07 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -34,7 +34,8 @@
- + +
From 23c015ba52d9cd0cf2ef7d98ad5c15cfd4a3cb55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Wed, 5 Feb 2014 11:38:21 +0100 Subject: [PATCH 24/25] adding class to header div: share-folder or share-file --- apps/files_sharing/templates/public.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index 1888b76bb07..3ddaf4446df 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -9,7 +9,7 @@ -