Merge "Help links for input settings"
This commit is contained in:
@@ -169,7 +169,7 @@
|
||||
* @return {Object} jQuery object corresponding to the input method item.
|
||||
*/
|
||||
renderInputmethodOption: function ( imeId, selected ) {
|
||||
var $imeLabel, name, description, inputmethod, $inputMethodItem;
|
||||
var $imeLabel, name, description, $helplink, inputmethod, $inputMethodItem;
|
||||
|
||||
if ( imeId !== 'system' && !$.ime.sources[imeId] ) {
|
||||
// imeId not known for jquery.ime.
|
||||
@@ -194,8 +194,14 @@
|
||||
if ( imeId === 'system' ) {
|
||||
name = $.i18n( 'ext-uls-disable-input-method' );
|
||||
description = '';
|
||||
$helplink = '';
|
||||
} else {
|
||||
inputmethod = $.ime.inputmethods[imeId];
|
||||
$helplink = $( '<a>' )
|
||||
.addClass( 'uls-ime-help' )
|
||||
.text( $.i18n( 'ext-uls-ime-help' ) )
|
||||
.attr( 'href', mw.msg( 'uls-ime-helppage' ).replace( '$1', imeId ) )
|
||||
.attr( 'target', '_blank' );
|
||||
if ( !inputmethod ) {
|
||||
// The input method definition(rules) not loaded.
|
||||
// We will show the name from $.ime.sources
|
||||
@@ -209,7 +215,8 @@
|
||||
|
||||
$imeLabel.append(
|
||||
$( '<strong>' ).text( name ),
|
||||
$( '<span>' ).text( description )
|
||||
$( '<span>' ).text( description ),
|
||||
$helplink
|
||||
);
|
||||
|
||||
return $imeLabel;
|
||||
|
||||
Reference in New Issue
Block a user