Updates from lnApp

This commit is contained in:
Deon George
2014-02-23 14:54:35 +11:00
parent e2b84fc063
commit 8301c0f6af
10 changed files with 13 additions and 317 deletions

View File

@@ -1,16 +0,0 @@
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);

View File

@@ -1,14 +0,0 @@
$(document).ready(function() {
$("input[name=search-query]").typeahead({
minLength: 2,
source: function (query,process) {
search('u/search/ajaxlist',query,process);
},
matcher: function () { return true; },
updater: function (item) {
window.parent.location.href = site_url+users[item];
},
});
});