Visual indication while saving the settings

* Button label change to "applying changes"
* Button become disabled
* Cursor changes to "progress"

Bug: 53772
Change-Id: I1de459590ea9b357965a73f274d566eba8c04482
This commit is contained in:
Santhosh Thottingal
2013-11-14 17:31:35 +05:30
committed by Amir E. Aharoni
parent 6a7fe531d2
commit 277b0db94d
6 changed files with 33 additions and 1 deletions

View File

@@ -234,6 +234,28 @@
this.$window.hide();
},
/**
* Put the language settings panel in busy mode.
* Busy mode means displaying a progress cursor,
* and showing the 'apply' button as disabled and with
* a different label.
* @param {boolean} busy set true to put the panel in busy mode,
* false to unset the busy mode.
*/
setBusy: function ( busy ) {
var $applyButton = this.$window.find( 'button.uls-settings-apply' );
if ( busy ) {
this.$window.addClass( 'waiting' );
$applyButton
.text( $.i18n( 'ext-uls-language-settings-applying' ) )
.prop( 'disabled', true );
} else {
this.$window.removeClass( 'waiting' );
$applyButton.text( $.i18n( 'ext-uls-language-settings-apply' ) );
}
},
/**
* Close this language settings window, and
* call onClose if defined from the previous context.