Parcourir la source

New Document in search bar is case sensitive (#3504)

* makes `get_creatables` change keywords to lowercase before comparison

* fixed codacy issues

* Update search_utils.js
version-14
tundebabzy il y a 8 ans
committed by Rushabh Mehta
Parent
révision
323e70db33
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. +2
    -1
      frappe/public/js/frappe/ui/toolbar/search_utils.js

+ 2
- 1
frappe/public/js/frappe/ui/toolbar/search_utils.js Voir le fichier

@@ -103,7 +103,8 @@ frappe.search.utils = {
get_creatables: function(keywords) {
var me = this;
var out = [];
if(keywords.split(" ")[0]==="new") {
var firstKeyword = keywords.split(" ")[0];
if(firstKeyword.toLowerCase() === __("new")) {
frappe.boot.user.can_create.forEach(function (item) {
var level = me.fuzzy_search(keywords.substr(4), item);
if(level) {


Chargement…
Annuler
Enregistrer