Make "Cancel" reset preferences and "Apply" save and close

Bug: 48898
Change-Id: I9f5444ffd57ddf46d197ebdb23a18c0c4600b196
This commit is contained in:
Amir E. Aharoni
2013-06-03 10:40:34 +03:00
parent 19225f6a57
commit 361eb95f33
2 changed files with 41 additions and 11 deletions

View File

@@ -157,9 +157,16 @@
mw.ime.setup = function () {
$( 'body' ).on( 'focus.ime', inputSelector, function () {
var imeselector,
$input = $( this );
var imeselector, $input;
// It's possible to disable IME through the settings
// panels before it was initialized, so we need to check
// that it's supposed to be initialized
if ( !$.ime.preferences.isEnabled() ) {
return;
}
$input = $( this );
$input.ime( {
languages: mw.ime.getIMELanguageList(),
languageSelector: function () {