From a69d425c0e5c004145ac1ab70e2f7f9fc329b54c Mon Sep 17 00:00:00 2001 From: Struan Donald Date: Fri, 3 Oct 2014 15:07:08 +0100 Subject: update Android to Cordova 3.6 Required due to security issue Remove Android directory as no longer required, move src -> www to match standard layout, update .gitignore to avoid including the standard platform files, update README based on Steve's zurich one --- www/js/softkeyboard.js | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 www/js/softkeyboard.js (limited to 'www/js/softkeyboard.js') diff --git a/www/js/softkeyboard.js b/www/js/softkeyboard.js new file mode 100644 index 0000000..9b71d46 --- /dev/null +++ b/www/js/softkeyboard.js @@ -0,0 +1,34 @@ +(function( cordova ) { + + function SoftKeyBoard() {} + + SoftKeyBoard.prototype.show = function(win, fail) { + return cordova.exec( + function (args) { if(win !== undefined) { win(args); } }, + function (args) { if(fail !== undefined) { fail(args); } }, + "SoftKeyBoard", "show", []); + }; + + SoftKeyBoard.prototype.hide = function(win, fail) { + return cordova.exec( + function (args) { if(win !== undefined) { win(args); } }, + function (args) { if(fail !== undefined) { fail(args); } }, + "SoftKeyBoard", "hide", []); + }; + + SoftKeyBoard.prototype.isShowing = function(win, fail) { + return cordova.exec( + function (args) { if(win !== undefined) { win(args); } }, + function (args) { if(fail !== undefined) { fail(args); } }, + "SoftKeyBoard", "isShowing", []); + }; + + if(!window.plugins) { + window.plugins = {}; + } + + if (!window.plugins.SoftKeyBoard) { + window.plugins.SoftKeyBoard = new SoftKeyBoard(); + } + +})( window.cordova ); -- cgit v1.2.3