]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix whitespace and file action cleanup 12531/head
authorJulius Härtl <jus@bitgrid.net>
Tue, 20 Nov 2018 11:20:06 +0000 (12:20 +0100)
committerRoeland Jago Douma <roeland@famdouma.nl>
Tue, 20 Nov 2018 18:46:49 +0000 (19:46 +0100)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/files/js/fileactions.js
apps/files_sharing/js/public.js
core/js/tests/specs/sharedialoglinkshareview.js

index 10fedc882882f98121dc8451ad608e3397293d22..2981fb64c110635273e8d79d0e6f068c5a9d41cb 100644 (file)
                        // 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);
-
-                               $el.addClass('permanent');
-                       }
+                       var $el = this._renderInlineAction({
+                               name: 'menu',
+                               displayName: '',
+                               iconClass: 'icon-more',
+                               altText: t('files', 'Actions'),
+                               action: this._showMenuClosure
+                       }, false, context);
+
+                       $el.addClass('permanent');
+
                },
 
                /**
index 57001c495d314c07dd246d089fa42e3e02d60df5..d339ae1dcb4e1c61684a5a2adf2e3597f2bdee98 100644 (file)
@@ -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();
                        }
                }
 
index 0272b07297ea002489ffac6849ac2a75fc9bcb1f..9e6c67dca14a5a93598ec100395366384b8c7661 100644 (file)
@@ -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 () {