Skip to content

Commit

Permalink
Fixes for autocomplete search
Browse files Browse the repository at this point in the history
  • Loading branch information
kohsah committed Oct 26, 2017
1 parent 15e7535 commit 31ab09b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
19 changes: 19 additions & 0 deletions themes/design1/resources/css-custom/app-custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,23 @@
{
border: none !important;
background-color: red;
}

/*
.ui-state-focus, .ui-state-hover .ui-state-highlight
{
color:White;
background:#96B202 !important;
outline:none;
}
*/

.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active,
a.ui-button:active,
.ui-button:active,
.ui-button.ui-state-active:hover {
color:White;
background: rgb(250, 244, 244) !important;
}
11 changes: 10 additions & 1 deletion themes/design1/resources/js/searchac.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ $(function () {

$("#search").catcomplete({
'minLength':3,
autoFocus: true,
'source': function(request, response) {
$.ajax({
url: '/gw/service/searchac/',
Expand All @@ -58,7 +59,7 @@ $(function () {
},

'select': function(event, ui) {
location.href = 'document.html?iri=' + ui.item.exprAbstract['expr-iri']
location.href = 'document.html?iri=' + ui.item.exprAbstract['expr-iri'];
return false;
}
})
Expand Down Expand Up @@ -88,5 +89,13 @@ $(function () {
.append(resultRow.join(''))
.appendTo(ul);
};
// check for invalid enter key press
$("#search").keydown(function(event){
if(event.keyCode == 13) {
event.preventDefault();
event.stopPropagation();
return false;
}
});

});

0 comments on commit 31ab09b

Please sign in to comment.