summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files/js/fileactions.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js
index 264a86adb7b..14fca6f1482 100644
--- a/apps/files/js/fileactions.js
+++ b/apps/files/js/fileactions.js
@@ -22,18 +22,18 @@ var FileActions = {
if (FileActions.actions.all) {
actions = $.extend(actions, FileActions.actions.all);
}
- if (mime) {
- if (FileActions.actions[mime]) {
- actions = $.extend(actions, FileActions.actions[mime]);
+ if (type) {//type is 'dir' or 'file'
+ if (FileActions.actions[type]) {
+ actions = $.extend(actions, FileActions.actions[type]);
}
+ }
+ if (mime) {
var mimePart = mime.substr(0, mime.indexOf('/'));
if (FileActions.actions[mimePart]) {
actions = $.extend(actions, FileActions.actions[mimePart]);
}
- }
- if (type) {//type is 'dir' or 'file'
- if (FileActions.actions[type]) {
- actions = $.extend(actions, FileActions.actions[type]);
+ if (FileActions.actions[mime]) {
+ actions = $.extend(actions, FileActions.actions[mime]);
}
}
var filteredActions = {};