Update jquery.ime from upstream

Upstream: https://github.com/wikimedia/jquery.ime
Changes:
 * Bug 53695: For languages with no input methods, set
   "use native keyboard" by default.
 * Add Venetian input method.
 * Drop -moz-linear-gradient
 * Apply /* @embed */ pragma to all images, not just the topmost in each
   block.
 * Validate the input method id in load method.

Change-Id: I05f8350003227e150948670caf919f05a2b00f88
This commit is contained in:
Kartik Mistry
2014-02-11 17:50:14 +05:30
committed by Amir E. Aharoni
parent 7de150c90a
commit db055c8f47
3 changed files with 50 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
/*! jquery.ime - v0.1.0+20131123
/*! jquery.ime - v0.1.0+20140211
* https://github.com/wikimedia/jquery.ime
* Copyright (c) 2013 Santhosh Thottingal; Licensed GPL, MIT */
* Copyright (c) 2014 Santhosh Thottingal; Licensed GPL, MIT */
( function ( $ ) {
'use strict';
@@ -303,6 +303,11 @@
return deferred.resolve();
}
// Validate the input method id.
if ( !$.ime.sources[inputmethodId] ) {
return deferred.reject();
}
dependency = $.ime.sources[inputmethodId].depends;
if ( dependency && !$.ime.inputmethods[dependency] ) {
ime.load( dependency ).done( function () {
@@ -337,7 +342,7 @@
/**
* Set the caret position in the div.
* @param {jQuery} element The content editable div element
* @param {jQuery} $element The content editable div element
* @param {Object} position An object with start and end properties.
* @return {Array} If the cursor could not be placed at given position, how
* many characters had to go back to place the cursor
@@ -665,6 +670,7 @@
/**
* Set the caret position in the div.
* @param {Element} element The content editable div element
* @param position
*/
function setDivCaretPosition( element, position ) {
var nextCharIndex,
@@ -1384,6 +1390,7 @@
'class': 'ime-disable-link',
'data-i18n': 'jquery-ime-disable-text'
} )
.addClass( 'ime-checked' )
.text( 'System input method' ),
$( '<span>' )
.addClass( 'ime-disable-shortcut' )
@@ -2117,6 +2124,10 @@
'uz-kbd': {
name: 'Uzbek kbd',
source: 'rules/uz/uz-kbd.js'
},
'vec-GVU': {
name: 'Venetian',
source: 'rules/vec/vec-GVU.js'
}
} );
@@ -2448,6 +2459,10 @@
'uz': {
autonym: 'Oʻzbekcha',
inputmethods: [ 'uz-kbd' ]
},
'vec': {
autonym: 'Venetian',
inputmethods: [ 'vec-GVU' ]
}
} );