[minor] awesome bar trigger if trying to search in current list view. Fixes frappe/erpnext#4616

This commit is contained in:
Anand Doshi 2016-01-14 17:03:23 +05:30
parent 31297959c8
commit 4e3485f616
2 changed files with 9 additions and 1 deletions

View file

@ -165,11 +165,13 @@ body {
min-width: 24px;
height: 24px;
border-radius: 4px;
background-color: #ff5858;
color: #fff;
text-align: center;
padding: 2px 5px;
}
.navbar-new-comments-true {
background-color: #ff5858;
}
#navbar-search {
width: 300px;
background-color: rgba(255, 255, 255, 0.9);

View file

@ -40,7 +40,13 @@ frappe.search = {
if(ui.item.onclick) {
ui.item.onclick(ui.item.match);
} else {
var previous_hash = window.location.hash;
frappe.set_route(ui.item.route);
// hashchange didn't fire!
if (window.location.hash == previous_hash) {
frappe.route();
}
}
$(this).val('');
return false;