浏览代码

Merge pull request #2855 from pratu16x7/search-fixes

Revert to search table name field
version-14
Nabin Hait 8 年前
committed by GitHub
父节点
当前提交
9414bec421
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. +5
    -5
      frappe/public/js/frappe/ui/toolbar/search.js

+ 5
- 5
frappe/public/js/frappe/ui/toolbar/search.js 查看文件

@@ -364,7 +364,7 @@ frappe.search.GlobalSearch = Class.extend({
},

format_result: function(result) {
var name, route = '#Form/' + result.doctype + '/' + result.title;
var name, route = '#Form/' + result.doctype + '/' + result.name;
var description = this.get_finds(result.content, this.keywords);
if(result.doctype === "Communication") {
if(description.indexOf(',') === -1) {
@@ -373,7 +373,7 @@ frappe.search.GlobalSearch = Class.extend({
name = description.slice(description.indexOf(':') + 8, description.indexOf(','));
}
} else {
name = result.title;
name = result.name;
}
return [route, this.bold_keywords(name), description];
},
@@ -544,9 +544,9 @@ frappe.search.GlobalSearch = Class.extend({

var make_option = function(data) {
return {
label: __("{0}: {1}", [__(data.doctype).bold(), data.title]),
value: __("{0}: {1}", [__(data.doctype), data.title]),
route: ["Form", data.doctype, data.title],
label: __("{0}: {1}", [__(data.doctype).bold(), data.name]),
value: __("{0}: {1}", [__(data.doctype), data.name]),
route: ["Form", data.doctype, data.name],
match: data.doctype,
index: 60,
default: "Global",


正在加载...
取消
保存