summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2013-04-24 10:55:38 -0700
committerLukas Reschke <lukas@statuscode.ch>2013-04-24 10:55:38 -0700
commit1ee224d8cbaf66d38858d5ec59d5f083052deb4d (patch)
tree438a0ec51b36099b8f4793c636e5d202aa330317 /apps/files/js
parent063e1238bfa446961032a74b7e9851b0b52e738d (diff)
parentab7fcebeb38f6515ae584fc110cbfd8306ead5e3 (diff)
downloadnextcloud-server-1ee224d8cbaf66d38858d5ec59d5f083052deb4d.tar.gz
nextcloud-server-1ee224d8cbaf66d38858d5ec59d5f083052deb4d.zip
Merge pull request #3108 from owncloud/fileactions-order
Files: fix the order fileactions are computed for a file
Diffstat (limited to 'apps/files/js')
-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 = {};