1
0
Fork 0
forked from 0x2620/oxjs

several improvements to autocomplete

This commit is contained in:
rolux 2011-05-20 13:46:52 +02:00
commit d1477a057a
3 changed files with 33 additions and 17 deletions

View file

@ -404,7 +404,7 @@ Ox.print(options)
if (self.options.selected > -1) {
//Ox.print('s.o.s', self.options.selected, that.items)
item = that.items[self.options.selected]
item.removeClass('OxSelected');
item && item.removeClass('OxSelected');
/* disabled
that.triggerEvent('deselect', {
id: item.options('id'),
@ -422,12 +422,12 @@ Ox.print(options)
});
item.options('items').length && that.submenus[item.options('id')].showMenu(); // fixme: do we want to switch to this style?
item.addClass('OxSelected');
/* disabled
///* disabled
that.triggerEvent('select', {
id: item.options('id'),
title: Ox.stripTags(item.options('title')[0])
});
*/
//*/
}
self.options.selected = position;
}