Using other events (e.g. 'click') is not kosher as the event is
triggered long before the file is picked, the alternative is to use
the File API and regularly check the file in the input to see if it's
been altered (by storing a crc) and re-pushing it if the hash is
different. Of course this has other issues (risks catching the file
mid-edition...)
A third alternative is, once a file has been uploaded, to clear and
re-insert the corresponding file input. This means the file input will
*always* be empty
bzr revid: xmo@openerp.com-20121010101836-qtqmcc5n5zblgmcp
* jQuery autocomplete requires complex hacks to work out and look
select-ish
* select2 is more straightforward to use for people
expecting <select> as it's styled similarly to a (non-standard)
select
* select2 includes built-in support for groups, no need to hack it via
interspersed fake options
* select2 provides a nice [x] button to remove the current choice
without having to e.g. manually remove the content of the input
Why select2 instead of Chosen? Because Chosen isn't really setup to
work from array data, it wants selects serialized in the DOM, and
while the webkit bug I'd identified previously (see web client
revid:xmo@openerp.com-20110922085812-3u1esk6czraskm01) seems fixed in
the very latest webkits, it's still present in e.g. Safari 5.1 which
I'm using. So there.
And chosen's APIDoc is almost as bad as OpenERP's.
bzr revid: xmo@openerp.com-20120906103516-h94e6hd76w41bmyx