Skip to content
Snippets Groups Projects
Commit ab7fcebe authored by Robin Appelman's avatar Robin Appelman
Browse files

Files: fix the order fileactions are computed for a file

parent b1c9b296
No related branches found
No related tags found
No related merge requests found
......@@ -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 = {};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment