From b460a7219c7272ad9f086d9adc012f047dd7687c Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Mon, 14 Sep 2015 18:30:05 -0500 Subject: [PATCH] use proper js module for each platform --- plugin.xml | 36 ++++++++++++++++++---------------- www/{ => android}/keyboard.js | 0 www/ios/keyboard.js | 37 +++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 17 deletions(-) rename www/{ => android}/keyboard.js (100%) create mode 100644 www/ios/keyboard.js diff --git a/plugin.xml b/plugin.xml index e55a782..9759a04 100644 --- a/plugin.xml +++ b/plugin.xml @@ -10,26 +10,29 @@ https://github.com/driftyco/ionic-plugin-keyboard.git https://github.com/driftyco/ionic-plugin-keyboard/issues - - - - - - - - - - - - - + + + + + + + + + + + + - - + + + + + + @@ -48,8 +51,7 @@ - - + diff --git a/www/keyboard.js b/www/android/keyboard.js similarity index 100% rename from www/keyboard.js rename to www/android/keyboard.js diff --git a/www/ios/keyboard.js b/www/ios/keyboard.js new file mode 100644 index 0000000..21b3bf6 --- /dev/null +++ b/www/ios/keyboard.js @@ -0,0 +1,37 @@ + +var argscheck = require('cordova/argscheck'), + utils = require('cordova/utils'), + exec = require('cordova/exec'); + + +var Keyboard = function() { +}; + +Keyboard.hideKeyboardAccessoryBar = function(hide) { + exec(null, null, "Keyboard", "hideKeyboardAccessoryBar", [hide]); +}; + +Keyboard.close = function() { + exec(null, null, "Keyboard", "close", []); +}; + +Keyboard.show = function() { + exec(null, null, "Keyboard", "show", []); +}; + +Keyboard.disableScroll = function(disable) { + exec(null, null, "Keyboard", "disableScroll", [disable]); +}; + +/* +Keyboard.styleDark = function(dark) { + exec(null, null, "Keyboard", "styleDark", [dark]); +}; +*/ + +Keyboard.isVisible = false; + +module.exports = Keyboard; + + +