Skip to content

Commit

Permalink
Fix whitespace and file action cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliusknorr authored and rullzer committed Nov 20, 2018
1 parent fc99811 commit 78056a3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
21 changes: 10 additions & 11 deletions apps/files/js/fileactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

$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');

},

/**
Expand Down
3 changes: 2 additions & 1 deletion apps/files_sharing/js/public.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down Expand Up @@ -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();
}
}

Expand Down
2 changes: 1 addition & 1 deletion core/js/tests/specs/sharedialoglinkshareview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down

0 comments on commit 78056a3

Please sign in to comment.