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:
@@ -1,4 +1,4 @@
|
|||||||
/*! jquery.ime - v0.1.0+20130826
|
/*! jquery.ime - v0.1.0+20130904
|
||||||
* https://github.com/wikimedia/jquery.ime
|
* https://github.com/wikimedia/jquery.ime
|
||||||
* Copyright (c) 2013 Santhosh Thottingal; Licensed GPL, MIT */
|
* Copyright (c) 2013 Santhosh Thottingal; Licensed GPL, MIT */
|
||||||
( function ( $ ) {
|
( function ( $ ) {
|
||||||
@@ -986,6 +986,7 @@
|
|||||||
*/
|
*/
|
||||||
position: function () {
|
position: function () {
|
||||||
var imeSelector = this,
|
var imeSelector = this,
|
||||||
|
dir = this.$element.css( 'direction' ),
|
||||||
menutop, position, top, left, room;
|
menutop, position, top, left, room;
|
||||||
|
|
||||||
this.focus(); // shows the trigger in case it is hidden
|
this.focus(); // shows the trigger in case it is hidden
|
||||||
@@ -1032,17 +1033,11 @@
|
|||||||
left: left
|
left: left
|
||||||
} );
|
} );
|
||||||
|
|
||||||
if ( parseInt( this.$menu.css( 'min-width' ), 10 ) > left ) {
|
if ( this.$menu.width() > left ) {
|
||||||
// RTL element position fix
|
// not enough space in the left
|
||||||
if ( this.$element.css( 'direction' ) === 'rtl' ) {
|
|
||||||
this.$menu
|
this.$menu
|
||||||
.css( 'left', 0 )
|
.addClass( 'ime-right' )
|
||||||
.addClass( 'ime-left' );
|
.css( 'left', dir === 'rtl' ? 0 : position.left );
|
||||||
} else {
|
|
||||||
this.$menu
|
|
||||||
.css( 'left', position.left )
|
|
||||||
.addClass( 'ime-right' );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1641,6 +1636,10 @@
|
|||||||
name: 'Esperanto x sistemo',
|
name: 'Esperanto x sistemo',
|
||||||
source: 'rules/eo/eo-x.js'
|
source: 'rules/eo/eo-x.js'
|
||||||
},
|
},
|
||||||
|
'fa-kbd': {
|
||||||
|
name: 'فارسی',
|
||||||
|
source: 'rules/fa/fa-kbd.js'
|
||||||
|
},
|
||||||
'fo-normforms': {
|
'fo-normforms': {
|
||||||
name: 'Føroyskt',
|
name: 'Føroyskt',
|
||||||
source: 'rules/fo/fo-normforms.js'
|
source: 'rules/fo/fo-normforms.js'
|
||||||
@@ -2150,6 +2149,10 @@
|
|||||||
autonym: 'Esperanto',
|
autonym: 'Esperanto',
|
||||||
inputmethods: [ 'eo-transliteration', 'eo-h', 'eo-h-f', 'eo-plena', 'eo-q', 'eo-vi', 'eo-x' ]
|
inputmethods: [ 'eo-transliteration', 'eo-h', 'eo-h-f', 'eo-plena', 'eo-q', 'eo-vi', 'eo-x' ]
|
||||||
},
|
},
|
||||||
|
'fa': {
|
||||||
|
autonym: 'فارسی',
|
||||||
|
inputmethods: [ 'fa-kbd' ]
|
||||||
|
},
|
||||||
'fo': {
|
'fo': {
|
||||||
autonym: 'Føroyskt',
|
autonym: 'Føroyskt',
|
||||||
inputmethods: [ 'fo-normforms' ]
|
inputmethods: [ 'fo-normforms' ]
|
||||||
|
|||||||
163
lib/jquery.ime/rules/fa/fa-kbd.js
Normal file
163
lib/jquery.ime/rules/fa/fa-kbd.js
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
( function ( $ ) {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var faKbd = {
|
||||||
|
id: 'fa-kbd',
|
||||||
|
name: 'kbd',
|
||||||
|
description: 'Persian standard (ISIRI 9147) keyboard layout',
|
||||||
|
date: '2013-08-30',
|
||||||
|
URL: 'http://behnam.esfahbod.info/standards/isiri-keyboard-9147.pdf',
|
||||||
|
author: 'Ebrahim Byagowi',
|
||||||
|
license: 'GPLv3',
|
||||||
|
version: '1.0',
|
||||||
|
patterns: [
|
||||||
|
['`', '\u200d'],
|
||||||
|
['1', '۱'],
|
||||||
|
['2', '۲'],
|
||||||
|
['3', '۳'],
|
||||||
|
['4', '۴'],
|
||||||
|
['5', '۵'],
|
||||||
|
['6', '۶'],
|
||||||
|
['7', '۷'],
|
||||||
|
['8', '۸'],
|
||||||
|
['9', '۹'],
|
||||||
|
['0', '۰'],
|
||||||
|
|
||||||
|
['q', 'ض'],
|
||||||
|
['w', 'ص'],
|
||||||
|
['e', 'ث'],
|
||||||
|
['r', 'ق'],
|
||||||
|
['t', 'ف'],
|
||||||
|
['y', 'غ'],
|
||||||
|
['u', 'ع'],
|
||||||
|
['i', 'ه'],
|
||||||
|
['o', 'خ'],
|
||||||
|
['p', 'ح'],
|
||||||
|
['\\[', 'ج'],
|
||||||
|
['\\]', 'چ'],
|
||||||
|
|
||||||
|
['a', 'ش'],
|
||||||
|
['s', 'س'],
|
||||||
|
['d', 'ی'],
|
||||||
|
['f', 'ب'],
|
||||||
|
['g', 'ل'],
|
||||||
|
['h', 'ا'],
|
||||||
|
['j', 'ت'],
|
||||||
|
['k', 'ن'],
|
||||||
|
['l', 'م'],
|
||||||
|
[';', 'ک'],
|
||||||
|
['\'', 'گ'],
|
||||||
|
|
||||||
|
['z', 'ظ'],
|
||||||
|
['x', 'ط'],
|
||||||
|
['c', 'ز'],
|
||||||
|
['v', 'ر'],
|
||||||
|
['b', 'ذ'],
|
||||||
|
['n', 'د'],
|
||||||
|
['m', 'پ'],
|
||||||
|
[',', 'و'],
|
||||||
|
['\\.', '.'],
|
||||||
|
['/', '/'],
|
||||||
|
|
||||||
|
['~', '÷'],
|
||||||
|
['\\!', '!'],
|
||||||
|
['@', '٬'],
|
||||||
|
['#', '٫'],
|
||||||
|
['\\$', '﷼'],
|
||||||
|
['%', '٪'],
|
||||||
|
['\\^', '×'],
|
||||||
|
['&', '،'],
|
||||||
|
['\\*', '*'],
|
||||||
|
['\\(', ')'],
|
||||||
|
['\\)', '('],
|
||||||
|
['_', 'ـ'],
|
||||||
|
|
||||||
|
['Q', 'ْ'],
|
||||||
|
['W', 'ٌ'],
|
||||||
|
['E', 'ٍ'],
|
||||||
|
['R', 'ً'],
|
||||||
|
['T', 'ُ'],
|
||||||
|
['Y', 'ِ'],
|
||||||
|
['U', 'َ'],
|
||||||
|
['I', 'ّ'],
|
||||||
|
['O', ']'],
|
||||||
|
['P', '['],
|
||||||
|
['\\{', '}'],
|
||||||
|
['\\}', '{'],
|
||||||
|
|
||||||
|
['A', 'ؤ'],
|
||||||
|
['S', 'ئ'],
|
||||||
|
['D', 'ي'],
|
||||||
|
['F', 'إ'],
|
||||||
|
['G', 'أ'],
|
||||||
|
['H', 'آ'],
|
||||||
|
['J', 'ة'],
|
||||||
|
['K', '»'],
|
||||||
|
['L', '«'],
|
||||||
|
['\\:', ':'],
|
||||||
|
['"', '؛'],
|
||||||
|
|
||||||
|
['Z', 'ك'],
|
||||||
|
['X', 'ٓ'],
|
||||||
|
['C', 'ژ'],
|
||||||
|
['V', 'ٰ'],
|
||||||
|
['B', '\u200c'],
|
||||||
|
['N', 'ٔ'],
|
||||||
|
['M', 'ء'],
|
||||||
|
['<', '>'],
|
||||||
|
['>', '<'],
|
||||||
|
['\\?', '؟']
|
||||||
|
],
|
||||||
|
patterns_x: [
|
||||||
|
['`', '~'],
|
||||||
|
['1', '`'],
|
||||||
|
['2', '@'],
|
||||||
|
['3', '#'],
|
||||||
|
['4', '$'],
|
||||||
|
['5', '%'],
|
||||||
|
['6', '^'],
|
||||||
|
['7', '&'],
|
||||||
|
['8', '•'],
|
||||||
|
['9', '\u200e'],
|
||||||
|
['0', '\u200f'],
|
||||||
|
|
||||||
|
['q', '°'],
|
||||||
|
['w', ''],
|
||||||
|
['e', '€'],
|
||||||
|
['r', ''],
|
||||||
|
['t', ''],
|
||||||
|
['y', ''],
|
||||||
|
['u', ''],
|
||||||
|
['i', '\u202d'],
|
||||||
|
['o', '\u202e'],
|
||||||
|
['p', '\u202c'],
|
||||||
|
['\\[', '\u200a'],
|
||||||
|
['\\]', '\u200b'],
|
||||||
|
|
||||||
|
['a', ''],
|
||||||
|
['s', ''],
|
||||||
|
['d', 'ى'],
|
||||||
|
['f', ''],
|
||||||
|
['g', ''],
|
||||||
|
['h', 'ٱ'],
|
||||||
|
['j', ''],
|
||||||
|
['k', '﴾'],
|
||||||
|
['l', '﴿'],
|
||||||
|
[';', ';'],
|
||||||
|
['\'', '"'],
|
||||||
|
|
||||||
|
['z', ''],
|
||||||
|
['x', ''],
|
||||||
|
['c', ''],
|
||||||
|
['v', 'ٖ'],
|
||||||
|
['b', '\u200d'],
|
||||||
|
['n', 'ٕ'],
|
||||||
|
['m', '…'],
|
||||||
|
[',', ','],
|
||||||
|
['\\.', '\''],
|
||||||
|
['/', '?']
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
$.ime.register( faKbd );
|
||||||
|
}( jQuery ) );
|
||||||
Reference in New Issue
Block a user