Language widget ULS call fix

Because of the change to ButtonWidget, the button returned false after
onClick and as a result, ULS dialog didn't open.

This fix adds a fake 'href' value to the PushButtonWidget instance
in ve.ui.LanguageInputWidget so clicking the 'change language' button
continues to evoke ULS.

(Notice, this widget will soon be split into ve-MW with a smaller fallback
widget in core, but for now, this fixes the fact ULS doesn't appear when it
should)

Change-Id: I32eabdc5ee1b3681c20c756f45a3257c7a0b5681
This commit is contained in:
Moriel Schottlender 2013-10-09 15:45:37 -07:00
parent 38f9a55b59
commit 017699556b

View file

@ -76,6 +76,8 @@ ve.ui.LanguageInputWidget = function VeUiLanguageInputWidget( config ) {
// Create a 'change language' Button:
this.$button = new ve.ui.PushButtonWidget({
'label': ve.msg( 'visualeditor-languageinspector-widget-changelang' ),
// Add 'href' so the button returns true on click and triggers ULS
'href': '#',
'flags': ['primary']
});