Improvements to payment and other misc items
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
var search = _.debounce(function(url,query,process){
|
||||
$.get(site_url+url,{term: query},function(data) {
|
||||
users = {};
|
||||
userLabels = [];
|
||||
|
||||
_.each(data,function(item,ix,list) {
|
||||
if (_.contains(users,item.label))
|
||||
item.label = item.label + ' #' + item.value;
|
||||
|
||||
userLabels.push(item.label);
|
||||
users[item.label] = item.value;
|
||||
});
|
||||
|
||||
process(userLabels);
|
||||
})
|
||||
}, 300);
|
||||
|
@@ -2,7 +2,7 @@ $(document).ready(function() {
|
||||
$("input[name=search-query]").typeahead({
|
||||
minLength: 2,
|
||||
source: function (query,process) {
|
||||
search (query,process);
|
||||
search('u/search/ajaxlist',query,process);
|
||||
},
|
||||
|
||||
matcher: function () { return true; },
|
||||
@@ -12,21 +12,3 @@ $(document).ready(function() {
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
var search = _.debounce(function( query, process ){
|
||||
$.get(site_url+"/u/search/ajaxlist", {term: query}, function (data) {
|
||||
users = {};
|
||||
userLabels = [];
|
||||
|
||||
_.each( data, function( item, ix, list ){
|
||||
if ( _.contains( users, item.label ) ){
|
||||
item.label = item.label + ' #' + item.value;
|
||||
}
|
||||
|
||||
userLabels.push( item.label );
|
||||
users[ item.label ] = item.value;
|
||||
});
|
||||
|
||||
process( userLabels );
|
||||
})
|
||||
}, 300);
|
||||
|
Reference in New Issue
Block a user