From 89dc9b335f65d33c1b76e29d7dde3b37e66fcaff Mon Sep 17 00:00:00 2001 From: Joshua Horton Date: Wed, 14 Jun 2017 08:13:38 +0700 Subject: [PATCH] Inlined the old setDfltKeyboard() method that was only ever used in one place and was not part of the API. --- web/source/keymanweb.js | 8 -------- web/source/kmwnative.js | 12 +++++------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/web/source/keymanweb.js b/web/source/keymanweb.js index 835debd95f..3e2b7925f1 100644 --- a/web/source/keymanweb.js +++ b/web/source/keymanweb.js @@ -3067,14 +3067,6 @@ } } - /** - * Set the default keyboard - **/ - keymanweb.setDfltKeyboard=function() - { - keymanweb.setActiveKeyboard(''); // This line is used in all the UI elements to set the default keyboard, so we should follow suit here. - } - /** * Function isCJK * Scope Public diff --git a/web/source/kmwnative.js b/web/source/kmwnative.js index 0cc484a549..b1e1539bb5 100644 --- a/web/source/kmwnative.js +++ b/web/source/kmwnative.js @@ -96,19 +96,17 @@ */ keymanweb.keyboardUnavailable = function(Ln) { - return window.setTimeout(function() - { + return window.setTimeout(function() { util.wait(false); var Ps=keymanweb._KeyboardStubs[Ln],kbdName=Ps['KN'],lgName=Ps['KL']; kbdName=kbdName.replace(/\s*keyboard\s*/i,''); - util.alert('Sorry, the '+kbdName+' keyboard for '+lgName+' is not currently available!',keymanweb.setDfltKeyboard); + util.alert('Sorry, the '+kbdName+' keyboard for '+lgName+' is not currently available!', keymanweb.setActiveKeyboard('')); // Restore base keyboard if requested keyboard doesn't load - if(Ln > 0) - { + if(Ln > 0) { Ps=keymanweb._KeyboardStubs[0]; keymanweb._SetActiveKeyboard(Ps['KI'],Ps['KLC'],true); - } - },10000); + } + }, 10000); } /**