Merge "Fix bug: Cannot apply changes after switching panels back and forth"
This commit is contained in:
@@ -102,7 +102,6 @@
|
||||
this.$parent.$settingsPanel.empty();
|
||||
this.$webfonts = $( 'body' ).data( 'webfonts' );
|
||||
this.$parent.$settingsPanel.append( this.$template );
|
||||
this.disableApplyButton();
|
||||
this.prepareLanguages();
|
||||
this.prepareUIFonts();
|
||||
this.prepareContentFonts();
|
||||
@@ -480,10 +479,6 @@
|
||||
this.$parent.$window.find( 'button.uls-settings-apply' ).removeAttr( 'disabled' );
|
||||
},
|
||||
|
||||
disableApplyButton: function () {
|
||||
this.$parent.$window.find( 'button.uls-settings-apply' ).prop( 'disabled', true );
|
||||
},
|
||||
|
||||
/**
|
||||
* Register general event listeners
|
||||
*/
|
||||
@@ -567,6 +562,8 @@
|
||||
if ( this.uiLanguage !== this.getUILanguage() ) {
|
||||
mw.uls.changeLanguage( this.uiLanguage );
|
||||
}
|
||||
// Disable apply button
|
||||
this.$parent.disableApplyButton();
|
||||
} // @todo What to do in case of failure?
|
||||
},
|
||||
|
||||
|
||||
@@ -105,10 +105,6 @@
|
||||
this.$parent.$window.find( 'button.uls-settings-apply' ).prop( 'disabled', false );
|
||||
},
|
||||
|
||||
disableApplyButton: function () {
|
||||
this.$parent.$window.find( 'button.uls-settings-apply' ).prop( 'disabled', true );
|
||||
},
|
||||
|
||||
prepareInputmethods: function ( language ) {
|
||||
var index, inputSettings, $imeListContainer, defaultInputmethod,
|
||||
imes, selected, imeId, $imeListTitle;
|
||||
@@ -494,6 +490,8 @@
|
||||
if ( success ) {
|
||||
// Live ime update
|
||||
this.$parent.hide();
|
||||
// Disable apply button
|
||||
this.$parent.disableApplyButton();
|
||||
}
|
||||
// FIXME in case of failure. what to do?!
|
||||
},
|
||||
|
||||
@@ -261,6 +261,10 @@
|
||||
} else {
|
||||
this.show();
|
||||
}
|
||||
},
|
||||
|
||||
disableApplyButton: function () {
|
||||
this.$window.find( 'button.uls-settings-apply' ).prop( 'disabled', true );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user