diff options
author | Robin Appelman <icewind@owncloud.com> | 2013-04-24 15:26:36 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2013-04-24 15:26:36 +0200 |
commit | ab7fcebeb38f6515ae584fc110cbfd8306ead5e3 (patch) | |
tree | e770a2f371a4201df351912da33aab64bbd13d9f /apps/files/js/fileactions.js | |
parent | b1c9b296e809f1a1ebc1283013138f4f5cfc0141 (diff) | |
download | nextcloud-server-ab7fcebeb38f6515ae584fc110cbfd8306ead5e3.tar.gz nextcloud-server-ab7fcebeb38f6515ae584fc110cbfd8306ead5e3.zip |
Files: fix the order fileactions are computed for a file
Diffstat (limited to 'apps/files/js/fileactions.js')
-rw-r--r-- | apps/files/js/fileactions.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index f3264da5a12..a77add141a1 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 = {}; |