Update jquery.ime from upstream

Fixes the positioning of the menu if there is not enough space
in the left side.

Bug: 41738
Change-Id: I64d40acb41559b0b6376c03a4076d17dcedbc466
This commit is contained in:
Santhosh Thottingal
2013-04-03 11:11:20 +05:30
committed by Gerrit Code Review
parent 38e1ab2e5d
commit d3ce43b1d7
5 changed files with 42 additions and 16 deletions

View File

@@ -112,6 +112,10 @@ span.ime-disable-shortcut {
text-align: left;
}
.imeselector-menu.right {
right: auto;
}
.imeselector-menu ul {
width: 100%;
padding: 0;
@@ -131,6 +135,11 @@ span.ime-disable-shortcut {
top: -7px;
}
.imeselector-menu.right:before {
right: auto;
left: 9px;
}
.imeselector-menu:after {
border-bottom: 6px solid #FFFFFF;
border-left: 6px solid transparent;
@@ -142,6 +151,12 @@ span.ime-disable-shortcut {
top: -6px;
}
.imeselector-menu.right:after {
right: auto;
left: 10px;
}
.imeselector-menu.position-top:before {
border-bottom: 0 none;
border-top: 7px solid #888;

View File

@@ -1,4 +1,4 @@
/*! jquery.ime - v0.1.0 - 2013-03-13
/*! jquery.ime - v0.1.0 - 2013-04-03
* https://github.com/wikimedia/jquery.ime
* Copyright (c) 2013 Santhosh Thottingal; Licensed GPL, MIT */
( function ( $ ) {
@@ -681,13 +681,14 @@
left = position.left + this.$element.outerWidth()
- this.$imeSetting.outerWidth();
room = $( window ).height() - top;
if ( room < this.$imeSetting.outerHeight() ) {
top = position.top - this.$imeSetting.outerHeight();
this.$menu.css( 'top',
- ( this.$menu.outerHeight() +
this.$imeSetting.outerHeight()
) )
- ( this.$menu.outerHeight() +
this.$imeSetting.outerHeight() )
)
.addClass( 'position-top' );
}
@@ -698,10 +699,16 @@
}
} );
this.$imeSetting.css({
this.$imeSetting.css( {
top: top,
left: left
});
} );
if ( parseInt( this.$menu.css( 'min-width' ) ) > left ) {
this.$menu
.css( { left: position.left } )
.addClass( 'right' );
}
},
/**
@@ -1631,10 +1638,6 @@
autonym: 'भोजपुरी',
inputmethods: [ 'hi-transliteration' ]
},
'ber': {
autonym: 'ⵜⵉⴼⵉⵏⴰⵖ',
inputmethods: [ 'ber-tfng' ]
},
'bn': {
autonym: 'বাংলা',
inputmethods: [ 'bn-avro', 'bn-inscript', 'bn-nkb', 'bn-probhat', 'bn-inscript2' ]
@@ -1739,6 +1742,10 @@
autonym: 'कॉशुर / کٲشُر',
inputmethods: [ 'ks-inscript', 'ks-kbd' ]
},
'kab': {
autonym: 'ⵜⴰⵇⴱⴰⵢⵍⵉⵜ',
inputmethods: [ 'ber-tfng' ]
},
'kok': {
autonym: 'कोंकणी',
inputmethods: [ 'kok-inscript2' ]
@@ -1808,7 +1815,7 @@
inputmethods: [ 'pa-transliteration', 'pa-inscript', 'pa-phonetic', 'pa-inscript2', 'pa-jhelum' ]
},
'rif': {
autonym: 'ⵜⵉⴼⵉⵏⴰⵖ',
autonym: 'ⵜⴰⵔⵉⴼⵉ',
inputmethods: [ 'ber-tfng' ]
},
'ru': {
@@ -1836,7 +1843,7 @@
inputmethods: [ 'se-normforms' ]
},
'shi': {
autonym: 'ⵜⵉⴼⵉⵏⴰⵖ',
autonym: 'ⵜⴰⵛⵍⵃⵉⵜ',
inputmethods: [ 'ber-tfng' ]
},
'si': {
@@ -1875,6 +1882,10 @@
autonym: 'цӀаӀхна миз',
inputmethods: [ 'cyrl-palochka' ]
},
'tzm': {
autonym: 'ⵜⴰⵎⴰⵣⵉⵖⵜ',
inputmethods: [ 'ber-tfng' ]
},
'uk': {
autonym: 'Українська',
inputmethods: [ 'uk-kbd' ]

View File

@@ -93,7 +93,7 @@
['w', 'ৈ'],
['x', 'ং'],
['y', 'ব']
],
],
patterns_x: [
['\\!', '৴'],
['1', ''],

View File

@@ -108,7 +108,7 @@
['\\>', '\u104B'],
['/', '/'],
['\\?', '?']
],
],
patterns_x: [
['`', '`'],
['\\~', '~'],

View File

@@ -10,7 +10,7 @@
license: 'GPLv3',
version: '1.0',
patterns: [
['!', '!'],
['!', '!'],
['1', '۱'],
['\\@', ''],
['2', '۲'],
@@ -104,7 +104,7 @@
['\\^', 'ۖ'],
['\\&', 'ٔ'],
['\\*', 'ٌ']]
};
};
$.ime.register( urPhonetic );
}( jQuery ) );