From 5fdb4170c92072fa5a3ee32a779bea2ed83b8ef0 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Thu, 12 Dec 2019 13:00:45 +0200 Subject: Added more functionality to browser module. --- .../Modules/Tango.PPC.Browser/Scripts/keyboard.js | 21 +++++++++++++++++++++ .../PPC/Modules/Tango.PPC.Browser/Scripts/main.js | 21 --------------------- 2 files changed, 21 insertions(+), 21 deletions(-) create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Scripts/keyboard.js delete mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Scripts/main.js (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Scripts') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Scripts/keyboard.js b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Scripts/keyboard.js new file mode 100644 index 000000000..21771eb8e --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Scripts/keyboard.js @@ -0,0 +1,21 @@ +(async function () { + await CefSharp.BindObjectAsync("keyboard", "bound"); + + var inputs = document.getElementsByTagName('input'); + var i = 0; + + do { + + var type = inputs[i].type; + + if (type == 'text' || type == 'email' || type == 'password' || type == 'search' || type == 'date' || type == 'url' || type == 'time' || type == 'tel' || type == 'number') { + inputs[i].onfocus = function () { + keyboard.openKeyboard(type); + } + inputs[i].onblur = function () { + keyboard.closeKeyboard(); + } + } + } + while (inputs[++i]) +})(); \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Scripts/main.js b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Scripts/main.js deleted file mode 100644 index c43e0e272..000000000 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Browser/Scripts/main.js +++ /dev/null @@ -1,21 +0,0 @@ -(async function () { - await CefSharp.BindObjectAsync("boundAsync", "bound"); - - var inputs = document.getElementsByTagName('input'); - var i = 0; - - do { - - var type = inputs[i].type; - - if (type == 'text' || type == 'email' || type == 'password' || type == 'search' || type == 'date' || type == 'url' || type == 'time' || type == 'tel' || type == 'number') { - inputs[i].onfocus = function () { - boundAsync.openKeyboard(type); - } - inputs[i].onblur = function () { - boundAsync.closeKeyboard(); - } - } - } - while (inputs[++i]) -})(); \ No newline at end of file -- cgit v1.3.1