Browse Source

fix(type ahead): fixed highlight, and made the highlight more distinct, also rolled back #2436 due to its issues on linux and windows, fixes #2527

Torkel Ödegaard 10 years ago
parent
commit
bf5081ec8c
3 changed files with 9 additions and 2 deletions
  1. 4 0
      public/css/less/grafana.less
  2. 1 1
      public/css/less/type.less
  3. 4 1
      public/vendor/bootstrap/bootstrap.js

+ 4 - 0
public/css/less/grafana.less

@@ -386,3 +386,7 @@
     padding: 80px 0;
   }
 }
+
+.typeahead strong {
+  color: @yellow;
+}

+ 1 - 1
public/css/less/type.less

@@ -23,7 +23,7 @@ p {
 // Ex: 14px base font * 85% = about 12px
 small   { font-size: 85%; }
 
-strong  { font-weight: 500; }
+strong  { font-weight: bold; }
 em      { font-style: italic; color: @headingsColor; }
 cite    { font-style: normal; }
 

+ 4 - 1
public/vendor/bootstrap/bootstrap.js

@@ -1993,9 +1993,12 @@
 
   , highlighter: function (item) {
       var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
+      if (!query) {
+        return item;
+      }
       return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
         return '<strong>' + match + '</strong>'
-      })
+      });
     }
 
   , render: function (items) {