Cleanup. re #34

This commit is contained in:
Sébastien Lucas 2013-10-15 19:07:46 +02:00
parent e2838ee3d9
commit a836be6507

View file

@ -257,7 +257,6 @@ function updatePage (data) {
$("#sortForm").hide ();
}
//$('input[name=query]').typeahead('destroy');
$('input[name=query]').typeahead([
{
name: 'search',
@ -276,11 +275,6 @@ function updatePage (data) {
]);
$('input[name=query]').bind('typeahead:selected', function(obj, datum) {
//alert(JSON.stringify(obj)); // object
// outputs, e.g., {"type":"typeahead:selected","timeStamp":1371822938628,"jQuery19105037956037711017":true,"isTrigger":true,"namespace":"","namespace_re":null,"target":{"jQuery19105037956037711017":46},"delegateTarget":{"jQuery19105037956037711017":46},"currentTarget":
//alert(JSON.stringify(datum)); // contains datum value, tokens and custom fields
// outputs, e.g., {"redirect_url":"http://localhost/test/topic/test_topic","image_url":"http://localhost/test/upload/images/t_FWnYhhqd.jpg","description":"A test description","value":"A test value","tokens":["A","test","value"]}
// in this case I created custom fields called 'redirect_url', 'image_url', 'description'
navigateTo (datum.navlink);
});
}