Commit bd901f47 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

typeahead replaced with autocomplete.js

parent 124f520a
......@@ -299,6 +299,21 @@
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
},
"autocomplete.js": {
"version": "0.36.0",
"resolved": "https://registry.npmjs.org/autocomplete.js/-/autocomplete.js-0.36.0.tgz",
"integrity": "sha512-jEwUXnVMeCHHutUt10i/8ZiRaCb0Wo+ZyKxeGsYwBDtw6EJHqEeDrq4UwZRD8YBSvp3g6klP678il2eeiVXN2Q==",
"requires": {
"immediate": "^3.2.3"
},
"dependencies": {
"immediate": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/immediate/-/immediate-3.2.3.tgz",
"integrity": "sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw="
}
}
},
"aws-sign2": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
......@@ -398,8 +413,7 @@
"bootstrap": {
"version": "3.3.7",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-3.3.7.tgz",
"integrity": "sha1-WjiTlFSfIzMIdaOxUGVldPip63E=",
"dev": true
"integrity": "sha1-WjiTlFSfIzMIdaOxUGVldPip63E="
},
"brace-expansion": {
"version": "1.1.8",
......
......@@ -38,6 +38,7 @@
"uglifyjs": "^2.4.10"
},
"dependencies": {
"autocomplete.js": "^0.36.0",
"bootstrap": "^3.3.7",
"csv-stringify": "^4.0.0",
"datatables.net": "^1.10.19",
......
......@@ -3,6 +3,8 @@
/* exported logger */
var $ = require('jquery');
var autocomplete = require('autocomplete.js');
var Promise = require("bluebird");
var AbstractDbOverlay = require('../../map/overlay/AbstractDbOverlay');
......@@ -60,17 +62,14 @@ AbstractDbPanel.prototype._createEventHandlers = function () {
}
};
$(searchInput).typeahead({
autocomplete(searchInput,{
minLength: 1,
hint: true,
highlight: true
hint: true
}, {
source: function (query, callback) {
callback(self.getAutocomplete(query.toLowerCase()));
}
});
$(searchInput).on('typeahead:select', function () {
}).on('autocomplete:selected', function() {
searchByQuery();
});
......
"use strict";
var Promise = require("bluebird");
var $ = require('jquery');
/* exported logger */
// noinspection JSUnusedLocalSymbols
......
"use strict";
var Promise = require("bluebird");
var $ = require('jquery');
/* exported logger */
var logger = require('../../logger');
......
"use strict";
var Promise = require("bluebird");
var $ = require('jquery');
/* exported logger */
......
"use strict";
var Promise = require("bluebird");
var $ = require('jquery');
/* exported logger */
......
"use strict";
var Promise = require("bluebird");
var $ = require('jquery');
/* exported logger */
var logger = require('../../logger');
......
"use strict";
require('../../mocha-config.js');
var $ = require('jquery');
var AbstractDbPanel = require('../../../../main/js/gui/leftPanel/AbstractDbPanel');
var PanelControlElementType = require('../../../../main/js/gui/PanelControlElementType');
......
"use strict";
require('../../mocha-config.js');
var $ = require('jquery');
var AbstractDbOverlay = require('../../../../main/js/map/overlay/AbstractDbOverlay');
var Alias = require('../../../../main/js/map/data/Alias');
......
"use strict";
require('../../mocha-config.js');
var $ = require('jquery');
var LeftPanel = require('../../../../main/js/gui/leftPanel/LeftPanel');
var IdentifiedElement = require('../../../../main/js/map/data/IdentifiedElement');
......
"use strict";
require("../mocha-config");
var $ = require('jquery');
var logger = require('../logger');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment