From 017699556bc3d612a73d6745d7e3d6ed5090e70f Mon Sep 17 00:00:00 2001 From: Moriel Schottlender Date: Wed, 9 Oct 2013 15:45:37 -0700 Subject: [PATCH] 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 --- modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js b/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js index b84ee63372..26c266b452 100644 --- a/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js +++ b/modules/ve/ui/widgets/ve.ui.LanguageInputWidget.js @@ -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'] });