aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/fileactionsmenu.js
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-03-14 18:01:44 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-03-21 08:14:16 +0100
commit4ad922d4f6ea7f08c54223587964bb93ae064ce5 (patch)
tree25302403d16af2fbea98d47129408cd13776d7d4 /apps/files/js/fileactionsmenu.js
parent6ea5beccd7f74bb13fdec02b5720e1ef2a5652f2 (diff)
downloadnextcloud-server-4ad922d4f6ea7f08c54223587964bb93ae064ce5.tar.gz
nextcloud-server-4ad922d4f6ea7f08c54223587964bb93ae064ce5.zip
Show sharing in menu in grid view
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/js/fileactionsmenu.js')
-rw-r--r--apps/files/js/fileactionsmenu.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/files/js/fileactionsmenu.js b/apps/files/js/fileactionsmenu.js
index c3cd8bf8b70..16c4cc0d784 100644
--- a/apps/files/js/fileactionsmenu.js
+++ b/apps/files/js/fileactionsmenu.js
@@ -84,10 +84,7 @@
);
var items = _.filter(actions, function(actionSpec) {
- return (
- actionSpec.type === OCA.Files.FileActions.TYPE_DROPDOWN &&
- (!defaultAction || actionSpec.name !== defaultAction.name)
- );
+ return !defaultAction || actionSpec.name !== defaultAction.name;
});
items = _.map(items, function(item) {
if (_.isFunction(item.displayName)) {
@@ -99,6 +96,12 @@
item = _.extend({}, item);
item.iconClass = item.iconClass(fileName, self._context);
}
+ if (_.isFunction(item.icon)) {
+ var fileName = self._context.$file.attr('data-file');
+ item = _.extend({}, item);
+ item.icon = item.icon(fileName, self._context);
+ }
+ item.inline = item.type === OCA.Files.FileActions.TYPE_INLINE
return item;
});
items = items.sort(function(actionA, actionB) {
@@ -109,6 +112,7 @@
}
return orderA - orderB;
});
+
items = _.map(items, function(item) {
item.nameLowerCase = item.name.toLowerCase();
return item;