Show comments and restore in popover menu

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2019-04-02 11:33:20 +02:00
parent 021751658e
commit b38445b17a
No known key found for this signature in database
GPG key ID: 60C25B8C072916CF
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'
],