From 02811010cf62f1b21a06780d1e470d04bb24c50f Mon Sep 17 00:00:00 2001 From: Arjun Roychowdhury Date: Sat, 31 Oct 2015 08:21:38 -0400 Subject: removed unecessary files from git --- .../com.ionic.keyboard/src/blackberry10/index.js | 135 --------------------- 1 file changed, 135 deletions(-) delete mode 100644 plugins/com.ionic.keyboard/src/blackberry10/index.js (limited to 'plugins/com.ionic.keyboard/src/blackberry10/index.js') diff --git a/plugins/com.ionic.keyboard/src/blackberry10/index.js b/plugins/com.ionic.keyboard/src/blackberry10/index.js deleted file mode 100644 index 40294158..00000000 --- a/plugins/com.ionic.keyboard/src/blackberry10/index.js +++ /dev/null @@ -1,135 +0,0 @@ - - -var keyboard, - resultObjs = {}, - threadCallback = null, - _utils = require("../../lib/utils"); - _event = require("../../lib/event"); - _webview = require("../../lib/webview"); - - - - -module.exports = { - - // Code can be declared and used outside the module.exports object, - // but any functions to be called by client.js need to be declared - // here in this object. - - // These methods call into JNEXT.Keyboard which handles the - // communication through the JNEXT plugin to keyboard_js.cpp - startService: function (success, fail, args, env) { - var result = new PluginResult(args, env); - - result.ok(keyboard.getInstance().startService(), false); - }, - show: function (success, fail, args, env) { - var result = new PluginResult(args, env); - - result.ok(keyboard.getInstance().showKeyboard(), false); - }, - close: function (success, fail, args, env) { - var result = new PluginResult(args, env); - - result.ok(keyboard.getInstance().closeKeyboard(), false); - } -}; - -keyboardShow = function(a){ - _webview.executeJavascript("cordova.plugins.Keyboard.isVisible = true"); - _webview.executeJavascript("cordova.fireDocumentEvent('native.keyboardshow',"+a+")"); - -} -keyboardHide = function(){ - _webview.executeJavascript("cordova.plugins.Keyboard.isVisible = false"); - _webview.executeJavascript("cordova.fireDocumentEvent('native.keyboardhide','')"); - -} -onStart = function() { - _webview.executeJavascript("cordova.exec("+null+", "+null+", 'Keyboard', 'startService', '')"); - } - -setTimeout(onStart,2000); - -/////////////////////////////////////////////////////////////////// -// JavaScript wrapper for JNEXT plugin for connection -/////////////////////////////////////////////////////////////////// - -JNEXT.Keyboard = function () { - var self = this, - hasInstance = false; - - self.getId = function () { - return self.m_id; - }; - - self.init = function () { - if (!JNEXT.require("libKeyboard")) { - return false; - } - - self.m_id = JNEXT.createObject("libKeyboard.Keyboard_JS"); - - if (self.m_id === "") { - return false; - } - - JNEXT.registerEvents(self); - }; - - // ************************ - // Enter your methods here - // ************************ - - // calls into InvokeMethod(string command) in keyboard_js.cpp - self.startService = function () { - return JNEXT.invoke(self.m_id, "startService"); - }; - self.showKeyboard = function () { - return JNEXT.invoke(self.m_id, "showKeyboard"); - }; - self.closeKeyboard = function () { - return JNEXT.invoke(self.m_id, "closeKeyboard"); - }; - - self.onEvent = function (strData) { // Fired by the Event framework (used by asynchronous callbacks) - var arData = strData.split(" "), - strEventDesc = arData[0], - jsonData; - - if (strEventDesc === "native.keyboardshow") { - jsonData = arData.slice(1, arData.length).join(" "); - keyboardShow(jsonData); - - } - else if (strEventDesc === "native.keyboardhide") { - keyboardHide(); - } - - }; - - // Thread methods - self.keyboardStartThread = function (callbackId) { - return JNEXT.invoke(self.m_id, "keyboardStartThread " + callbackId); - }; - self.keyboardStopThread = function () { - return JNEXT.invoke(self.m_id, "keyboardStopThread"); - }; - - // ************************ - // End of methods to edit - // ************************ - self.m_id = ""; - - self.getInstance = function () { - if (!hasInstance) { - hasInstance = true; - self.init(); - } - return self; - }; - -}; - -keyboard = new JNEXT.Keyboard(); - -- cgit v1.2.3