diff --git a/lib/jquery.ime/css/jquery.ime.css b/lib/jquery.ime/css/jquery.ime.css index b14374f8..2a90bb6f 100644 --- a/lib/jquery.ime/css/jquery.ime.css +++ b/lib/jquery.ime/css/jquery.ime.css @@ -1,12 +1,12 @@ .imeselector { position: absolute; /* @embed */ - background: url('../images/ime-active.png') no-repeat left center; + background: url( ../images/ime-active.png ) no-repeat left center; /* @embed */ - background-image: -webkit-linear-gradient(transparent, transparent), url('../images/ime-active.svg'); + background-image: -webkit-linear-gradient( transparent, transparent ), url( ../images/ime-active.svg ); /* @embed */ - background-image: linear-gradient(transparent, transparent), url('../images/ime-active.svg'); - background-color: rgba(255,255,255,0.75); + background-image: linear-gradient( transparent, transparent ), url( ../images/ime-active.svg ); + background-color: rgba( 255, 255, 255, 0.75 ); background-position: left 3px center; height: 15px; font-size: small; @@ -22,7 +22,7 @@ .imeselector:hover { box-shadow: 0 1px 3px 0 #565656; border-top: none; - background-color: rgba(255,255,255,0.85); + background-color: rgba( 255, 255, 255, 0.85 ); } .imeselector a, @@ -42,12 +42,11 @@ border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 4px solid #565656; - content: ""; + content: ''; display: inline-block; height: 0; vertical-align: top; width: 0; - } span.ime-disable-link { @@ -100,9 +99,9 @@ span.ime-disable-shortcut { padding: 0; border: 1px solid #a2a9b1; border-radius: 2px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0 5px 10px rgba( 0, 0, 0, 0.2 ); + -moz-box-shadow: 0 5px 10px rgba( 0, 0, 0, 0.2 ); + box-shadow: 0 5px 10px rgba( 0, 0, 0, 0.2 ); text-align: left; } @@ -122,7 +121,7 @@ span.ime-disable-shortcut { border-bottom: 7px solid #a2a9b1; border-left: 7px solid transparent; border-right: 7px solid transparent; - content: ""; + content: ''; display: inline-block; right: 9px; position: absolute; @@ -138,14 +137,13 @@ span.ime-disable-shortcut { border-bottom: 6px solid #fff; border-left: 6px solid transparent; border-right: 6px solid transparent; - content: ""; + content: ''; display: inline-block; right: 10px; position: absolute; top: -6px; } - .imeselector-menu.ime-right:after { right: auto; left: 10px; @@ -167,11 +165,11 @@ span.ime-disable-shortcut { .imeselector-menu .ime-checked { /* @embed */ - background: url(../images/tick.png) no-repeat left 4px center; + background: url( ../images/tick.png ) no-repeat left 4px center; /* @embed */ - background-image: -webkit-linear-gradient(transparent, transparent), url('../images/tick.svg'); + background-image: -webkit-linear-gradient( transparent, transparent ), url( ../images/tick.svg ); /* @embed */ - background-image: linear-gradient(transparent, transparent), url('../images/tick.svg'); + background-image: linear-gradient( transparent, transparent ), url( ../images/tick.svg ); } .imeselector-menu .ime-help-link { diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js index 8d8ff3cb..04b1d47b 100644 --- a/lib/jquery.ime/jquery.ime.js +++ b/lib/jquery.ime/jquery.ime.js @@ -1,13 +1,30 @@ -/*! jquery.ime - v0.2.0+20190303 +/*! jquery.ime - v0.2.0+20190329 * https://github.com/wikimedia/jquery.ime * Copyright (c) 2019 Santhosh Thottingal; License: (GPL-2.0+ OR MIT) */ ( function ( $ ) { 'use strict'; + var TextEntryFactory, TextEntry, FormWidgetEntry, ContentEditableEntry, defaultInputMethod; // rangy is defined in the rangy library - /*global rangy */ + /* global rangy */ + + function arrayKeys( obj ) { + return $.map( obj, function ( element, index ) { + return index; + } ); + } + + /** + * private function for debugging + * @param {jQuery} [$obj] + */ + function debug( $obj ) { + if ( window.console && window.console.log ) { + window.console.log( $obj ); + } + } /** * Just initializes an empty static object. @@ -760,6 +777,7 @@ * jQuery plugin ime * * @param {Object} option + * @return {jQuery} */ $.fn.ime = function ( option ) { return this.each( function () { @@ -865,21 +883,6 @@ helpHandler: null, // Called for each ime option in the menu showSelector: true }; - - /** - * private function for debugging - */ - function debug( $obj ) { - if ( window.console && window.console.log ) { - window.console.log( $obj ); - } - } - - function arrayKeys( obj ) { - return $.map( obj, function ( element, index ) { - return index; - } ); - } }( jQuery ) ); ( function ( $ ) { @@ -899,6 +902,47 @@ this.listen(); } + function languageListTitle() { + return $( '

' ) + .addClass( 'ime-lang-title' ) + .attr( 'data-i18n', 'jquery-ime-other-languages' ) + .text( 'Other languages' ); + } + + function imeList() { + return $( '