jenkins-bot has submitted this change and it was merged.
Change subject: Display notification when disabling input methods from keyboard
icon menu
......................................................................
Display notification when disabling input methods from keyboard icon menu
Bug: 48534
Change-Id: Id6c1cb22cb09a226cfcc84d597724e5d803392f3
---
M i18n/en.json
M i18n/qqq.json
M resources/css/ext.uls.inputsettings.css
M resources/js/ext.uls.ime.js
4 files changed, 44 insertions(+), 7 deletions(-)
Approvals:
Nikerabbit: Looks good to me, approved
jenkins-bot: Verified
diff --git a/i18n/en.json b/i18n/en.json
index 5fd47af..9f760d9 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -45,5 +45,9 @@
"ext-uls-input-disable": "Disable input methods",
"ext-uls-input-enable": "Enable input methods",
"ext-uls-input-disable-info": "Input methods are disabled.",
-"ext-uls-input-settings-noime": "No input methods are available for this
language."
+"ext-uls-input-settings-noime": "No input methods are available for this
language.",
+"ext-uls-input-disable-notification": "Input tools have been disabled",
+"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."
}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 21a75eb..cd50dcc 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -48,5 +48,9 @@
"ext-uls-input-disable": "Label for disable input tools submit button",
"ext-uls-input-enable": "Label for enable input tools button",
"ext-uls-input-disable-info": "Info text for the disable input tools
button",
- "ext-uls-input-settings-noime": "Text to be shown when no input methods
are available for a selected language"
-}
\ No newline at end of file
+ "ext-uls-input-settings-noime": "Text to be shown when no input methods
are available for a selected language",
+ "ext-uls-input-disable-notification": "Notification bubble text when input
methods are disabled",
+ "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",
+}
diff --git a/resources/css/ext.uls.inputsettings.css
b/resources/css/ext.uls.inputsettings.css
index b6b7531..924cd02 100644
--- a/resources/css/ext.uls.inputsettings.css
+++ b/resources/css/ext.uls.inputsettings.css
@@ -106,3 +106,8 @@
padding: 6px 10px;
background: #f0f0f0;
}
+
+.uls-ime-notification-bubble .link {
+ color: #0645AD;
+ cursor: pointer;
+}
diff --git a/resources/js/ext.uls.ime.js b/resources/js/ext.uls.ime.js
index 0b2c745..7b81c13 100644
--- a/resources/js/ext.uls.ime.js
+++ b/resources/js/ext.uls.ime.js
@@ -125,19 +125,20 @@
} );
// Hide the menu.
- $moreSettingsLink.on( 'click', function (e) {
- imeselector.$menu.removeClass( 'open' );
+ $moreSettingsLink.on( 'click', function ( e ) {
+ imeselector.hide();
e.stopPropagation();
} );
$disableInputToolsLink.i18n();
- $disableInputToolsLink.on( 'click', function (e) {
+ $disableInputToolsLink.on( 'click', function ( e ) {
$.ime.preferences.disable();
imeselector.hide();
- imeselector.$menu.removeClass( 'open' );
+ imeselector.$imeSetting.hide();
$.ime.preferences.save( function () {
mw.ime.disable();
+ imeNotification();
} );
e.stopPropagation();
} );
@@ -200,5 +201,28 @@
} );
+ function imeNotification () {
+ var notificationMsg = ( mw.config.get( 'wgULSPosition' ) ===
'personal' ) ?
+
'ext-uls-input-disable-notification-info-personal' :
+
'ext-uls-input-disable-notification-info-interlanguage',
+ $notification = $( '<div>' )
+ .addClass( 'uls-ime-notification-bubble' )
+ .append(
+ $( '<div>' )
+ .attr( 'data-i18n',
'ext-uls-input-disable-notification' ),
+ $( '<div>' )
+ .addClass( 'link' )
+ .attr( 'data-i18n',
'ext-uls-input-disable-notification-undo' )
+ .on( 'click', function() {
+ $.ime.preferences.enable();
+ $.ime.preferences.save(
function () {
+ mw.ime.setup();
+ } );
+ } ),
+ $( '<div>' ).attr( 'data-i18n', notificationMsg
)
+ );
+
+ mw.notify( $notification.i18n() );
+ }
}( jQuery, mediaWiki, document ) );
--
To view, visit https://gerrit.wikimedia.org/r/64279
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id6c1cb22cb09a226cfcc84d597724e5d803392f3
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: Santhosh <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits