fix: Allow to open folders that are nested inside 2 folders

This commit is contained in:
Suraj Shetty 2021-07-07 17:58:45 +05:30
parent d25252b1e1
commit 121ae7e36b
2 changed files with 5 additions and 5 deletions

View file

@ -171,8 +171,8 @@ frappe.router = {
} else {
standard_route = ['List', doctype_route.doctype, frappe.utils.to_title_case(route[2])];
if (route[3]) {
// calendar / kanban / dashboard name
standard_route.push(route[3]);
// calendar / kanban / dashboard / folder name
standard_route.push(...route.splice(3, route.length));
}
}
return standard_route;
@ -297,8 +297,8 @@ frappe.router = {
if (route[2] && route[2] !== 'list' && !$.isPlainObject(route[2])) {
new_route = [this.slug(route[1]), 'view', route[2].toLowerCase()];
// calendar / inbox
if (route[3]) new_route.push(route[3]);
// calendar / inbox / file folder
if (route[3]) new_route.push(...route.slice(3, route.length));
} else {
if ($.isPlainObject(route[2])) {
frappe.route_options = route[2];

View file

@ -315,7 +315,7 @@ frappe.views.FileView = class FileView extends frappe.views.ListView {
acc += "/" + curr;
}
return acc;
}, "/app/file");
}, "/app/file/view");
return `<a href="${route}">${folder}</a>`;
})