@@ -104,10 +104,12 @@ $('#civicrm-menu').ready(function() {
104
104
CRM.api3(' contact' , ' getquick' , params).done(function(result) {
105
105
var ret = [];
106
106
if (result.values.length > 0) {
107
+ $(' #sort_name_navigation' ).autocomplete(' widget' ).menu(' option' , ' disabled' , false );
107
108
$.each(result.values, function(k, v) {
108
109
ret.push({ value: v.id, label: v.data} );
109
110
} );
110
111
} else {
112
+ $(' #sort_name_navigation' ).autocomplete(' widget' ).menu(' option' , ' disabled' , true );
111
113
ret.push({ value: ' 0' , label: { /literal } ' { ts escape= ' js' } None found.{ /ts} ' {literal }});
112
114
}
113
115
response(ret);
@@ -119,14 +121,14 @@ $('#civicrm-menu').ready(function() {
119
121
select: function (event, ui) {
120
122
if (ui.item.value > 0) {
121
123
document.location = CRM.url(' civicrm/contact/view' , { reset: 1, cid: ui.item.value} );
122
- } else {
123
- document.location = CRM.url(' civicrm/contact/search/advanced' , { reset: 1} );
124
124
}
125
125
return false ;
126
126
} ,
127
127
create: function() {
128
128
// Place menu in front
129
- $(this).autocomplete(' widget' ).css(' z-index' , $(' #civicrm-menu' ).css(' z-index' ));
129
+ $(this).autocomplete(' widget' )
130
+ .addClass(' crm-quickSearch-results' )
131
+ .css(' z-index' , $(' #civicrm-menu' ).css(' z-index' ));
130
132
}
131
133
})
132
134
.keydown(function() {
0 commit comments