Update jquery.ime from upstream
Change-Id: I5cecbb8628fe61a00abfab89cc628db25b408528
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
/*! jquery.ime - v0.1.0 - 2013-02-17
|
||||
/*! jquery.ime - v0.1.0 - 2013-03-06
|
||||
* https://github.com/wikimedia/jquery.ime
|
||||
* Copyright (c) 2013 Santhosh Thottingal; Licensed GPL, MIT */
|
||||
|
||||
( function ( $ ) {
|
||||
'use strict';
|
||||
|
||||
@@ -475,9 +474,9 @@
|
||||
this.$imeSetting = null;
|
||||
this.$menu = null;
|
||||
this.inputmethod = null;
|
||||
this.timer = null;
|
||||
this.init();
|
||||
this.listen();
|
||||
this.timer = null;
|
||||
}
|
||||
|
||||
IMESelector.prototype = {
|
||||
@@ -577,8 +576,11 @@
|
||||
} );
|
||||
|
||||
imeselector.$imeSetting.mouseenter( function () {
|
||||
// We don't want the selector to disappear while the user is trying to click it
|
||||
imeselector.stopTimer();
|
||||
imeselector.$imeSetting.addClass( 'onfocus' );
|
||||
} ).mouseleave( function () {
|
||||
imeselector.resetTimer();
|
||||
imeselector.$imeSetting.removeClass( 'onfocus' );
|
||||
} );
|
||||
|
||||
@@ -606,7 +608,7 @@
|
||||
imeselector.$imeSetting.on( 'click.ime', $.proxy( this.show, this ) );
|
||||
|
||||
imeselector.$element.on( 'focus.ime', function ( e ) {
|
||||
imeselector.selectLanguage( $.ime.preferences.getLanguage() );
|
||||
imeselector.selectLanguage( imeselector.decideLanguage() );
|
||||
imeselector.focus();
|
||||
e.stopPropagation();
|
||||
} );
|
||||
@@ -638,7 +640,7 @@
|
||||
if ( this.inputmethod !== null ) {
|
||||
this.selectIM( this.inputmethod.id );
|
||||
} else {
|
||||
this.selectLanguage( $.ime.preferences.getLanguage() );
|
||||
this.selectLanguage( this.decideLanguage() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -719,6 +721,23 @@
|
||||
this.selectIM( $.ime.preferences.getIM( languageCode ) );
|
||||
},
|
||||
|
||||
/**
|
||||
* Decide on initial language to select
|
||||
*
|
||||
*/
|
||||
decideLanguage : function () {
|
||||
if( $.ime.preferences.getLanguage() ) {
|
||||
// There has been an override by the user return the language selected by user
|
||||
return $.ime.preferences.getLanguage();
|
||||
}
|
||||
if ( this.$element.attr('lang') &&
|
||||
$.ime.languages[this.$element.attr('lang')] ) {
|
||||
return this.$element.attr('lang');
|
||||
}
|
||||
// There is either no IMs for the given language attr or there is no lang attr at all.
|
||||
return $.ime.preferences.getDefaultLanguage();
|
||||
},
|
||||
|
||||
/**
|
||||
* Select an input method
|
||||
*
|
||||
@@ -986,7 +1005,7 @@
|
||||
$.extend( $.ime.preferences, {
|
||||
registry: {
|
||||
isDirty: false,
|
||||
language : 'en',
|
||||
language : null,
|
||||
previousLanguages: [], // array of previous languages
|
||||
imes: {
|
||||
'en': 'system'
|
||||
@@ -1015,6 +1034,10 @@
|
||||
return this.registry.language;
|
||||
},
|
||||
|
||||
getDefaultLanguage: function () {
|
||||
return 'en';
|
||||
},
|
||||
|
||||
getPreviousLanguages: function () {
|
||||
return this.registry.previousLanguages;
|
||||
},
|
||||
@@ -1125,9 +1148,13 @@
|
||||
source: 'rules/bn/bn-probhat.js'
|
||||
},
|
||||
'brx-inscript': {
|
||||
name: 'Inscript',
|
||||
name: 'इनस्क्रिप्ट',
|
||||
source: 'rules/brx/brx-inscript.js'
|
||||
},
|
||||
'brx-inscript2': {
|
||||
name: 'इनस्क्रिप्ट २',
|
||||
source: 'rules/brx/brx-inscript2.js'
|
||||
},
|
||||
'cyrl-palochka': {
|
||||
name: 'Palochka',
|
||||
source: 'rules/cyrl/cyrl-palochka.js'
|
||||
@@ -1136,6 +1163,10 @@
|
||||
name: 'normalformer',
|
||||
source: 'rules/da/da-normforms.js'
|
||||
},
|
||||
'doi-inscript2': {
|
||||
name: 'इनस्क्रिप्ट २',
|
||||
source: 'rules/doi/doi-inscript2.js'
|
||||
},
|
||||
'eo-transliteration': {
|
||||
name: 'transliterigo',
|
||||
source: 'rules/eo/eo-transliteration.js'
|
||||
@@ -1180,6 +1211,10 @@
|
||||
name: 'इनस्क्रिप्ट',
|
||||
source: 'rules/hi/hi-inscript.js'
|
||||
},
|
||||
'hi-inscript2': {
|
||||
name: 'इनस्क्रिप्ट २',
|
||||
source: 'rules/hi/hi-inscript2.js'
|
||||
},
|
||||
'hi-phonetic': {
|
||||
name: 'फोनेटिक',
|
||||
source: 'rules/hi/hi-phonetic.js'
|
||||
@@ -1197,6 +1232,11 @@
|
||||
source: 'rules/mai/mai-inscript.js',
|
||||
depends: 'hi-inscript'
|
||||
},
|
||||
'mai-inscript2': {
|
||||
name: 'इनस्क्रिप्ट २',
|
||||
source: 'rules/mai/mai-inscript2.js',
|
||||
depends: 'hi-inscript2'
|
||||
},
|
||||
'hi-bolnagri': {
|
||||
name: 'बोलनागरी',
|
||||
source: 'rules/hi/hi-bolnagri.js'
|
||||
@@ -1341,6 +1381,10 @@
|
||||
name: 'Кирилл',
|
||||
source: 'rules/mn/mn-cyrl.js'
|
||||
},
|
||||
'mni-inscript2': {
|
||||
name: 'ইন্স্ক্ৰিপ্ত ২',
|
||||
source: 'rules/mni/mni-inscript2.js'
|
||||
},
|
||||
'mr-inscript': {
|
||||
name: 'इनस्क्रिप्ट',
|
||||
source: 'rules/mr/mr-inscript.js'
|
||||
@@ -1358,9 +1402,13 @@
|
||||
source: 'rules/mr/mr-phonetic.js'
|
||||
},
|
||||
'my-kbd': {
|
||||
name: 'Myanmar kbd',
|
||||
name: 'Burmese kbd',
|
||||
source: 'rules/my/my-kbd.js'
|
||||
},
|
||||
'my-xkb': {
|
||||
name: 'Burmese xkb',
|
||||
source: 'rules/my/my-xkb.js'
|
||||
},
|
||||
'ne-inscript': {
|
||||
name: 'इनस्क्रिप्ट',
|
||||
source: 'rules/ne/ne-inscript.js'
|
||||
@@ -1373,6 +1421,14 @@
|
||||
name: 'ट्रांस्लितेरेशन',
|
||||
source: 'rules/ne/ne-transliteration.js'
|
||||
},
|
||||
'ne-rom': {
|
||||
name: 'Romanized',
|
||||
source: 'rules/ne/ne-rom.js'
|
||||
},
|
||||
'ne-trad': {
|
||||
name: 'Traditional',
|
||||
source: 'rules/ne/ne-trad.js'
|
||||
},
|
||||
'no-normforms': {
|
||||
name: 'Normal transliterasjon',
|
||||
source: 'rules/no/no-normforms.js'
|
||||
@@ -1401,6 +1457,10 @@
|
||||
name: 'ହୋନେତିକ',
|
||||
source: 'rules/or/or-phonetic.js'
|
||||
},
|
||||
'sd-inscript2': {
|
||||
name: 'इनस्क्रिप्ट २',
|
||||
source: 'rules/sd/sd-inscript2.js'
|
||||
},
|
||||
'se-normforms': {
|
||||
name: 'Normal forms',
|
||||
source: 'rules/se/se-normforms.js'
|
||||
@@ -1453,6 +1513,14 @@
|
||||
name: 'кбд',
|
||||
source: 'rules/ru/ru-kbd.js'
|
||||
},
|
||||
'ru-phonetic': {
|
||||
name: 'фонетический',
|
||||
source: 'rules/ru/ru-phonetic.js'
|
||||
},
|
||||
'ru-yawerty': {
|
||||
name: 'yawerty',
|
||||
source: 'rules/ru/ru-yawerty.js'
|
||||
},
|
||||
'sa-inscript': {
|
||||
name: 'इनस्क्रिप्ट',
|
||||
source: 'rules/sa/sa-inscript.js'
|
||||
@@ -1469,6 +1537,10 @@
|
||||
name: 'Transliteration',
|
||||
source: 'rules/sah/sah-transliteration.js'
|
||||
},
|
||||
'sat-inscript2': {
|
||||
name: 'इनस्क्रिप्ट २',
|
||||
source: 'rules/sat/sat-inscript2.js'
|
||||
},
|
||||
'si-singlish': {
|
||||
name: 'සිංග්ලිෂ්',
|
||||
source: 'rules/si/si-singlish.js'
|
||||
@@ -1477,6 +1549,10 @@
|
||||
name: 'විජේසේකර',
|
||||
source: 'rules/si/si-wijesekara.js'
|
||||
},
|
||||
'ur-phonetic': {
|
||||
name: 'صوتی',
|
||||
source: 'rules/ur/ur-phonetic.js'
|
||||
},
|
||||
'ur-transliteration': {
|
||||
name: 'ٹرانسلٹریشن',
|
||||
source: 'rules/ur/ur-transliteration.js'
|
||||
@@ -1485,9 +1561,9 @@
|
||||
name: 'International Phonetic Alphabet - SIL',
|
||||
source: 'rules/fonipa/ipa-sil.js'
|
||||
},
|
||||
'ua-kbd': {
|
||||
'uk-kbd': {
|
||||
name: 'кбд',
|
||||
source: 'rules/ua/ua-kbd.js'
|
||||
source: 'rules/uk/uk-kbd.js'
|
||||
},
|
||||
'ug-kbd': {
|
||||
name: 'Uyghur kbd',
|
||||
@@ -1541,7 +1617,7 @@
|
||||
inputmethods: [ 'hi-transliteration' ]
|
||||
},
|
||||
'ber': {
|
||||
autonym: 'ⵜⵉⴼⵉⵏⴰⵖ',
|
||||
autonym: 'ⵜⵉⴼⵉⵏⴰⵖ',
|
||||
inputmethods: [ 'ber-tfng' ]
|
||||
},
|
||||
'bn': {
|
||||
@@ -1550,7 +1626,7 @@
|
||||
},
|
||||
'brx': {
|
||||
autonym: 'बोड़ो',
|
||||
inputmethods: [ 'brx-inscript' ]
|
||||
inputmethods: [ 'brx-inscript', 'brx-inscript2' ]
|
||||
},
|
||||
'ce': {
|
||||
autonym: 'нохчийн',
|
||||
@@ -1564,6 +1640,10 @@
|
||||
autonym: 'Deutsch',
|
||||
inputmethods: [ 'de' ]
|
||||
},
|
||||
'doi': {
|
||||
autonym: 'डोगरी',
|
||||
inputmethods: [ 'doi-inscript2' ]
|
||||
},
|
||||
'en': {
|
||||
autonym: 'English',
|
||||
inputmethods: [ 'ipa-sil' ]
|
||||
@@ -1598,7 +1678,7 @@
|
||||
},
|
||||
'hi': {
|
||||
autonym: 'हिन्दी',
|
||||
inputmethods: [ 'hi-transliteration', 'hi-inscript', 'hi-bolnagri', 'hi-phonetic' ]
|
||||
inputmethods: [ 'hi-transliteration', 'hi-inscript', 'hi-bolnagri', 'hi-phonetic', 'hi-inscript2' ]
|
||||
},
|
||||
'hr': {
|
||||
autonym: 'Hrvatski',
|
||||
@@ -1657,12 +1737,12 @@
|
||||
inputmethods: [ 'cyrl-palochka' ]
|
||||
},
|
||||
'lo': {
|
||||
autonym: 'ລາວ',
|
||||
autonym: 'ພາສາລາວ',
|
||||
inputmethods: [ 'lo-kbd' ]
|
||||
},
|
||||
'mai': {
|
||||
autonym: 'मैथिली',
|
||||
inputmethods: [ 'mai-inscript' ]
|
||||
inputmethods: [ 'mai-inscript', 'mai-inscript2' ]
|
||||
},
|
||||
'ml': {
|
||||
autonym: 'മലയാളം',
|
||||
@@ -1672,17 +1752,21 @@
|
||||
autonym: 'Монгол',
|
||||
inputmethods: [ 'mn-cyrl' ]
|
||||
},
|
||||
'mni': {
|
||||
autonym: 'Manipuri',
|
||||
inputmethods: [ 'mni-inscript2' ]
|
||||
},
|
||||
'mr': {
|
||||
autonym: 'मराठी',
|
||||
inputmethods: [ 'mr-transliteration', 'mr-inscript2', 'mr-inscript', 'mr-phonetic' ]
|
||||
},
|
||||
'my': {
|
||||
autonym: 'မြန်မာဘာသာ',
|
||||
inputmethods: [ 'my-kbd' ]
|
||||
autonym: 'မြန်မာ',
|
||||
inputmethods: [ 'my-kbd', 'my-xkb' ]
|
||||
},
|
||||
'ne': {
|
||||
autonym: 'नेपाली',
|
||||
inputmethods: [ 'ne-transliteration', 'ne-inscript2', 'ne-inscript' ]
|
||||
inputmethods: [ 'ne-transliteration', 'ne-inscript2', 'ne-inscript', 'ne-rom', 'ne-trad' ]
|
||||
},
|
||||
'new': {
|
||||
autonym: 'नेपाल भाषा',
|
||||
@@ -1714,7 +1798,7 @@
|
||||
},
|
||||
'ru': {
|
||||
autonym: 'русский',
|
||||
inputmethods: [ 'ru-jcuken', 'ru-kbd' ]
|
||||
inputmethods: [ 'ru-jcuken', 'ru-kbd', 'ru-phonetic', 'ru-yawerty' ]
|
||||
},
|
||||
'sah': {
|
||||
autonym: 'саха тыла',
|
||||
@@ -1724,6 +1808,14 @@
|
||||
autonym: 'संस्कृत',
|
||||
inputmethods: [ 'sa-transliteration', 'sa-inscript2', 'sa-inscript' ]
|
||||
},
|
||||
'sat': {
|
||||
autonym: 'संताली',
|
||||
inputmethods: [ 'sat-inscript2']
|
||||
},
|
||||
'sd': {
|
||||
autonym: 'सिंधी',
|
||||
inputmethods: [ 'sd-inscript2' ]
|
||||
},
|
||||
'se': {
|
||||
autonym: 'Davvisámegiella',
|
||||
inputmethods: [ 'se-normforms' ]
|
||||
@@ -1768,9 +1860,9 @@
|
||||
autonym: 'цӀаӀхна миз',
|
||||
inputmethods: [ 'cyrl-palochka' ]
|
||||
},
|
||||
'ua': {
|
||||
'uk': {
|
||||
autonym: 'Українська',
|
||||
inputmethods: [ 'ua-kbd' ]
|
||||
inputmethods: [ 'uk-kbd' ]
|
||||
},
|
||||
'ug': {
|
||||
autonym: 'ئۇيغۇرچە / Uyghurche',
|
||||
@@ -1778,7 +1870,7 @@
|
||||
},
|
||||
'ur': {
|
||||
autonym: 'اردو',
|
||||
inputmethods: [ 'ur-transliteration' ]
|
||||
inputmethods: [ 'ur-transliteration', 'ur-phonetic' ]
|
||||
},
|
||||
'uz': {
|
||||
autonym: 'Oʻzbekcha',
|
||||
|
||||
Reference in New Issue
Block a user