Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/95353
Change subject: Visual indication while saving the settings ...................................................................... Visual indication while saving the settings * Button label change to "applying changes" * Button become disabled * Cursor changes to "progress" Bug: 53772 Change-Id: I1de459590ea9b357965a73f274d566eba8c04482 --- M i18n/en.json M i18n/qqq.json M resources/css/ext.uls.languagesettings.css M resources/js/ext.uls.displaysettings.js M resources/js/ext.uls.inputsettings.js M resources/js/ext.uls.languagesettings.js 6 files changed, 34 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/53/95353/1 diff --git a/i18n/en.json b/i18n/en.json index 03046e4..7b6a7a8 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -47,5 +47,6 @@ "ext-uls-input-disable-notification-undo": "Undo", "ext-uls-input-disable-notification-info-personal": "You can enable the input tools at any time from the language settings.", "ext-uls-input-disable-notification-info-interlanguage": "You can enable the input tools at any time from the language settings next to the language list.", -"ext-uls-language-settings-preferences-link": "More language settings" -} +"ext-uls-language-settings-preferences-link": "More language settings", +"ext-uls-language-settings-applying": "Applying changes" +} \ No newline at end of file diff --git a/i18n/qqq.json b/i18n/qqq.json index 1267663..5c14297 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -48,5 +48,6 @@ "ext-uls-input-disable-notification-undo": "Undo link text in the input method disable notification bubble", "ext-uls-input-disable-notification-info-personal": "Notification bubble text when input methods are disabled, appears if the ULS is at personal toolbar", "ext-uls-input-disable-notification-info-interlanguage": "Notification bubble text when input methods are disabled, appears if the ULS is at interlanguage toolbar", - "ext-uls-language-settings-preferences-link": "Text for the link showin in user preference screen" + "ext-uls-language-settings-preferences-link": "Text for the link showin in user preference screen", + "ext-uls-language-settings-applying": "Label for apply settings button in language settings screen, while settings being saved. Please keep it short." } \ No newline at end of file diff --git a/resources/css/ext.uls.languagesettings.css b/resources/css/ext.uls.languagesettings.css index b7a1b94..7ec8deb 100644 --- a/resources/css/ext.uls.languagesettings.css +++ b/resources/css/ext.uls.languagesettings.css @@ -120,3 +120,7 @@ label.checkbox input[type="checkbox"] { float: left; } + +.waiting { + cursor: progress; +} \ No newline at end of file diff --git a/resources/js/ext.uls.displaysettings.js b/resources/js/ext.uls.displaysettings.js index 234ed15..c3b6a23 100644 --- a/resources/js/ext.uls.displaysettings.js +++ b/resources/js/ext.uls.displaysettings.js @@ -584,6 +584,7 @@ return; } + displaySettings.$parent.setBusy( true ); // Save the preferences mw.webfonts.preferences.save( function ( result ) { var newFonts = mw.webfonts.preferences.registry.fonts || {}, @@ -606,6 +607,7 @@ displaySettings.dirty = false; // Update the back-up preferences for the case of canceling displaySettings.savedRegistry = $.extend( true, {}, mw.webfonts.preferences ); + displaySettings.$parent.setBusy( false ); } ); }, diff --git a/resources/js/ext.uls.inputsettings.js b/resources/js/ext.uls.inputsettings.js index 814304a..b9456f2 100644 --- a/resources/js/ext.uls.inputsettings.js +++ b/resources/js/ext.uls.inputsettings.js @@ -517,6 +517,7 @@ // No changes to save in this module. return; } + inputSettings.$parent.setBusy( true ); if ( previousLanguage ) { previousIM = inputSettings.savedRegistry.imes[previousLanguage]; @@ -540,6 +541,7 @@ inputSettings.dirty = false; // Update the back-up preferences for the case of canceling inputSettings.savedRegistry = $.extend( true, {}, $.ime.preferences.registry ); + inputSettings.$parent.setBusy( false ); } ); }, diff --git a/resources/js/ext.uls.languagesettings.js b/resources/js/ext.uls.languagesettings.js index 153d554..b914017 100644 --- a/resources/js/ext.uls.languagesettings.js +++ b/resources/js/ext.uls.languagesettings.js @@ -235,6 +235,27 @@ }, /** + * Set the language settings panel in busy mode. + * Busy mode means, a progress cursor, disabled 'apply' button with + * 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' ) ) + .attr( '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. */ -- To view, visit https://gerrit.wikimedia.org/r/95353 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1de459590ea9b357965a73f274d566eba8c04482 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits