Merge pull request #14931 from nextcloud/fix/files/grid-deleted-restore

Show comments and restore in popover menu
This commit is contained in:
John Molakvoæ 2019-04-02 21:00:34 +02:00 committed by GitHub
commit f2e9babaab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 27 additions and 20 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -29,7 +29,7 @@
*/
OCA.Comments.FilesPlugin = {
ignoreLists: [
'files_trashbin',
'trashbin',
'files.public'
],
@ -79,8 +79,18 @@
// register "comment" action for reading comments
fileList.fileActions.registerAction({
name: 'Comment',
displayName: t('comments', 'Comment'),
displayName: function(context) {
if (context && context.$file) {
var unread = parseInt(context.$file.data('comments-unread'), 10)
if (unread >= 0) {
return n('comments', '1 new comment', '{unread} new comments', unread, { unread: unread })
}
}
return t('comments', 'Comment')
},
mime: 'all',
order: -140,
iconClass: 'icon-comment',
permissions: OC.PERMISSION_READ,
type: OCA.Files.FileActions.TYPE_INLINE,
render: function(actionSpec, isDefault, context) {

View File

@ -920,19 +920,8 @@ table.dragshadow td.size {
align-items: center;
justify-content: center;
&.action.action-share.permanent {
display: none;
}
/* In "Deleted files", do not show "Restore" text next to icon as there is no space */
&.action-restore.permanent span {
&:not(.icon) {
display: none;
}
}
/* If there is a comment, show it instead of the share icon */
&.action-comment ~ .action-share {
// hide all actions in grid view that are not the menu
&:not(.action-menu) {
display: none;
}
}
@ -949,6 +938,14 @@ table.dragshadow td.size {
border-radius: 50%;
}
}
// force show the sharing entry in the dropdown menu
.action-restore-container.hidden {
display: block !important;
}
// force show the sharing entry in the dropdown menu
.action-comment-container.hidden {
display: block !important;
}
}
form {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -22,7 +22,7 @@
*/
OCA.SystemTags.FilesPlugin = {
ignoreLists: [
'files_trashbin',
'trashbin',
'files.public'
],