diff options
Diffstat (limited to 'apps/files/js/fileactionsmenu.js')
-rw-r--r-- | apps/files/js/fileactionsmenu.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files/js/fileactionsmenu.js b/apps/files/js/fileactionsmenu.js index 67cbb48c965..9e51d8f1f1f 100644 --- a/apps/files/js/fileactionsmenu.js +++ b/apps/files/js/fileactionsmenu.js @@ -81,6 +81,7 @@ * Renders the menu with the currently set items */ render: function() { + var self = this; var fileActions = this._context.fileActions; var actions = fileActions.getActions( fileActions.getCurrentMimeType(), @@ -100,6 +101,13 @@ (!defaultAction || actionSpec.name !== defaultAction.name) ); }); + items = _.map(items, function(item) { + if (_.isFunction(item.displayName)) { + item = _.extend({}, item); + item.displayName = item.displayName(self._context); + } + return item; + }); items = items.sort(function(actionA, actionB) { var orderA = actionA.order || 0; var orderB = actionB.order || 0; |