mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 08:16:43 -04:00
Add link icon for public link too
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
4c884f1b23
commit
ff164db935
5 changed files with 14 additions and 10 deletions
|
|
@ -113,8 +113,11 @@ describe('OCA.Files.FileActionsMenu tests', function() {
|
|||
it('does not render default actions', function() {
|
||||
expect(menu.$el.find('a[data-action=Testdefault]').length).toEqual(0);
|
||||
});
|
||||
it('does not render inline actions', function() {
|
||||
expect(menu.$el.find('a[data-action=Testinline]').length).toEqual(0);
|
||||
it('render inline actions', function() {
|
||||
expect(menu.$el.find('a[data-action=Testinline]').length).toEqual(1);
|
||||
});
|
||||
it('render inline actions but it is hidden', function() {
|
||||
expect(menu.$el.find('a[data-action=Testinline]').parent().hasClass('hidden')).toEqual(true);
|
||||
});
|
||||
it('only renders actions relevant to the mime type', function() {
|
||||
fileActions.registerAction({
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -178,7 +178,8 @@
|
|||
permissions: OC.PERMISSION_ALL,
|
||||
iconClass: function(fileName, context) {
|
||||
var shareType = parseInt(context.$file.data('share-types'), 10)
|
||||
if (shareType === OC.Share.SHARE_TYPE_EMAIL) {
|
||||
if (shareType === OC.Share.SHARE_TYPE_EMAIL
|
||||
|| shareType === OC.Share.SHARE_TYPE_LINK) {
|
||||
return 'icon-public'
|
||||
}
|
||||
return 'icon-shared'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
/**
|
||||
* Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>
|
||||
*
|
||||
* This file is licensed under the Affero General Public License version 3
|
||||
|
|
@ -149,7 +149,7 @@ describe('OCA.Sharing.Util tests', function() {
|
|||
expect($action.find('.icon').hasClass('icon-public')).toEqual(true);
|
||||
expect(OC.basename(getImageUrl($tr.find('.filename .thumbnail')))).toEqual('folder-public.svg');
|
||||
});
|
||||
it('shows owner name when owner is available', function() {
|
||||
it('shows owner name when owner is available but no icons', function() {
|
||||
var $action, $tr;
|
||||
fileList.setFiles([{
|
||||
id: 1,
|
||||
|
|
@ -167,7 +167,7 @@ describe('OCA.Sharing.Util tests', function() {
|
|||
$tr = fileList.$el.find('tbody tr:first');
|
||||
$action = $tr.find('.action-share');
|
||||
expect($action.find('>span').text().trim()).toEqual('Shared by User One');
|
||||
expect($action.find('.icon').hasClass('icon-shared')).toEqual(true);
|
||||
expect($action.find('.icon').hasClass('icon-shared')).toEqual(false);
|
||||
expect($action.find('.icon').hasClass('icon-public')).toEqual(false);
|
||||
expect(OC.basename(getImageUrl($tr.find('.filename .thumbnail')))).toEqual('folder-shared.svg');
|
||||
});
|
||||
|
|
@ -389,7 +389,7 @@ describe('OCA.Sharing.Util tests', function() {
|
|||
});
|
||||
|
||||
expect($action.find('>span').text().trim()).toEqual('Shared by User One');
|
||||
expect($action.find('.icon').hasClass('icon-shared')).toEqual(true);
|
||||
expect($action.find('.icon').hasClass('icon-shared')).toEqual(false);
|
||||
expect($action.find('.icon').hasClass('icon-public')).toEqual(false);
|
||||
});
|
||||
it('keep share text after unsharing reshare', function() {
|
||||
|
|
@ -422,7 +422,7 @@ describe('OCA.Sharing.Util tests', function() {
|
|||
expect($tr.attr('data-share-recipient-data')).not.toBeDefined();
|
||||
|
||||
expect($action.find('>span').text().trim()).toEqual('Shared by User One');
|
||||
expect($action.find('.icon').hasClass('icon-shared')).toEqual(true);
|
||||
expect($action.find('.icon').hasClass('icon-shared')).toEqual(false);
|
||||
expect($action.find('.icon').hasClass('icon-public')).toEqual(false);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue