Add a more settings link instead of the help link
It opens the input settings panel of ULS Change-Id: I6d22585f735073d3d7d3e59eba24befe72238786
This commit is contained in:
@@ -33,3 +33,19 @@ div.input-settings-block {
|
|||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
background-color: #5089e8;
|
background-color: #5089e8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.uls-ime-more-settings-link {
|
||||||
|
/* @embed */
|
||||||
|
background: transparent url('../images/cog-16x16-ltr.png') right center no-repeat;
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
border-radius: 0 0 5px 5px;
|
||||||
|
border-top: 1px solid #ddd;
|
||||||
|
margin-top: 6px;
|
||||||
|
padding: 2px 0 2px 0;
|
||||||
|
color: #444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uls-ime-more-settings-link > a:hover {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|||||||
@@ -75,6 +75,34 @@
|
|||||||
imePath: mwImeRulesPath
|
imePath: mwImeRulesPath
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
// Add a 'more setttings' link that takes to input settings of ULS
|
||||||
|
$.fn.imeselector.Constructor.prototype.helpLink = function () {
|
||||||
|
var $moreSettingsLink, imeselector;
|
||||||
|
|
||||||
|
imeselector = this;
|
||||||
|
|
||||||
|
$moreSettingsLink = $( '<a>' ).text( 'More settings' )
|
||||||
|
.addClass( 'uls-ime-more-settings-link' )
|
||||||
|
.attr( 'data-i18n', 'ext-uls-ime-more-settings' );
|
||||||
|
|
||||||
|
$moreSettingsLink.languagesettings( {
|
||||||
|
defaultModule: 'input',
|
||||||
|
onClose: function () {
|
||||||
|
// on close of input settings, keep focus in input area.
|
||||||
|
imeselector.$element.focus();
|
||||||
|
},
|
||||||
|
top: imeselector.$element.offset().top
|
||||||
|
} );
|
||||||
|
|
||||||
|
// Hide the menu.
|
||||||
|
$moreSettingsLink.on( 'click', function (e) {
|
||||||
|
imeselector.$menu.removeClass( 'open' );
|
||||||
|
e.stopPropagation();
|
||||||
|
} );
|
||||||
|
|
||||||
|
return $moreSettingsLink;
|
||||||
|
};
|
||||||
|
|
||||||
$( document ).ready( function () {
|
$( document ).ready( function () {
|
||||||
|
|
||||||
$( 'body' ).on( 'focus', inputSelector, function () {
|
$( 'body' ).on( 'focus', inputSelector, function () {
|
||||||
|
|||||||
@@ -351,7 +351,7 @@
|
|||||||
onSave: function ( success ) {
|
onSave: function ( success ) {
|
||||||
if ( success ) {
|
if ( success ) {
|
||||||
// Live ime update
|
// Live ime update
|
||||||
this.$parent.hide();
|
this.$parent.close();
|
||||||
} else {
|
} else {
|
||||||
// FIXME failure. what to do?!
|
// FIXME failure. what to do?!
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user