]> _ Git - fluidbook-html5.git/commitdiff
wip #2251 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 2 Oct 2018 12:15:13 +0000 (14:15 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 2 Oct 2018 12:15:13 +0000 (14:15 +0200)
js/libs/fluidbook/fluidbook.search.js
js/libs/fluidbook/special/wescosales.js

index 111809012aa57380ba4c2b3a15ec0a237437147f..f76cb1e88ac4bb15dd5bd9bcb45a39b64e6a4aec 100644 (file)
@@ -88,8 +88,6 @@ FluidbookSearch.prototype = {
             res.push([k, v.t]);
         }
 
-        console.log(res);
-
         for (var p in this.plugins) {
             var plugin = this.plugins[p];
             var h = plugin.getHints(q);
@@ -457,9 +455,11 @@ FluidbookSearch.prototype = {
         $.each(hints, function (k, v) {
             var termType = 'word';
             if (v.length > 2) {
-                termType = v[2];
+                label = v[2];
+            } else {
+                label = v[0];
             }
-            $this.menuSearchHints.append('<a class="hint" term="' + v[0] + '" href="#/search/' + v[0] + '">' + v[0] + '</a>');
+            $this.menuSearchHints.append('<a class="hint" term="' + v[0] + '" href="#/search/' + v[0] + '">' + label + '</a>');
         });
         var qoffset = $("#q").offset();
         var top = qoffset.top + $("#q").outerHeight() + 5;
index 27eeea8abc3e265272fa6ad81481f4633d18f12c..dfad2d71479772ff4755be0cccdb7c2edf26d86b 100644 (file)
@@ -326,7 +326,7 @@ WescoSalesSearchPlugin.prototype = {
         var res = [];
         $.each(all, function (k, v) {
             if (v.indexOf(q) === 0) {
-                res.push([v, 100000, 'ref']);
+                res.push([v, 100000, v + " : " + getWescoRef(v).title]);
             }
         });