Update jquery.ime from upstream
Change-Id: I37d3f1e6b0ebff3ddfd46b2c155e4f5fe590cb4b Version: 0.1.0+20130708
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/*! jquery.ime - v0.1.0+20130707
|
||||
/*! jquery.ime - v0.1.0+20130708
|
||||
* https://github.com/wikimedia/jquery.ime
|
||||
* Copyright (c) 2013 Santhosh Thottingal; Licensed GPL, MIT */
|
||||
( function ( $ ) {
|
||||
@@ -508,20 +508,24 @@
|
||||
},
|
||||
|
||||
prepareSelectorMenu: function () {
|
||||
|
||||
// TODO: In this approach there is a menu for each editable area.
|
||||
// With correct event mapping we can probably reduce it to one menu.
|
||||
this.$imeSetting = $( selectorTemplate );
|
||||
this.$menu = $( '<div class="imeselector-menu" role="menu">' );
|
||||
this.$menu.append( imeListTitle() )
|
||||
.append( imeList() )
|
||||
.append( toggleMenuItem() )
|
||||
.append( languageListTitle() );
|
||||
this.$menu.append(
|
||||
imeListTitle(),
|
||||
imeList(),
|
||||
toggleMenuItem(),
|
||||
languageListTitle()
|
||||
);
|
||||
|
||||
this.prepareLanguageList();
|
||||
this.$menu.append( this.helpLink() );
|
||||
|
||||
if ( $.i18n ) {
|
||||
this.$menu.i18n();
|
||||
}
|
||||
|
||||
this.$imeSetting.append( this.$menu );
|
||||
$( 'body' ).append( this.$imeSetting );
|
||||
},
|
||||
@@ -551,7 +555,8 @@
|
||||
imeselector.$imeSetting.css( 'opacity', 1 );
|
||||
imeselector.$imeSetting.css( 'margin-top', 0 );
|
||||
} );
|
||||
}, 2500 );
|
||||
}, 2500
|
||||
);
|
||||
},
|
||||
|
||||
focus: function () {
|
||||
@@ -597,6 +602,7 @@
|
||||
if ( t.hasClass( 'imeselector-toggle' ) ) {
|
||||
imeselector.toggle();
|
||||
}
|
||||
|
||||
return false;
|
||||
} );
|
||||
|
||||
@@ -619,24 +625,33 @@
|
||||
|
||||
imeselector.$menu.on( 'click.ime', 'li', function() {
|
||||
imeselector.$element.focus();
|
||||
|
||||
return false;
|
||||
} );
|
||||
|
||||
imeselector.$menu.on( 'click.ime', 'li.ime-im', function () {
|
||||
imeselector.selectIM( $( this ).data( 'ime-inputmethod' ) );
|
||||
|
||||
return false;
|
||||
} );
|
||||
|
||||
imeselector.$menu.on( 'click.ime', 'li.ime-lang', function () {
|
||||
imeselector.selectLanguage( $( this ).attr( 'lang' ) );
|
||||
|
||||
return false;
|
||||
} );
|
||||
|
||||
imeselector.$menu.on( 'click.ime', 'div.ime-disable', function () {
|
||||
imeselector.disableIM();
|
||||
|
||||
return false;
|
||||
} );
|
||||
|
||||
// Just make it work as a regular link
|
||||
imeselector.$menu.on( 'click.ime', '.ime-help-link', function ( e ) {
|
||||
e.stopPropagation();
|
||||
} );
|
||||
|
||||
imeselector.$element.on( 'focus.ime', function ( e ) {
|
||||
imeselector.selectLanguage( imeselector.decideLanguage() );
|
||||
imeselector.focus();
|
||||
@@ -683,10 +698,12 @@
|
||||
} else {
|
||||
languageCode = this.decideLanguage();
|
||||
this.selectLanguage( languageCode );
|
||||
|
||||
if ( !ime.isActive() && $.ime.languages[languageCode] ) {
|
||||
// Even after pressing toggle shortcut again, it is still disabled
|
||||
// Check if there is a previously used input method.
|
||||
previousInputMethods = $.ime.preferences.getPreviousInputMethods();
|
||||
|
||||
if ( previousInputMethods[0] ) {
|
||||
this.selectIM( previousInputMethods[0] );
|
||||
} else {
|
||||
@@ -812,7 +829,6 @@
|
||||
|
||||
/**
|
||||
* Decide on initial language to select
|
||||
*
|
||||
*/
|
||||
decideLanguage: function () {
|
||||
if ( $.ime.preferences.getLanguage() ) {
|
||||
@@ -892,7 +908,7 @@
|
||||
* Prepare language list
|
||||
*/
|
||||
prepareLanguageList: function () {
|
||||
var languageCodeIndex = 0,
|
||||
var languageCodeIndex,
|
||||
$languageListWrapper,
|
||||
$languageList,
|
||||
languageList,
|
||||
@@ -950,8 +966,12 @@
|
||||
$imeItem = $( '<a>' ).attr( 'href', '#' ).text( name ),
|
||||
$inputMethod = $( '<li data-ime-inputmethod=' + inputmethod + '>' );
|
||||
|
||||
$inputMethod.append( '<span class="ime-im-check">' ).append( $imeItem );
|
||||
$inputMethod.addClass( 'ime-im' );
|
||||
$inputMethod
|
||||
.append(
|
||||
'<span class="ime-im-check">',
|
||||
$imeItem
|
||||
)
|
||||
.addClass( 'ime-im' );
|
||||
$imeList.append( $inputMethod );
|
||||
} );
|
||||
},
|
||||
@@ -1009,14 +1029,14 @@
|
||||
}
|
||||
|
||||
function toggleMenuItem() {
|
||||
return $( '<div class="ime-disable">' )
|
||||
.append( $( '<span>' )
|
||||
return $( '<div class="ime-disable">' ).append(
|
||||
$( '<span>' )
|
||||
.attr( {
|
||||
'class': 'ime-disable-link',
|
||||
'data-i18n': 'jquery-ime-disable-text'
|
||||
} )
|
||||
.text( 'System input method' )
|
||||
).append( $( '<span>' )
|
||||
.text( 'System input method' ),
|
||||
$( '<span>' )
|
||||
.addClass( 'ime-disable-shortcut' )
|
||||
.text( 'CTRL+M' )
|
||||
);
|
||||
@@ -1557,15 +1577,15 @@
|
||||
source: 'rules/no/no-tildeforms.js'
|
||||
},
|
||||
'or-transliteration': {
|
||||
name: 'ଟରନସଲିତେରତିଓନ',
|
||||
name: 'ଟ୍ରାନ୍ସଲି ଟରେସନ',
|
||||
source: 'rules/or/or-transliteration.js'
|
||||
},
|
||||
'or-inscript': {
|
||||
name: 'ଈନସକରିପତ',
|
||||
name: 'ଇନସ୍କ୍ରିପ୍ଟ',
|
||||
source: 'rules/or/or-inscript.js'
|
||||
},
|
||||
'or-inscript2': {
|
||||
name: 'ଈନସକରିପତ2',
|
||||
name: 'ଇନସ୍କ୍ରିପ୍ଟ2',
|
||||
source: 'rules/or/or-inscript2.js'
|
||||
},
|
||||
'or-lekhani': {
|
||||
@@ -1573,7 +1593,7 @@
|
||||
source: 'rules/or/or-lekhani.js'
|
||||
},
|
||||
'or-phonetic': {
|
||||
name: 'ହୋନେତିକ',
|
||||
name: 'ଫୋନେଟିକ',
|
||||
source: 'rules/or/or-phonetic.js'
|
||||
},
|
||||
'sd-inscript2': {
|
||||
@@ -1917,7 +1937,7 @@
|
||||
},
|
||||
'or': {
|
||||
autonym: 'ଓଡ଼ିଆ',
|
||||
inputmethods: [ 'or-transliteration', 'or-lekhani', 'or-inscript', 'or-phonetic', 'or-inscript2' ]
|
||||
inputmethods: [ 'or-phonetic', 'or-transliteration', 'or-inscript', 'or-inscript2', 'or-lekhani' ]
|
||||
},
|
||||
'pa': {
|
||||
autonym: 'ਪੰਜਾਬੀ',
|
||||
|
||||
0
lib/jquery.ime/rules/mh/mh.js
Executable file → Normal file
0
lib/jquery.ime/rules/mh/mh.js
Executable file → Normal file
@@ -3,7 +3,7 @@
|
||||
|
||||
var orInScript = {
|
||||
id: 'or-inscript',
|
||||
name: 'Odia InScript',
|
||||
name: 'ଇନସ୍କ୍ରିପ୍ଟ',
|
||||
description: 'InScript keyboard for Odia script',
|
||||
date: '2012-10-14',
|
||||
author: 'Junaid P V',
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
var orInScript2 = {
|
||||
id: 'or-inscript2',
|
||||
name: 'InScript2',
|
||||
name: 'ଇନସ୍କ୍ରିପ୍ଟ2',
|
||||
description: 'Enhanced InScript keyboard for Odia language',
|
||||
date: '2013-02-09',
|
||||
author: 'Parag Nemade',
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
var orPhonetic = {
|
||||
id: 'or-phonetic',
|
||||
name: 'Odia Phonetic',
|
||||
name: 'ଫୋନେଟିକ',
|
||||
description: 'Phonetic keyboard for Odia script',
|
||||
date: '2013-02-09',
|
||||
URL: 'http://github.com/wikimedia/jquery.ime',
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
var orTransliteration = {
|
||||
id: 'or-transliteration',
|
||||
name: 'Odia Transliteration',
|
||||
description: 'Odia transliteration',
|
||||
description: 'ଟ୍ରାନ୍ସଲି ଟରେସନ',
|
||||
date: '2012-10-14',
|
||||
URL: 'http://github.com/wikimedia/jquery.ime',
|
||||
author: 'Junaid P V and Subhashish Panigrahi',
|
||||
|
||||
Reference in New Issue
Block a user