aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/fileactions.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r--apps/files/js/fileactions.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index 24f8279116d..404b6f1877e 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -257,13 +257,26 @@
},
/**
+ * Returns the default file action handler for the current file
+ *
+ * @return {OCA.Files.FileActions~actionSpec} action spec
+ * @since 8.2
+ */
+ getCurrentDefaultFileAction: function() {
+ var mime = this.getCurrentMimeType();
+ var type = this.getCurrentType();
+ var permissions = this.getCurrentPermissions();
+ return this.getDefaultFileAction(mime,type, permissions);
+ },
+
+ /**
* Returns the default file action handler for the given conditions
*
* @param {string} mime mime type
* @param {string} type "dir" or "file"
* @param {int} permissions permissions
*
- * @return {OCA.Files.FileActions~actionHandler} action handler
+ * @return {OCA.Files.FileActions~actionSpec} action spec
* @since 8.2
*/
getDefaultFileAction: function(mime, type, permissions) {