Thanks! I finally managed to subclass LookupInputWidget properly. The suggestions menu is overlaid by other text input widgets, but it works.
Il 10/01/2015 17:15, Jon Robson ha scritto:
I recently hit the exact same issue. It's a useful widget but has no demos (see https://phabricator.wikimedia.org/T85467)
Luckily after a week of fiddling Florian and I have two demos that are working. The code in the following patches should help you work out.
I understand that Andrew Garret is setting up a demo site. I wonder if during the dev summit we could get s demo for this done and on it?
https://gerrit.wikimedia.org/r/181225 https://gerrit.wikimedia.org/r/180880 On 10 Jan 2015 04:37, "Ricordisamoa" ricordisamoa@openmailbox.org wrote:
Thanks. I eventually managed to use ProcessDialog and several widgets in a script of mine https://it.wikipedia.org/wiki/Utente:Ricordisamoa/PDC.js. I just couldn't make LookupInputWidget work (phab:T85467 < https://phabricator.wikimedia.org/T85467%3E, mw:Talk:OOjs UI#OO.ui.LookupInputWidget vs jQuery autocomplete < https://www.mediawiki.org/wiki/Talk:OOjs_UI#OO.ui. LookupInputWidget_vs_jQuery_autocomplete>), and had to fall back to jQuery UI's autocomplete. The 'solution' I've come up with is, more or less:
var widget= new OO.ui.TextInputWidget(); widget .$input .autocomplete( { source: function ( request, response) { response( [ request.term + 'test 1', request.term + 'test 2', request.term + 'test 3' ] ); } } );
Very few examples can be found of LookupInputWidget. Does anyone have any hints about it?
Il 19/10/2014 17:49, Bartosz DziewoĆski ha scritto:
OOUI is reasonably stable and can be used in gadgets, if you wish to.
There is some high-level documentation and several examples at https://www.mediawiki.org/wiki/OOjs_UI and complete API reference at https://doc.wikimedia.org/oojs-ui/master/ .
Breaking changes still can sometimes happen and when they do, they are not being announced very widely (they're just committed with "BREAKING CHANGE" in the subject line). If you start using OOUI and something that used to work suddenly breaks, please complain at #mediawiki-visualeditor.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l