Merge "Make disabling input methods work"

This commit is contained in:
Santhosh
2013-01-18 06:11:38 +00:00
committed by Gerrit Code Review
2 changed files with 7 additions and 5 deletions

View File

@@ -78,19 +78,20 @@
}, },
disable: function () { disable: function () {
this.registry['enable'] = false; this.registry.isDirty = true;
this.registry.enable = false;
}, },
enable: function () { enable: function () {
this.registry['enable'] = true; this.registry.isDirty = true;
this.registry.enable = true;
}, },
isEnabled: function () { isEnabled: function () {
if ( this.registry.enable === undefined ) {
if ( this.registry['enable'] === undefined ) {
return mw.config.get( 'wgULSIMEEnabled' ); return mw.config.get( 'wgULSIMEEnabled' );
} else { } else {
return this.registry['enable']; return this.registry.enable;
} }
} }

View File

@@ -411,6 +411,7 @@
inputSettings.$template.find( 'button.uls-input-toggle-button' ) inputSettings.$template.find( 'button.uls-input-toggle-button' )
.on( 'click', function () { .on( 'click', function () {
inputSettings.enableApplyButton(); inputSettings.enableApplyButton();
if ( $.ime.preferences.isEnabled() ) { if ( $.ime.preferences.isEnabled() ) {
inputSettings.disableInputTools(); inputSettings.disableInputTools();
} else { } else {