mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-15 10:57:58 +00:00
Merge pull request #45 from jerrybai2009/master
DSS-3974, UI: general search and advanced search: type ahead highlight, enter key action
This commit is contained in:
commit
2c88b74c52
@ -32,6 +32,19 @@
|
|||||||
return split( term ).pop();
|
return split( term ).pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$("#searchInput").on( "keydown", function(event) {
|
||||||
|
if(event.which == 13)
|
||||||
|
{
|
||||||
|
var inputObj = $('#searchInput');
|
||||||
|
if (inputObj) {
|
||||||
|
var keyword = inputObj.val();
|
||||||
|
if (keyword) {
|
||||||
|
window.location = '/#/search?keywords=' + keyword + '&category=Dataset&source=all&page=1';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$.get('/api/v1/autocomplete/search', function(data){
|
$.get('/api/v1/autocomplete/search', function(data){
|
||||||
$('#searchInput').autocomplete({
|
$('#searchInput').autocomplete({
|
||||||
source: function(request, response) {
|
source: function(request, response) {
|
||||||
|
@ -852,7 +852,10 @@ body .ui-tooltip {
|
|||||||
----------------------------------*/
|
----------------------------------*/
|
||||||
.ui-state-default,
|
.ui-state-default,
|
||||||
.ui-widget-content .ui-state-default,
|
.ui-widget-content .ui-state-default,
|
||||||
|
.ui-widget-header .ui-state-default {
|
||||||
|
font-weight: bold;
|
||||||
|
color: grey;
|
||||||
|
}
|
||||||
.ui-state-default a,
|
.ui-state-default a,
|
||||||
.ui-state-default a:link,
|
.ui-state-default a:link,
|
||||||
.ui-state-default a:visited {
|
.ui-state-default a:visited {
|
||||||
@ -863,7 +866,9 @@ body .ui-tooltip {
|
|||||||
.ui-widget-header .ui-state-hover,
|
.ui-widget-header .ui-state-hover,
|
||||||
.ui-state-focus,
|
.ui-state-focus,
|
||||||
.ui-widget-content .ui-state-focus,
|
.ui-widget-content .ui-state-focus,
|
||||||
|
.ui-widget-header .ui-state-focus {
|
||||||
|
background: lightgray;
|
||||||
|
}
|
||||||
.ui-state-hover a,
|
.ui-state-hover a,
|
||||||
.ui-state-hover a:hover,
|
.ui-state-hover a:hover,
|
||||||
.ui-state-hover a:link,
|
.ui-state-hover a:link,
|
||||||
@ -876,6 +881,9 @@ body .ui-tooltip {
|
|||||||
}
|
}
|
||||||
.ui-state-active,
|
.ui-state-active,
|
||||||
.ui-widget-content .ui-state-active,
|
.ui-widget-content .ui-state-active,
|
||||||
|
.ui-widget-header .ui-state-active {
|
||||||
|
background: lightgray;
|
||||||
|
}
|
||||||
.ui-state-active a,
|
.ui-state-active a,
|
||||||
.ui-state-active a:link,
|
.ui-state-active a:link,
|
||||||
.ui-state-active a:visited {
|
.ui-state-active a:visited {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user