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:
jerrybai2009 2016-02-28 18:32:02 -08:00
commit 2c88b74c52
2 changed files with 23 additions and 2 deletions

View File

@ -32,6 +32,19 @@
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){
$('#searchInput').autocomplete({
source: function(request, response) {

View File

@ -852,7 +852,10 @@ body .ui-tooltip {
----------------------------------*/
.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:link,
.ui-state-default a:visited {
@ -863,7 +866,9 @@ body .ui-tooltip {
.ui-widget-header .ui-state-hover,
.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:hover,
.ui-state-hover a:link,
@ -876,6 +881,9 @@ body .ui-tooltip {
}
.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:link,
.ui-state-active a:visited {