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