From 78056a3bef15c04af19b256915415f413cb561f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Tue, 20 Nov 2018 12:20:06 +0100 Subject: [PATCH] Fix whitespace and file action cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files/js/fileactions.js | 19 +++++++++---------- apps/files_sharing/js/public.js | 3 ++- .../tests/specs/sharedialoglinkshareview.js | 2 +- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 10fedc8828..2981fb64c1 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -362,17 +362,16 @@ // remove previous $tr.find('.action-menu').remove(); - if (this.actions.length > 0) { - var $el = this._renderInlineAction({ - name: 'menu', - displayName: '', - iconClass: 'icon-more', - altText: t('files', 'Actions'), - action: this._showMenuClosure - }, false, context); + var $el = this._renderInlineAction({ + name: 'menu', + displayName: '', + iconClass: 'icon-more', + altText: t('files', 'Actions'), + action: this._showMenuClosure + }, false, context); + + $el.addClass('permanent'); - $el.addClass('permanent'); - } }, /** diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 57001c495d..d339ae1dcb 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -209,7 +209,7 @@ OCA.Sharing.PublicApp = { // Remove the link. This means that files without a default action fail hard $tr.find('a.name').attr('href', '#'); - delete this.fileActions.actions.all.Download; + this.fileActions.actions.all = {}; } return $tr; }; @@ -299,6 +299,7 @@ OCA.Sharing.PublicApp = { if (hideDownload === 'true') { this.fileList.$el.find('#headerSelection').remove(); + this.fileList.$el.find('.summary').find('td:first-child').remove(); } } diff --git a/core/js/tests/specs/sharedialoglinkshareview.js b/core/js/tests/specs/sharedialoglinkshareview.js index 0272b07297..9e6c67dca1 100644 --- a/core/js/tests/specs/sharedialoglinkshareview.js +++ b/core/js/tests/specs/sharedialoglinkshareview.js @@ -114,7 +114,7 @@ describe('OC.Share.ShareDialogLinkShareView', function () { $hideDownloadCheckbox = view.$el.find('.hideDownloadCheckbox'); - expect($hideDownloadCheckbox.length).toBeFalsy(); + expect($hideDownloadCheckbox.length).toBeTruthy(); }); it('checkbox is checked when the setting is enabled', function () {