瀏覽代碼

Merge pull request #17414 from ankush/url_enhancements

fix: misc url/routing fixes
version-14
Ankush Menat 2 年之前
committed by GitHub
父節點
當前提交
93c2cb757f
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 2 個檔案被更改,包括 8 行新增2 行删除
  1. +5
    -1
      frappe/public/js/frappe/list/list_view.js
  2. +3
    -1
      frappe/public/js/frappe/views/reports/query_report.js

+ 5
- 1
frappe/public/js/frappe/list/list_view.js 查看文件

@@ -1456,7 +1456,11 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
on_update() {}

update_url_with_filters() {
window.history.replaceState(null, null, this.get_url_with_filters());
if (frappe.get_route_str() == this.page_name && !this.report_name) {
// only update URL if the route still matches current page.
// do not update if current list is a "saved report".
window.history.replaceState(null, null, this.get_url_with_filters());
}
}

get_url_with_filters() {


+ 3
- 1
frappe/public/js/frappe/views/reports/query_report.js 查看文件

@@ -58,7 +58,9 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
}

update_url_with_filters() {
window.history.replaceState(null, null, this.get_url_with_filters());
if (frappe.get_route_str() == this.page_name) {
window.history.replaceState(null, null, this.get_url_with_filters());
}
}

get_url_with_filters() {


Loading…
取消
儲存