Update jquery.ime from upstream

Version: v0.1.0+20130904
Changes:
1. Add Persian keyboard
2. In a ltr page with rtl input, if menu has no space in left,
flip it right

Bug: 50690
Change-Id: Id84fa09b93bd0e31d328bbdaedc4219ea6a9e75d
This commit is contained in:
Santhosh Thottingal
2013-09-04 12:28:13 +05:30
parent ba065b586c
commit 8250d94625
2 changed files with 178 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
/*! jquery.ime - v0.1.0+20130826
/*! jquery.ime - v0.1.0+20130904
* https://github.com/wikimedia/jquery.ime
* Copyright (c) 2013 Santhosh Thottingal; Licensed GPL, MIT */
( function ( $ ) {
@@ -986,6 +986,7 @@
*/
position: function () {
var imeSelector = this,
dir = this.$element.css( 'direction' ),
menutop, position, top, left, room;
this.focus(); // shows the trigger in case it is hidden
@@ -1032,17 +1033,11 @@
left: left
} );
if ( parseInt( this.$menu.css( 'min-width' ), 10 ) > left ) {
// RTL element position fix
if ( this.$element.css( 'direction' ) === 'rtl' ) {
this.$menu
.css( 'left', 0 )
.addClass( 'ime-left' );
} else {
this.$menu
.css( 'left', position.left )
.addClass( 'ime-right' );
}
if ( this.$menu.width() > left ) {
// not enough space in the left
this.$menu
.addClass( 'ime-right' )
.css( 'left', dir === 'rtl' ? 0 : position.left );
}
},
@@ -1641,6 +1636,10 @@
name: 'Esperanto x sistemo',
source: 'rules/eo/eo-x.js'
},
'fa-kbd': {
name: 'فارسی',
source: 'rules/fa/fa-kbd.js'
},
'fo-normforms': {
name: 'Føroyskt',
source: 'rules/fo/fo-normforms.js'
@@ -2150,6 +2149,10 @@
autonym: 'Esperanto',
inputmethods: [ 'eo-transliteration', 'eo-h', 'eo-h-f', 'eo-plena', 'eo-q', 'eo-vi', 'eo-x' ]
},
'fa': {
autonym: 'فارسی',
inputmethods: [ 'fa-kbd' ]
},
'fo': {
autonym: 'Føroyskt',
inputmethods: [ 'fo-normforms' ]